RNA: function calls with optional parameters were not giving correct default
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 26 Jul 2011 16:01:09 +0000 (16:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 26 Jul 2011 16:01:09 +0000 (16:01 +0000)
values for arrays.

source/blender/makesrna/intern/rna_access.c

index d9fbdd7caf2f2dd24155a4d4b62536b01394a13f..dcf2400b9badcc4fe69bc6dc2ff4500c5c7e847f 100644 (file)
@@ -4407,15 +4407,15 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
                if(!(parm->flag & PROP_REQUIRED) && !(parm->flag & PROP_DYNAMIC)) {
                        switch(parm->type) {
                                case PROP_BOOLEAN:
-                                       if(parm->arraydimension) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
+                                       if(parm->arraydimension) memcpy(data, ((BooleanPropertyRNA*)parm)->defaultarray, size);
                                        else memcpy(data, &((BooleanPropertyRNA*)parm)->defaultvalue, size);
                                        break;
                                case PROP_INT:
-                                       if(parm->arraydimension) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
+                                       if(parm->arraydimension) memcpy(data, ((IntPropertyRNA*)parm)->defaultarray, size);
                                        else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
                                        break;
                                case PROP_FLOAT:
-                                       if(parm->arraydimension) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
+                                       if(parm->arraydimension) memcpy(data, ((FloatPropertyRNA*)parm)->defaultarray, size);
                                        else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
                                        break;
                                case PROP_ENUM: