Support for type callbacks on IDProperty pointers. Before this the type of the type...
authorLukas Toenne <lukas.toenne@googlemail.com>
Tue, 20 Nov 2012 12:25:28 +0000 (12:25 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Tue, 20 Nov 2012 12:25:28 +0000 (12:25 +0000)
source/blender/makesrna/intern/rna_access.c

index 81e738ed82f97462c50b60b13660ed5883ede7cf..deb4094cb45bf4ae25ec4905dd74cd34febd52f8 100644 (file)
@@ -2551,7 +2551,10 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
                pprop = (PointerPropertyRNA *)prop;
 
                /* for groups, data is idprop itself */
-               return rna_pointer_inherit_refine(ptr, pprop->type, idprop);
+               if (pprop->typef)
+                       return rna_pointer_inherit_refine(ptr, pprop->typef(ptr), idprop);
+               else
+                       return rna_pointer_inherit_refine(ptr, pprop->type, idprop);
        }
        else if (pprop->get) {
                return pprop->get(ptr);