Fix bug #19864: edge slide factor field is wrong. Setting RNA float
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 11 Nov 2009 18:30:37 +0000 (18:30 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 11 Nov 2009 18:30:37 +0000 (18:30 +0000)
property non-array property as array did not work correct.

source/blender/makesrna/intern/rna_access.c

index dea593c78a5bf20bb9c35ab65fecbf9de713b8d3..c8d488db6c329453f561e6787346c799f53053e3 100644 (file)
@@ -1248,8 +1248,12 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
        int i;
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
-               if(prop->arraydimension == 0)
-                       IDP_Double(idprop)= values[0];
+               if(prop->arraydimension == 0) {
+                       if(idprop->type == IDP_FLOAT)
+                               IDP_Float(idprop)= values[0];
+                       else
+                               IDP_Double(idprop)= values[0];
+               }
                else if(idprop->subtype == IDP_FLOAT) {
                        memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
                }