diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-19 20:12:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-19 20:12:08 +0300 |
commit | e61c90e4162040f564e154da055995e2ed280fdf (patch) | |
tree | 70cfb3cde5608c03839acb460ddb6b53b57f39f9 /source | |
parent | ac8ff25b2d6465e3ad2b79c359d74b4bab4985e4 (diff) |
operators were copying the properties from the rna operator into the class instance.
however this meant the invoke function could not modify properties for exec to use (unless it called exec directly after)
since the popup for eg would re-instance the python class each time.
now use the operator properties directly through rna without an automatic copy.
now an operator attribute is accessed like this...
self.path --> self.properties.path
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index 5f3ddf02d7b..1aa56befe0e 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -106,24 +106,6 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperatorType *ot, wmOperat Py_DECREF(args); if (py_class_instance) { /* Initializing the class worked, now run its invoke function */ - PyObject *class_dict= PyObject_GetAttrString(py_class_instance, "__dict__"); - - /* Assign instance attributes from operator properties */ - if(op) { - const char *arg_name; - - RNA_STRUCT_BEGIN(op->ptr, prop) { - arg_name= RNA_property_identifier(prop); - - if (strcmp(arg_name, "rna_type")==0) continue; - - item = pyrna_prop_to_py(op->ptr, prop); - PyDict_SetItemString(class_dict, arg_name, item); - Py_DECREF(item); - } - RNA_STRUCT_END; - } - RNA_pointer_create(NULL, &RNA_Context, C, &ptr_context); if (mode==PYOP_INVOKE) { @@ -154,7 +136,6 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperatorType *ot, wmOperat Py_DECREF(args); Py_DECREF(item); - Py_DECREF(class_dict); } else { PyErr_Print(); |