diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-02-15 17:55:54 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-02-15 18:04:18 +0300 |
commit | f5ac1f444b6b3f03f65dd9ba5f44c6c46c12fb98 (patch) | |
tree | a5dc3a9cd44e308904c8d3463cf9e975dccb67dc /source/blender/blenkernel | |
parent | 512bbf3748f57dee2be10b10554629cd05c474e4 (diff) |
Fix T61567: Object loose its rigid body data when moving to collection
At some I unified the "move to collection" with the remove from all collections
functionality. That meant that even when we were still to keep the object in one
of the collections we would clear its rigid body data.
Now why to even remove the rigidbody data when removing an object from all
collections? That mimics the 2.79 behaviour when we were to unlink an
object from a scene. I suspect it has to do with the rigid body data
being tied to the scene rigid body. Which is a strange design anyways
(add to the list?) since an object can be in more than one scene.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index e6937c35648..2cbce902b94 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -603,7 +603,9 @@ static bool scene_collections_object_remove(Main *bmain, Scene *scene, Object *o { bool removed = false; - BKE_scene_remove_rigidbody_object(bmain, scene, ob); + if (collection_skip == NULL) { + BKE_scene_remove_rigidbody_object(bmain, scene, ob); + } FOREACH_SCENE_COLLECTION_BEGIN(scene, collection) { |