diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-01-04 01:15:59 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-01-04 01:15:59 +0300 |
commit | ecc5f17e4d58fffd6fe5838847514d85ff629179 (patch) | |
tree | 850c33511c7b13aa3ccaba59e90a973bc2bcd0ef /source/blender/editors/transform/transform_constraints.c | |
parent | 166d957c5af04fb4fa82cdea1a4a110f1363bd3d (diff) |
2.5
Transform operator replay
Basic support working. Only saves mode and values, not constraint setup.
Removed event pointer from TransInfo (it's not available in operator exec). Replaced checks to event->modifiers to a functional modifier bitfield in TransInfo (that is, instead of checking for Shift, it checks for MOD_PRECISION) to make it remappable later.
Misc:
X-Mirror for mesh now working with transform
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index cdde416ef9a..c2a53b8a3d9 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -906,7 +906,6 @@ static void setNearestAxis2d(TransInfo *t) static void setNearestAxis3d(TransInfo *t) { - wmEvent *event = t->event; float zfac; float mvec[3], axis[3], proj[3]; float len[3]; @@ -950,7 +949,7 @@ static void setNearestAxis3d(TransInfo *t) } if (len[0] <= len[1] && len[0] <= len[2]) { - if (event->shift) { + if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS1|CON_AXIS2); sprintf(t->con.text, " locking %s X axis", t->spacename); } @@ -960,7 +959,7 @@ static void setNearestAxis3d(TransInfo *t) } } else if (len[1] <= len[0] && len[1] <= len[2]) { - if (event->shift) { + if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0|CON_AXIS2); sprintf(t->con.text, " locking %s Y axis", t->spacename); } @@ -970,7 +969,7 @@ static void setNearestAxis3d(TransInfo *t) } } else if (len[2] <= len[1] && len[2] <= len[0]) { - if (event->shift) { + if (t->modifiers & MOD_CONSTRAINT_PLANE) { t->con.mode |= (CON_AXIS0|CON_AXIS1); sprintf(t->con.text, " locking %s Z axis", t->spacename); } |