From 233348197ef8ade459fd6b35fad5fd889d7e88cd Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 4 Jun 2006 18:38:58 +0000 Subject: [PATCH] === Bug Fix === [ #4272 ] Camera zooming problem Move the camera in camera view could block inexplicably sometimes. Was a silly programmation error that any competant compiler should have given a warning for. Alas, I'm using gcc... --- source/blender/src/transform_constraints.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 5e87e92aaef..fee5e5928da 100755 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include @@ -173,7 +174,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 - abs(Inpf(axis, t->viewinv[2])) < 0.000001f) { + if(1.0f - fabs(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 */