Fix T46345: Registrable props could be modified
authorJulian Eisel <eiseljulian@gmail.com>
Tue, 6 Oct 2015 10:51:35 +0000 (21:51 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 6 Oct 2015 10:51:35 +0000 (21:51 +1100)
source/blender/makesrna/intern/rna_access.c

index b7478fd33115832ee0038d6087a796ea62706d09..b41568d0abaa9a9c6e73c4ee1e7bdaaa7fd19398 100644 (file)
@@ -1570,7 +1570,9 @@ bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
 
        prop = rna_ensure_property(prop);
        flag = prop->editable ? prop->editable(ptr) : prop->flag;
-       return (flag & PROP_EDITABLE) && (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION));
+       return ((flag & PROP_EDITABLE) &&
+               (flag & PROP_REGISTER) == 0 &&
+               (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION)));
 }
 
 bool RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop)