diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-10-09 11:49:54 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-10-09 11:49:54 +0400 |
commit | 088c3083a31df87540f0cae319a5b86155c0efc0 (patch) | |
tree | eb6738e16c02a93286f84286ca90c5baa877f8e3 /source/blender/src | |
parent | f9535b4eb59226b406d5132aa4d2091991c2f235 (diff) |
Bugfix:
When transforming on one axis in a 2d-editor, it no longer mentions 'global' in the header print.
Un-related note: the mmb constraint selection in 2d-editors is currently quite wonky, as the current code for this only suits the 3d-view.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/transform.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 5cbea044f9d..a5099dbd042 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -604,11 +604,11 @@ static void transformEvent(unsigned short event, short val) { Trans.flag |= T_SHIFT_MOD; Trans.redraw = 1; break; - + case SPACEKEY: if ((Trans.spacetype==SPACE_VIEW3D) && (G.qual & LR_ALTKEY)) { short mval[2]; - + getmouseco_sc(mval); BIF_selectOrientation(); calc_manipulator_stats(curarea); @@ -619,7 +619,7 @@ static void transformEvent(unsigned short event, short val) { Trans.state = TRANS_CONFIRM; } break; - + case MIDDLEMOUSE: if ((Trans.flag & T_NO_CONSTRAINT)==0) { @@ -723,10 +723,15 @@ static void transformEvent(unsigned short event, short val) { } } else { - if (G.qual == 0) - setConstraint(&Trans, mati, (CON_AXIS0), "along global X"); - else if ((G.qual == LR_SHIFTKEY) && ((Trans.flag & T_2D_EDIT)==0)) - setConstraint(&Trans, mati, (CON_AXIS1|CON_AXIS2), "locking global X"); + if (Trans.flag & T_2D_EDIT) { + setConstraint(&Trans, mati, (CON_AXIS0), "along X axis"); + } + else { + if (G.qual == 0) + setConstraint(&Trans, mati, (CON_AXIS0), "along global X"); + else if (G.qual == LR_SHIFTKEY) + setConstraint(&Trans, mati, (CON_AXIS1|CON_AXIS2), "locking global X"); + } } Trans.redraw = 1; } @@ -750,10 +755,15 @@ static void transformEvent(unsigned short event, short val) { } } else { - if (G.qual == 0) - setConstraint(&Trans, mati, (CON_AXIS1), "along global Y"); - else if ((G.qual == LR_SHIFTKEY) && ((Trans.flag & T_2D_EDIT)==0)) - setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS2), "locking global Y"); + if (Trans.flag & T_2D_EDIT) { + setConstraint(&Trans, mati, (CON_AXIS1), "along Y axis"); + } + else { + if (G.qual == 0) + setConstraint(&Trans, mati, (CON_AXIS1), "along global Y"); + else if (G.qual == LR_SHIFTKEY) + setConstraint(&Trans, mati, (CON_AXIS0|CON_AXIS2), "locking global Y"); + } } Trans.redraw = 1; } |