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>2006-04-11 03:20:18 +0400
committerMartin Poirier <theeth@yahoo.com>2006-04-11 03:20:18 +0400
commitaab49dff0e7bce08762874a51df0ee86541bb85f (patch)
treeb3cb5c4d8760e2db8e264a8f6d8755912b564990 /source/blender/src/transform_constraints.c
parent8f20f587ad5fe9e5c494729b562443b19003b0f3 (diff)
=== Transform Constraining ===
Bug #3733 Constraining on a perpendicular axis was broken on (half - 1) cases. Silly oversight on my side which didn't turn out in the test case (moving camera in and out) and only appeared in front view (not side nor top) because of positive reasons. Frankly, I still think translating an object perpendicular to the viewport is a bit silly, but now, at least, people can be silly in a predictable fashion.
Diffstat (limited to 'source/blender/src/transform_constraints.c')
-rwxr-xr-xsource/blender/src/transform_constraints.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c
index c9b0a4c61b1..5e87e92aaef 100755
--- a/source/blender/src/transform_constraints.c
+++ b/source/blender/src/transform_constraints.c
@@ -173,7 +173,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
/* For when view is parallel to constraint... will cause NaNs otherwise
So we take vertical motion in 3D space and apply it to the
constraint axis. Nice for camera grab + MMB */
- if(1.0f - Inpf(axis, t->viewinv[2]) < 0.000001f) {
+ if(1.0f - abs(Inpf(axis, t->viewinv[2])) < 0.000001f) {
Projf(vec, in, t->viewinv[1]);
factor = Inpf(t->viewinv[1], vec) * 2.0f;
/* since camera distance is quite relative, use quadratic relationship. holding shift can compensate */