diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-05-18 10:13:50 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-05-18 10:13:50 +0400 |
commit | 1b3498b3f33631e5c68e15939297927474462831 (patch) | |
tree | 45bf369301d6e90442f0f380ee0cf27cec17a688 /source/blender/src/transform_constraints.c | |
parent | 6356b6e8bdedd48b24d8ee706612c3de1cb15344 (diff) |
Fixing MMB selection code for good.
zfac needed to be inverted to be used properly. Works for extreme close ups and extreme zoom out.
Diffstat (limited to 'source/blender/src/transform_constraints.c')
-rwxr-xr-x | source/blender/src/transform_constraints.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index e08a62fff8a..e60d6c962e2 100755 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -846,7 +846,7 @@ void setNearestAxis(TransInfo *t) Vector is made 30 pixels long, which is fine for accurate axis choosing. (ton) */ zfac= G.vd->persmat[0][3]*t->center[0]+ G.vd->persmat[1][3]*t->center[1]+ G.vd->persmat[2][3]*t->center[2]+ G.vd->persmat[3][3]; - zfac= 30.0*zfac/(float)curarea->winx; + zfac= (float)curarea->winx/30.0f*zfac; for (i = 0; i<3; i++) { VECCOPY(axis, t->con.mtx[i]); @@ -860,7 +860,7 @@ void setNearestAxis(TransInfo *t) axis[1] = (float)(coord[1] - t->center2d[1]); axis[2] = 0.0f; - if (Normalise(axis) != 0.0f) { + if (Normalise(axis) != 0.0f) { Projf(proj, mvec, axis); VecSubf(axis, mvec, proj); len[i] = Normalise(axis); |