diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-10 07:54:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-10 07:58:43 +0300 |
commit | 81210103104980c9052de491a0b4defd003c2d1e (patch) | |
tree | 8cc544277a00e177e4cac4723f937c6a2d6f25cb /source/blender/editors/transform/transform.c | |
parent | 8a816fd3bc1eabbdd13c4d75edbfef58c1e91cdb (diff) |
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.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index d0934e0acb0..b2fa363007f 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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); } } } |