diff options
-rw-r--r-- | source/blender/editors/transform/transform.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.h | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 30 |
3 files changed, 6 insertions, 29 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 68d8c46d1dd..11f0e791d14 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -972,7 +972,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) break; case TFM_MODAL_PLANE_X: if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) { - t->modifiers |= MOD_CONSTRAINT_PLANE; transform_event_xyz_constraint(t, EVT_XKEY, true); t->redraw |= TREDRAW_HARD; handled = true; @@ -980,7 +979,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) break; case TFM_MODAL_PLANE_Y: if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) { - t->modifiers |= MOD_CONSTRAINT_PLANE; transform_event_xyz_constraint(t, EVT_YKEY, true); t->redraw |= TREDRAW_HARD; handled = true; @@ -988,7 +986,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) break; case TFM_MODAL_PLANE_Z: if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) { - t->modifiers |= MOD_CONSTRAINT_PLANE; transform_event_xyz_constraint(t, EVT_ZKEY, true); t->redraw |= TREDRAW_HARD; handled = true; @@ -1209,7 +1206,6 @@ int transformEvent(TransInfo *t, const wmEvent *event) /* Disable modifiers. */ int modifiers = t->modifiers; modifiers &= ~MOD_CONSTRAINT_SELECT; - modifiers &= ~MOD_CONSTRAINT_PLANE; if (modifiers != t->modifiers) { if (t->modifiers & MOD_CONSTRAINT_SELECT) { postSelectConstraint(t); diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 1eaebeff64f..1e4992e5f1a 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -497,7 +497,6 @@ enum { MOD_PRECISION = 1 << 1, MOD_SNAP = 1 << 2, MOD_SNAP_INVERT = 1 << 3, - MOD_CONSTRAINT_PLANE = 1 << 4, }; /* use node center for transform instead of upper-left corner. diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 8a132f89b1c..8fdee0e8eec 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -1079,34 +1079,16 @@ static void setNearestAxis3d(TransInfo *t) } if (len[0] <= len[1] && len[0] <= len[2]) { - if (t->modifiers & MOD_CONSTRAINT_PLANE) { - t->con.mode |= (CON_AXIS1 | CON_AXIS2); - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s X axis"), t->spacename); - } - else { - t->con.mode |= CON_AXIS0; - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s X axis"), t->spacename); - } + t->con.mode |= CON_AXIS0; + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s X axis"), t->spacename); } else if (len[1] <= len[0] && len[1] <= len[2]) { - if (t->modifiers & MOD_CONSTRAINT_PLANE) { - t->con.mode |= (CON_AXIS0 | CON_AXIS2); - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Y axis"), t->spacename); - } - else { - t->con.mode |= CON_AXIS1; - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Y axis"), t->spacename); - } + t->con.mode |= CON_AXIS1; + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Y axis"), t->spacename); } else if (len[2] <= len[1] && len[2] <= len[0]) { - if (t->modifiers & MOD_CONSTRAINT_PLANE) { - t->con.mode |= (CON_AXIS0 | CON_AXIS1); - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Z axis"), t->spacename); - } - else { - t->con.mode |= CON_AXIS2; - BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Z axis"), t->spacename); - } + t->con.mode |= CON_AXIS2; + BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Z axis"), t->spacename); } } |