diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-20 18:43:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-20 19:12:48 +0300 |
commit | e1dff01e2945918a59e52fee38402292b7fa58cf (patch) | |
tree | 9e36242924bee0d3cd347259dccabb2f2a5b8c40 /source/blender/editors/physics/rigidbody_constraint.c | |
parent | 0d0d8935a53974c2c4603f97e41189daf4e4d47b (diff) |
Depsgraph: add some missing depsgraph tags when relations change.
Diffstat (limited to 'source/blender/editors/physics/rigidbody_constraint.c')
-rw-r--r-- | source/blender/editors/physics/rigidbody_constraint.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c index f62b72679d0..1b6325e31bf 100644 --- a/source/blender/editors/physics/rigidbody_constraint.c +++ b/source/blender/editors/physics/rigidbody_constraint.c @@ -94,6 +94,8 @@ bool ED_rigidbody_constraint_add(Main *bmain, Scene *scene, Object *ob, int type DEG_relations_tag_update(bmain); DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&rbw->constraints->id, DEG_TAG_COPY_ON_WRITE); + return true; } @@ -102,8 +104,10 @@ void ED_rigidbody_constraint_remove(Main *bmain, Scene *scene, Object *ob) RigidBodyWorld *rbw = BKE_rigidbody_get_world(scene); BKE_rigidbody_remove_constraint(scene, ob); - if (rbw) + if (rbw) { BKE_collection_object_remove(bmain, rbw->constraints, ob, false); + DEG_id_tag_update(&rbw->constraints->id, DEG_TAG_COPY_ON_WRITE); + } DEG_relations_tag_update(bmain); DEG_id_tag_update(&ob->id, OB_RECALC_OB); |