Transform: default constraint to user orientation
Previously global was always used before the current orientation, the order is now reversed, which assumes the user wants to first use the value they set, with the global secondary.
This commit is contained in:
parent
8a816fd3bc
commit
8121010310
Notes:
blender-bot
2023-02-14 06:54:28 +01:00
Referenced by commit 64d40c82c3
, Revert "Transform: default constraint to user orientation"
|
@ -1036,12 +1036,12 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
|
|||
}
|
||||
else if (!edit_2d) {
|
||||
if (cmode == axis) {
|
||||
if (t->con.orientation != V3D_MANIP_GLOBAL) {
|
||||
if (t->con.orientation != t->current_orientation) {
|
||||
stopConstraint(t);
|
||||
}
|
||||
else {
|
||||
short orientation = (t->current_orientation != V3D_MANIP_GLOBAL ?
|
||||
t->current_orientation : V3D_MANIP_LOCAL);
|
||||
const short orientation = (
|
||||
(t->current_orientation != V3D_MANIP_GLOBAL) ? V3D_MANIP_GLOBAL : V3D_MANIP_LOCAL);
|
||||
if (is_plane == false) {
|
||||
setUserConstraint(t, orientation, constraint_axis, msg2);
|
||||
}
|
||||
|
@ -1052,10 +1052,10 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
|
|||
}
|
||||
else {
|
||||
if (is_plane == false) {
|
||||
setUserConstraint(t, V3D_MANIP_GLOBAL, constraint_axis, msg2);
|
||||
setUserConstraint(t, t->current_orientation, constraint_axis, msg2);
|
||||
}
|
||||
else {
|
||||
setUserConstraint(t, V3D_MANIP_GLOBAL, constraint_plane, msg3);
|
||||
setUserConstraint(t, t->current_orientation, constraint_plane, msg3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue