From 438b93dccc1fb2bdce94978741e8247747736b8f Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 21 Feb 2010 14:13:20 +0000 Subject: [#21265] Rotate behaves wrong with constraints With new axis var for rotate, it wasn't reset properly when constraints are turned off. --- source/blender/editors/transform/transform.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/transform') 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); -- cgit v1.2.3