added 'hidden' option for python defined rna props, means py operators can use hidden properties so the popup wont show

improved error message when bad args are given to propertyRNA funcs
This commit is contained in:
2009-11-19 14:32:12 +00:00
parent 2577bfddfd
commit 17013ca4ee
2 changed files with 69 additions and 50 deletions

View File

@@ -308,9 +308,17 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
*/
item= ((PyTypeObject*)py_class)->tp_dict;
if(item) {
/* only call this so pyrna_deferred_register_props gives a useful error
* WM_operatortype_append_ptr will call RNA_def_struct_identifier
* later */
RNA_def_struct_identifier(ot->srna, ot->idname);
if(pyrna_deferred_register_props(ot->srna, item)!=0) {
/* failed to register operator props */
PyErr_Print();
PyErr_Clear();
}
}
else {