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:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-06-19 15:57:07 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-06-19 16:40:25 +0300
commit96e6fd3b607ced947b593f7f0f3133a917d6d113 (patch)
tree7bfe8b12ec89764325c3c4ea5cc9d7793453e672 /source/blender/editors/physics
parentab1beb9744254475a4b19d4648af2bb438f70ae9 (diff)
Remove rigid body from rbw->group when deleting
I moved some code from ED_rigidbody_object_remove() to BKE_rigidbody_remove_object(), so that calling the latter doesn't leave the object in rbw->group (causing a crash later on when rebuilding the depsgraph).
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/rigidbody_object.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index c2bcb55c3bb..bdfbc47b22f 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -131,11 +131,7 @@ bool ED_rigidbody_object_add(Main *bmain, Scene *scene, Object *ob, int type, Re
void ED_rigidbody_object_remove(Main *bmain, Scene *scene, Object *ob)
{
- RigidBodyWorld *rbw = BKE_rigidbody_get_world(scene);
-
- BKE_rigidbody_remove_object(scene, ob);
- if (rbw)
- BKE_collection_object_remove(bmain, rbw->group, ob, false);
+ BKE_rigidbody_remove_object(bmain, scene, ob);
DEG_relations_tag_update(bmain);
DEG_id_tag_update(&ob->id, OB_RECALC_OB);