diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 12:55:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-16 12:56:39 +0300 |
commit | b5a4a00998583223c9c68a09819303e66ec9954e (patch) | |
tree | c3dc748272d8b4044eb8dd712ccd1314f610d2f2 | |
parent | 7bf7f67a4604e4daf01e87163c49361acb11bbbe (diff) |
Fix T46502: Linked dupli-group lost on reload
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 0ce356e2255..39739867c8b 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) |