Fix: popup menus were not freeing operators.
Made a new Popup menu call for this case:

uiPupmenuOperator(C, maxrow, op, propname, menustr);

It will set enum "propname" to the menu item and call operator,
register it optionally and free it. Use it in "invoke" calls.

Next: automatic menu generating for enum properties!
This commit is contained in:
2008-12-24 14:52:17 +00:00
parent 9bb7babd2c
commit 3c612bc0e2
12 changed files with 105 additions and 49 deletions

View File

@@ -110,7 +110,7 @@ static PyObject * pyop_func_call(BPy_OperatorFunc * self, PyObject *args, PyObje
}
}
WM_operator_call(self->C, self->name, WM_OP_DEFAULT, properties);
WM_operator_name_call(self->C, self->name, WM_OP_DEFAULT, properties);
if (properties) {
IDP_FreeProperty(properties);