From ea77584d36b0e1e495f1a5b0d294752069bc2cbe Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 30 Apr 2020 08:52:38 -0300 Subject: Fix orientation change in Redo Some transform redo operations require contraint to be enabled. Issue introduced in rBc57e4418bb85. --- source/blender/editors/transform/transform.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 26f108cbf33..843c60ec87c 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1746,11 +1746,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) } if ((prop = RNA_struct_find_property(op->ptr, "constraint_axis"))) { - if (t->con.mode & CON_APPLY) { - bool constraint_axis[3] = {false, false, false}; - if (t->idx_max == 0) { - /* Only set if needed, so we can hide in the UI when nothing is set. - * See 'transform_poll_property'. */ + bool constraint_axis[3] = {false, false, false}; + if (t->idx_max == 0) { + if (t->con.mode & CON_APPLY) { if (t->con.mode & CON_AXIS0) { constraint_axis[0] = true; } @@ -1760,16 +1758,17 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (t->con.mode & CON_AXIS2) { constraint_axis[2] = true; } + RNA_property_boolean_set_array(op->ptr, prop, constraint_axis); } else { - constraint_axis[0] = true; - constraint_axis[1] = true; - constraint_axis[2] = true; + RNA_property_unset(op->ptr, prop); } - RNA_property_boolean_set_array(op->ptr, prop, constraint_axis); } else { - RNA_property_unset(op->ptr, prop); + constraint_axis[0] = true; + constraint_axis[1] = true; + constraint_axis[2] = true; + RNA_property_boolean_set_array(op->ptr, prop, constraint_axis); } } -- cgit v1.2.3