Commit: dfba50bf6a033339d49cbe8b9b6537c96d7d99d4
Author: Campbell Barton
Date:   Fri Oct 16 20:55:23 2015 +1100
Branches: blender-v2.76a-release
https://developer.blender.org/rBdfba50bf6a033339d49cbe8b9b6537c96d7d99d4

Fix T46502: Linked dupli-group lost on reload

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

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

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

diff --git a/source/blender/makesrna/intern/rna_object.c 
b/source/blender/makesrna/intern/rna_object.c
index 54f1798..01547e7 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -535,11 +535,14 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, 
PointerRNA value)
        /* must not let this be set if the object belongs in this group already,
         * thus causing a cycle/infinite-recursion leading to crashes on load 
[#25298]
         */
-       if (BKE_group_object_exists(grp, ob) == 0)
+       if (BKE_group_object_exists(grp, ob) == 0) {
                ob->dup_group = grp;
-       else
+               id_lib_extern((ID *)grp);
+       }
+       else {
                BKE_report(NULL, RPT_ERROR,
                           "Cannot set dupli-group as object belongs in group 
being instanced, thus causing a cycle");
+       }
 }
 
 static void rna_VertexGroup_name_set(PointerRNA *ptr, const char *value)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to