diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-04-15 12:37:18 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-04-15 16:23:35 +0300 |
commit | bcefceb200585c97afc975485b92ceb2e5a92a72 (patch) | |
tree | 29b99f82cebc4e299c4b5c64c77129c9dbc681fa /source/blender/editors/object | |
parent | 8d3af588a23734c59f22a6feebe2d10f1a281875 (diff) |
Fix T63598: "child of" constraint "set/clear inverse" ops not working
was missing DEG updates
Reviewers: sergey
Maniphest Tasks: T63598
Differential Revision: https://developer.blender.org/D4685
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index c47338e3131..988d9373766 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -884,6 +884,7 @@ static void child_get_inverse_matrix(const bContext *C, Scene *scene, Object *ob /* ChildOf Constraint - set inverse callback */ static int childof_set_inverse_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Object *ob = ED_object_active_context(C); bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_CHILDOF); @@ -899,6 +900,7 @@ static int childof_set_inverse_exec(bContext *C, wmOperator *op) child_get_inverse_matrix(C, scene, ob, con, data->invmat, owner); + ED_object_constraint_update(bmain, ob); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); return OPERATOR_FINISHED; @@ -934,6 +936,7 @@ void CONSTRAINT_OT_childof_set_inverse(wmOperatorType *ot) /* ChildOf Constraint - clear inverse callback */ static int childof_clear_inverse_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Object *ob = ED_object_active_context(C); bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_CHILDOF); bChildOfConstraint *data = (con) ? (bChildOfConstraint *)con->data : NULL; @@ -946,6 +949,7 @@ static int childof_clear_inverse_exec(bContext *C, wmOperator *op) /* simply clear the matrix */ unit_m4(data->invmat); + ED_object_constraint_update(bmain, ob); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); return OPERATOR_FINISHED; |