diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-25 01:27:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-25 01:27:10 +0400 |
commit | 7a357cba3994bee7d05c7a8bf5736eb94067d564 (patch) | |
tree | 942d61fdd1138867710ed41604c4d2947565f7b1 /source/blender/python/intern/bpy_operator_wrap.c | |
parent | 169fdf9e9757a8c31d950f5902d7c4cfd1f96a88 (diff) |
2.5: File Selector: display operator properties in the side region,
check Save Image or Export PLY operator for example.
Also these code changes:
* Added some RNA collection iterator macros to simplify code.
* Fix bpy.props.BoolProperty not working correct.
* Merge uiDefAutoButsRNA/uiDefAutoButsRNA_single into one.
Diffstat (limited to 'source/blender/python/intern/bpy_operator_wrap.c')
-rw-r--r-- | source/blender/python/intern/bpy_operator_wrap.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index 542de6bd9b8..b7e3c86dd91 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -107,15 +107,9 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve /* Assign instance attributes from operator properties */ { - PropertyRNA *prop, *iterprop; - CollectionPropertyIterator iter; const char *arg_name; - iterprop= RNA_struct_iterator_property(op->ptr->type); - RNA_property_collection_begin(op->ptr, iterprop, &iter); - - for(; iter.valid; RNA_property_collection_next(&iter)) { - prop= iter.ptr.data; + RNA_STRUCT_BEGIN(op->ptr, prop) { arg_name= RNA_property_identifier(prop); if (strcmp(arg_name, "rna_type")==0) continue; @@ -124,8 +118,7 @@ static int PYTHON_OT_generic(int mode, bContext *C, wmOperator *op, wmEvent *eve PyObject_SetAttrString(py_class_instance, arg_name, item); Py_DECREF(item); } - - RNA_property_collection_end(&iter); + RNA_STRUCT_END; } /* set operator pointer RNA as instance "__operator__" attribute */ |