diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-10-23 16:16:36 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-10-23 16:16:36 +0400 |
commit | dbea73a30fc60f54449302a131a9d858f0c28bba (patch) | |
tree | 6ab74bfb472e1a660a754e7c828953cccc4a8c32 /source | |
parent | 3b7794dab727897967abd829562c2328900225cf (diff) |
Fix T42354 modal transform map not cycling through local/global
orientation properly
Patch by Phillip Oeser, thanks!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform.c | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 24499688835..068fce106a3 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1125,47 +1125,22 @@ int transformEvent(TransInfo *t, const wmEvent *event) handled = true; break; case TFM_MODAL_AXIS_X: - if ((t->flag & T_NO_CONSTRAINT) == 0) { - if (cmode == 'X') { - stopConstraint(t); - } - else { - if (t->flag & T_2D_EDIT) { - setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS0), IFACE_("along X")); - } - else { - setUserConstraint(t, t->current_orientation, (CON_AXIS0), IFACE_("along %s X")); - } - } + if (!(t->flag & T_NO_CONSTRAINT)) { + transform_event_xyz_constraint(t, XKEY, cmode); t->redraw |= TREDRAW_HARD; handled = true; } break; case TFM_MODAL_AXIS_Y: if ((t->flag & T_NO_CONSTRAINT) == 0) { - if (cmode == 'Y') { - stopConstraint(t); - } - else { - if (t->flag & T_2D_EDIT) { - setUserConstraint(t, V3D_MANIP_GLOBAL, (CON_AXIS1), IFACE_("along Y")); - } - else { - setUserConstraint(t, t->current_orientation, (CON_AXIS1), IFACE_("along %s Y")); - } - } + transform_event_xyz_constraint(t, YKEY, cmode); t->redraw |= TREDRAW_HARD; handled = true; } break; case TFM_MODAL_AXIS_Z: - if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) { - if (cmode == 'Z') { - stopConstraint(t); - } - else { - setUserConstraint(t, t->current_orientation, (CON_AXIS2), IFACE_("along %s Z")); - } + if ((t->flag & (T_NO_CONSTRAINT)) == 0) { + transform_event_xyz_constraint(t, ZKEY, cmode); t->redraw |= TREDRAW_HARD; handled = true; } |