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>2021-09-30 16:22:16 +0300
committerBastien Montagne <bastien@blender.org>2021-09-30 17:00:29 +0300
commit1a72744ddc4a34ce32f308a9011423c2099b49d3 (patch)
tree7aad8f49a71fcff1c61c456c26b6f10d28c89ca5 /source/blender/blenkernel/BKE_lib_id.h
parent779ea49af785bcd7a2911cba1a929856e21f2c3c (diff)
Fix T90246: Full Copy'ing a scene confuses physics in the original scene.
Handling of RigidBody data in duplicate of scenes/collections was very wrong. This commit: - Add handling of duplication of RB collections when fully duplicating a scene. - Fix Object duplication trying to add duplicated RB objects to matching RBW collections. While the later behavior is desired when only duplicated objects, when duplicating their collections and/or scenes it is actually very bad, as it would add back new object duplicates to old (RBW) collections.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_id.h')
-rw-r--r--source/blender/blenkernel/BKE_lib_id.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h
index 36f57209e33..d2a8ec2e332 100644
--- a/source/blender/blenkernel/BKE_lib_id.h
+++ b/source/blender/blenkernel/BKE_lib_id.h
@@ -133,6 +133,9 @@ enum {
LIB_ID_COPY_SHAPEKEY = 1 << 26,
/** EXCEPTION! Specific deep-copy of node trees used e.g. for rendering purposes. */
LIB_ID_COPY_NODETREE_LOCALIZE = 1 << 27,
+ /** EXCEPTION! Specific handling of RB objects regarding collections differs depending whether we
+ duplicate scene/collections, or objects. */
+ LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING = 1 << 28,
/* *** Helper 'defines' gathering most common flag sets. *** */
/** Shapekeys are not real ID's, more like local data to geometry IDs... */
@@ -261,7 +264,8 @@ struct ID *BKE_id_copy_ex(struct Main *bmain,
const int flag);
struct ID *BKE_id_copy_for_duplicate(struct Main *bmain,
struct ID *id,
- const uint duplicate_flags);
+ const uint duplicate_flags,
+ const int copy_flags);
void BKE_lib_id_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b);
void BKE_lib_id_swap_full(struct Main *bmain, struct ID *id_a, struct ID *id_b);