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>2020-06-10 19:27:32 +0300
committerBastien Montagne <bastien@blender.org>2020-06-10 20:45:52 +0300
commiteee35ebdfbed405c45d51dc9d5f29dfd87cea0fc (patch)
treeb5aed7442a8eb7b1800ab075ffc3dfc44b79f6e5 /source/blender/blenkernel/intern/scene.c
parentb05fa123d741567d0446a1e73cf7e97016cfa7da (diff)
Make `BKE_scene_copy` fully handle all duplicate modes, deep copy included.
This greatly simplifies and unifies logic. Also addresses T77255: full scene copy will now use same preferences parameters as object or collection duplicate to choose which data-blocks to copy along.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f6cbf831629..1b06217f1df 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -851,6 +851,10 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, eSceneCopyMethod type)
id_us_min(&sce_copy->gpd->id);
BKE_id_copy_ex(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd, LIB_ID_COPY_ACTIONS);
}
+
+ /* Deep-duplicate collections and objects (using preferences' settings for which sub-data to
+ * duplicate along the object itself). */
+ BKE_collection_duplicate(bmain, NULL, sce_copy->master_collection, true, true, true);
}
else {
/* Remove sequencer if not full copy */
@@ -859,9 +863,6 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, eSceneCopyMethod type)
BKE_sequencer_editing_free(sce_copy, true);
}
- /* NOTE: part of SCE_COPY_FULL operations
- * are done outside of blenkernel with ED_object_single_users! */
-
return sce_copy;
}
}