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/editors/scene
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/editors/scene')
-rw-r--r--source/blender/editors/scene/scene_edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c
index d78b1532a39..059337dd6fe 100644
--- a/source/blender/editors/scene/scene_edit.c
+++ b/source/blender/editors/scene/scene_edit.c
@@ -61,13 +61,13 @@ Scene *ED_scene_add(Main *bmain, bContext *C, wmWindow *win, eSceneCopyMethod me
else { /* different kinds of copying */
Scene *scene_old = WM_window_get_active_scene(win);
- scene_new = BKE_scene_copy(bmain, scene_old, method);
-
- /* these can't be handled in blenkernel currently, so do them here */
+ /* We are going to deep-copy collections, objects and various object data, we need to have
+ * up-to-date obdata for that. */
if (method == SCE_COPY_FULL) {
ED_editors_flush_edits(bmain);
- ED_object_single_users(bmain, scene_new, true, true);
}
+
+ scene_new = BKE_scene_copy(bmain, scene_old, method);
}
WM_window_set_active_scene(bmain, C, win, scene_new);