forked from bartvdbraak/blender
Fix T42354 modal transform map not cycling through local/global
orientation properly Patch by Phillip Oeser, thanks!
This commit is contained in:
parent
3b7794dab7
commit
dbea73a30f
@ -1125,47 +1125,22 @@ int transformEvent(TransInfo *t, const wmEvent *event)
|
|||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
case TFM_MODAL_AXIS_X:
|
case TFM_MODAL_AXIS_X:
|
||||||
if ((t->flag & T_NO_CONSTRAINT) == 0) {
|
if (!(t->flag & T_NO_CONSTRAINT)) {
|
||||||
if (cmode == 'X') {
|
transform_event_xyz_constraint(t, XKEY, cmode);
|
||||||
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"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t->redraw |= TREDRAW_HARD;
|
t->redraw |= TREDRAW_HARD;
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TFM_MODAL_AXIS_Y:
|
case TFM_MODAL_AXIS_Y:
|
||||||
if ((t->flag & T_NO_CONSTRAINT) == 0) {
|
if ((t->flag & T_NO_CONSTRAINT) == 0) {
|
||||||
if (cmode == 'Y') {
|
transform_event_xyz_constraint(t, YKEY, cmode);
|
||||||
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"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t->redraw |= TREDRAW_HARD;
|
t->redraw |= TREDRAW_HARD;
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TFM_MODAL_AXIS_Z:
|
case TFM_MODAL_AXIS_Z:
|
||||||
if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) {
|
if ((t->flag & (T_NO_CONSTRAINT)) == 0) {
|
||||||
if (cmode == 'Z') {
|
transform_event_xyz_constraint(t, ZKEY, cmode);
|
||||||
stopConstraint(t);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setUserConstraint(t, t->current_orientation, (CON_AXIS2), IFACE_("along %s Z"));
|
|
||||||
}
|
|
||||||
t->redraw |= TREDRAW_HARD;
|
t->redraw |= TREDRAW_HARD;
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user