diff options
author | Bastien Montagne <bastien@blender.org> | 2021-09-30 16:22:16 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-09-30 17:00:29 +0300 |
commit | 1a72744ddc4a34ce32f308a9011423c2099b49d3 (patch) | |
tree | 7aad8f49a71fcff1c61c456c26b6f10d28c89ca5 /source/blender/blenkernel/intern/rigidbody.c | |
parent | 779ea49af785bcd7a2911cba1a929856e21f2c3c (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/intern/rigidbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 328c54fc21b..947efd88ec1 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -302,7 +302,7 @@ void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src ob_dst->rigidbody_object = rigidbody_copy_object(ob_src, flag); ob_dst->rigidbody_constraint = rigidbody_copy_constraint(ob_src, flag); - if (flag & LIB_ID_CREATE_NO_MAIN) { + if ((flag & (LIB_ID_CREATE_NO_MAIN | LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING)) != 0) { return; } |