Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Dick <weasel>2021-09-10 19:48:41 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-09-10 19:49:18 +0300
commit28f773925af01c1d9d23e58c7cce49efdc0b65a7 (patch)
tree61b290e9a197f15f31bfd43bf7e40443694ec190
parent6b7b4f8e573afa183c8b7d2f41521bc6ab9e5f36 (diff)
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
-rw-r--r--source/blender/editors/object/object_constraint.c4
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 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;
}