2.5: File Selector: display operator properties in the side region,
[blender-staging.git] / source / blender / python / intern / bpy_operator_wrap.c
index 542de6bd9b84f4f653d83b48a655c331e6d7eac3..b7e3c86dd91bef8394fd9ee11f43e465d27e3f33 100644 (file)
@@ -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 */