From 28f773925af01c1d9d23e58c7cce49efdc0b65a7 Mon Sep 17 00:00:00 2001 From: Henrik Dick Date: Fri, 10 Sep 2021 18:48:41 +0200 Subject: Fix Constraints not updating on move in stack Flag the changed object and its bones to update after moving a constraint in the stack up or down. The two operators for move up and move down seem to be unused, but I notices they had the same problem, so I added the update there as well. Reviewed By: sybren Differential Revision: https://developer.blender.org/D12174 --- source/blender/editors/object/object_constraint.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e0419e0a4cc..c46e868899c 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1862,6 +1862,7 @@ static int constraint_move_down_exec(bContext *C, wmOperator *op) BLI_remlink(conlist, con); BLI_insertlinkafter(conlist, nextCon, con); + ED_object_constraint_update(CTX_data_main(C), ob); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); return OPERATOR_FINISHED; @@ -1917,6 +1918,7 @@ static int constraint_move_up_exec(bContext *C, wmOperator *op) BLI_remlink(conlist, con); BLI_insertlinkbefore(conlist, prevCon, con); + ED_object_constraint_update(CTX_data_main(C), ob); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); return OPERATOR_FINISHED; @@ -1970,6 +1972,8 @@ static int constraint_move_to_index_exec(bContext *C, wmOperator *op) if (con) { ED_object_constraint_move_to_index(ob, con, new_index); + ED_object_constraint_update(CTX_data_main(C), ob); + return OPERATOR_FINISHED; } -- cgit v1.2.3