diff options
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 19 |
1 files changed, 9 insertions, 10 deletions
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); } } |