From bcefceb200585c97afc975485b92ceb2e5a92a72 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 15 Apr 2019 11:37:18 +0200 Subject: 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 --- source/blender/editors/object/object_constraint.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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; -- cgit v1.2.3