diff options
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/rigidbody_constraint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/physics/rigidbody_object.c | 1 |
2 files changed, 6 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); diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index bdfbc47b22f..6ea0212199e 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -125,6 +125,7 @@ bool ED_rigidbody_object_add(Main *bmain, Scene *scene, Object *ob, int type, Re DEG_relations_tag_update(bmain); DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&rbw->group->id, DEG_TAG_COPY_ON_WRITE); return true; } |