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 :(
This commit is contained in:
Bastien Montagne 2018-10-30 16:14:33 +01:00
parent 974d158f3f
commit c62fad2a9a
Notes: blender-bot 2023-02-14 10:04:50 +01:00
Referenced by issue #57512, Creating a full copy scene doens't support parenting
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}