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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-10-30 18:14:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-10-30 18:14:33 +0300
commitc62fad2a9a6ce927867362c2935d4484b8120ebc (patch)
treeea1ec998b7a7a70ba83686ab4072880f5bb84696 /source/blender/editors/object/object_relations.c
parent974d158f3fdf0b7a3b454fec3883f818c5e3a107 (diff)
Fix T57512: Creating a full copy scene doens't support parenting.
Will say it once again: we should really, really switch all that duplicating code to proper use of new ID management API :(
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 8464c49f374..27cfee95341 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1630,6 +1630,10 @@ static void libblock_relink_collection(Collection *collection)
{
BKE_libblock_relink_to_newid(&collection->id);
+ for (CollectionObject *cob = collection->gobject.first; cob != NULL; cob = cob->next) {
+ BKE_libblock_relink_to_newid(&cob->ob->id);
+ }
+
for (CollectionChild *child = collection->children.first; child; child = child->next) {
libblock_relink_collection(child->collection);
}