Properties for macro operator call in python.
Dicts are converted to operator properties like this:
bpy.ops.armature.extrude_forked(TRANSFORM_OT_translate={"value":(2,0,1)})
Note that this doesn't work quite well if one operator is twice in the same macro, but that's a problem at the RNA level too. I'll have to deal with that eventually.
This commit is contained in:
@@ -83,9 +83,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
|
||||
error_val= -1;
|
||||
}
|
||||
else {
|
||||
/* WM_operator_properties_create(&ptr, opname); */
|
||||
/* Save another lookup */
|
||||
RNA_pointer_create(NULL, ot->srna, NULL, &ptr);
|
||||
WM_operator_properties_create_ptr(&ptr, ot);
|
||||
|
||||
if(kw && PyDict_Size(kw))
|
||||
error_val= pyrna_pydict_to_props(&ptr, kw, 0, "Converting py args to operator properties: ");
|
||||
|
||||
Reference in New Issue
Block a user