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-17 16:27:22 +0300
committerBastien Montagne <bastien@blender.org>2020-06-17 18:06:05 +0300
commitc84fee1ffeab3842d01779f1a2e5bfd826b48e60 (patch)
tree7ac492c99cc06d433067fb1a932a0b26cd139205 /source/blender/blenkernel/intern/collection.c
parentad6cccf058d0296a8741a6583d12967366a31705 (diff)
ID Duplicate: uniformize Action duplication.
Previously, object (and sub-data) actions would be controlled by the user preferences flag, collections actions would never be duplicted, and scenes actions were always duplicated... Now they all follow the user preferences settings.
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 6127ad075f4..f115b9e8b7b 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -28,6 +28,7 @@
#include "BLI_threads.h"
#include "BLT_translation.h"
+#include "BKE_anim_data.h"
#include "BKE_collection.h"
#include "BKE_icons.h"
#include "BKE_idprop.h"
@@ -350,6 +351,11 @@ static Collection *collection_duplicate_recursive(Main *bmain,
id_us_min(&collection_new->id);
ID_NEW_SET(collection_old, collection_new);
+
+ if (duplicate_flags & USER_DUP_ACT) {
+ BKE_animdata_copy_id_action(bmain, &collection_new->id, true);
+ }
+
do_full_process = true;
}
else {