added item_enumO() so python menu items can call enum types with string args.

Example sequencer menu
		self.layout.column()
		self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", property='type', value='ADD', text="Effect Strip (Add)")
This commit is contained in:
2009-06-07 14:53:08 +00:00
parent eecf7722b6
commit bb06e311a1
4 changed files with 37 additions and 5 deletions

View File

@@ -2059,9 +2059,7 @@ PyObject *pyrna_basetype_register(PyObject *self, PyObject *args)
item= PyObject_GetAttrString(py_class, "__rna__");
if(!item || !BPy_StructRNA_Check(item)) {
if(item) {
Py_DECREF(item);
}
Py_XDECREF(item);
PyErr_SetString(PyExc_AttributeError, "expected a Type subclassed from a registerable rna type (no __rna__ property).");
return NULL;
}