Small transform fixes.

Rotation acted weird in perspective mode. Works much better using viewinv
instead of persinv to get the rotation axis. What would be even better is
using real view vector depending on transformation center (with
getViewVector), but that can wait a bit.

Meta Element resize needed some code to reset radius changes or axis size
changes when switching from one to the other (my fault, I didn't think of this
when telling Jiri how to implement it).
This commit is contained in:
2005-04-11 21:19:38 +00:00
parent 78939c0cc0
commit a3e5727f75

View File

@@ -1022,9 +1022,18 @@ int Resize(TransInfo *t, short mval[2])
}
else if((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)){
/* scale val and reset size */
*td->val = td->ival * fsize[0] * td->factor;
}
td->ext->size[0] = td->ext->isize[0];
td->ext->size[1] = td->ext->isize[1];
td->ext->size[2] = td->ext->isize[2];
}
else {
/* Reset val if SINGLESIZE but using a constraint */
if (td->flag & TD_SINGLESIZE)
*td->val = td->ival;
td->ext->size[0] = td->ext->isize[0] * (fsize[0]) * td->factor;
td->ext->size[1] = td->ext->isize[1] * (fsize[1]) * td->factor;
td->ext->size[2] = td->ext->isize[2] * (fsize[2]) * td->factor;
@@ -1324,7 +1333,8 @@ int Rotation(TransInfo *t, short mval[2])
float axis[3];
float mat[3][3];
VECCOPY(axis, t->persinv[2]);
VECCOPY(axis, t->viewinv[2]);
VecMulf(axis, -1.0f);
Normalise(axis);
dphi = saacos(deler);