Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2005-05-18 10:13:50 +0400
committerMartin Poirier <theeth@yahoo.com>2005-05-18 10:13:50 +0400
commit1b3498b3f33631e5c68e15939297927474462831 (patch)
tree45bf369301d6e90442f0f380ee0cf27cec17a688
parent6356b6e8bdedd48b24d8ee706612c3de1cb15344 (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.
-rwxr-xr-xsource/blender/src/transform_constraints.c4
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);