Commit: d424c8041de8d20d295fcfc11aabc15d0a3b4d18
Author: Bastien Montagne
Date:   Fri Mar 31 23:56:18 2017 +0200
Branches: datablock_idprops
https://developer.blender.org/rBd424c8041de8d20d295fcfc11aabc15d0a3b4d18

Cleanup: Some minor styling.

===================================================================

M       source/blender/makesrna/intern/rna_access.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_access.c 
b/source/blender/makesrna/intern/rna_access.c
index 7c7e7d3c7c3..d1113448a2f 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2990,8 +2990,9 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, 
PropertyRNA *prop)
 
                if (RNA_struct_is_ID(pprop->type))
                        return rna_pointer_inherit_refine(ptr, pprop->type, 
IDP_Id(idprop));
+
+               /* for groups, data is idprop itself */
                if (pprop->typef)
-                       /* for groups, data is idprop itself */
                        return rna_pointer_inherit_refine(ptr, 
pprop->typef(ptr), idprop);
                else
                        return rna_pointer_inherit_refine(ptr, pprop->type, 
idprop);
@@ -3012,7 +3013,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, 
PropertyRNA *prop)
 
 void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA 
ptr_value)
 {
-       PointerPropertyRNA *pprop = (PointerPropertyRNA *) prop;
+       PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
        BLI_assert(RNA_property_type(prop) == PROP_POINTER);
 
        /* Check types */
@@ -3035,9 +3036,10 @@ void RNA_property_pointer_set(PointerRNA *ptr, 
PropertyRNA *prop, PointerRNA ptr
 
                val.id = ptr_value.data;
 
-               group = RNA_struct_idprops(ptr, 1);
-               if (group)
+               group = RNA_struct_idprops(ptr, true);
+               if (group) {
                        IDP_ReplaceInGroup(group, IDP_New(IDP_ID, &val, 
prop->identifier));
+               }
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to