Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-10-16 12:55:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-16 12:56:39 +0300
commitb5a4a00998583223c9c68a09819303e66ec9954e (patch)
treec3dc748272d8b4044eb8dd712ccd1314f610d2f2
parent7bf7f67a4604e4daf01e87163c49361acb11bbbe (diff)
Fix T46502: Linked dupli-group lost on reload
-rw-r--r--source/blender/makesrna/intern/rna_object.c7
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)