diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-02-21 17:13:20 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-02-21 17:13:20 +0300 |
commit | 438b93dccc1fb2bdce94978741e8247747736b8f (patch) | |
tree | bb614a9ccb0468f0cc35ee1bd6121555c7cc0025 /source/blender/editors/transform | |
parent | 0cc59b9bb7d46a5a8a7e4c9cf88bfe794a0c675b (diff) |
[#21265] Rotate behaves wrong with constraints
With new axis var for rotate, it wasn't reset properly when constraints are turned off.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 5ff80a62cee..df0d43f4319 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2963,8 +2963,13 @@ int Rotation(TransInfo *t, short mval[2]) snapGrid(t, &final); - if (t->con.applyRot) { + if ((t->con.mode & CON_APPLY) && t->con.applyRot) { t->con.applyRot(t, NULL, t->axis, &final); + } else { + /* reset axis if constraint is not set */ + VECCOPY(t->axis, t->viewinv[2]); + mul_v3_fl(t->axis, -1.0f); + normalize_v3(t->axis); } applySnapping(t, &final); |