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-07-09 16:33:34 +0300
committerBastien Montagne <bastien@blender.org>2020-07-09 18:56:05 +0300
commit7b1c406b5431ce65d84ddb5f2c53977c25c18373 (patch)
treed10874f81e0ca717dc288ae2071bc127c6da990a /source/blender/blenkernel/BKE_anim_data.h
parent78b629a98f0c7c5c2c8f3b6b6d1081646cbe6fde (diff)
Implement T77959: Never duplicate linked data during deep-copy.
Note that this behavior is enforced on user level for now, but on code side it is controlled with a flag, which should make it easy to refine that behavior if needed. Only exception is when we duplicate a linked ID directly (then we assume user wants a local deep-copy of that linked data, and we always also duplicate linked sub-data-blocks). Note that this commit also slightly refactor the handling of actions of animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an explicit new `BKE_animdata_duplicate_id_action()` to be used during ID duplication (deep copy). This also allows us to get rid of the special case for liboverrides.
Diffstat (limited to 'source/blender/blenkernel/BKE_anim_data.h')
-rw-r--r--source/blender/blenkernel/BKE_anim_data.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_anim_data.h b/source/blender/blenkernel/BKE_anim_data.h
index 5aeaf4405f5..48e95740b9d 100644
--- a/source/blender/blenkernel/BKE_anim_data.h
+++ b/source/blender/blenkernel/BKE_anim_data.h
@@ -71,7 +71,11 @@ bool BKE_animdata_copy_id(struct Main *bmain,
const int flag);
/* Copy AnimData Actions */
-void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id, const bool set_newid);
+void BKE_animdata_copy_id_action(struct Main *bmain, struct ID *id);
+
+void BKE_animdata_duplicate_id_action(struct Main *bmain,
+ struct ID *id,
+ const uint duplicate_flags);
/* Merge copies of data from source AnimData block */
typedef enum eAnimData_MergeCopy_Modes {