[Bf-blender-cvs] [81210103104] blender2.8: Transform: default constraint to user orientation
Campbell Barton
noreply at git.blender.org
Tue Jul 10 06:59:13 CEST 2018
Commit: 81210103104980c9052de491a0b4defd003c2d1e
Author: Campbell Barton
Date: Tue Jul 10 06:54:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB81210103104980c9052de491a0b4defd003c2d1e
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.
===================================================================
M source/blender/editors/transform/transform.c
===================================================================
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);
}
}
}
More information about the Bf-blender-cvs
mailing list