[#21265] Rotate behaves wrong with constraints

With new axis var for rotate, it wasn't reset properly when constraints are turned off.
This commit is contained in:
Martin Poirier
2010-02-21 14:13:20 +00:00
parent 0cc59b9bb7
commit 438b93dccc

View File

@@ -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);