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 <bastien@blender.org>2022-09-06 15:57:44 +0300
committerBastien Montagne <bastien@blender.org>2022-09-06 17:23:06 +0300
commite3afead9aa4677ea91e3c41bbaf814533361cec2 (patch)
tree48ce083069268c629de573332cc7ffa2f42b1220 /source/blender/blenkernel/intern/scene.cc
parent6f80c60ce658b8877dce9af4544eee1578fac452 (diff)
Fix (unreported) bad handling of embedded IDs on owner copying.
Completely forgot in rBcd49fee74114 to handle the owner ID copying case (this code now also needs to re-assign to `owner_id` pointer of the newly copied embedded IDs to their rightful owner).
Diffstat (limited to 'source/blender/blenkernel/intern/scene.cc')
-rw-r--r--source/blender/blenkernel/intern/scene.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.cc b/source/blender/blenkernel/intern/scene.cc
index 71c77be5b46..005dd4326cc 100644
--- a/source/blender/blenkernel/intern/scene.cc
+++ b/source/blender/blenkernel/intern/scene.cc
@@ -250,6 +250,7 @@ static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
(ID *)scene_src->master_collection,
(ID **)&scene_dst->master_collection,
flag_private_id_data);
+ scene_dst->master_collection->owner_id = &scene_dst->id;
}
/* View Layers */
@@ -275,6 +276,7 @@ static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
(void *)(&scene_src->id),
&scene_dst->id,
ID_REMAP_SKIP_NEVER_NULL_USAGE | ID_REMAP_SKIP_USER_CLEAR);
+ scene_dst->nodetree->owner_id = &scene_dst->id;
}
if (scene_src->rigidbody_world) {