diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-04-12 01:19:38 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-04-12 01:19:38 +0400 |
commit | a3e5727f754b5a744968760be0949d179447c380 (patch) | |
tree | 1423834a73e4e7c947f03276e66c0b49a8e93d15 /source/blender/src/transform.c | |
parent | 78939c0cc06a67dbf2853ed7d030b9829b812e3f (diff) |
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).
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-x | source/blender/src/transform.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 525fea4ba3e..f8d42600cbb 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -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); |