Fixed a bug where From Window mapping in perspective view would give strange
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 3 May 2004 13:23:19 +0000 (13:23 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 3 May 2004 13:23:19 +0000 (13:23 +0000)
results, caused by a little typo. The solution was proposed by bjornmose.

source/blender/src/editface.c

index ee35b916019d82cff706b7515e3d039f9c546bc3..96672ab6b2e3116eeed57fa17f16356b22250fdb 100644 (file)
@@ -219,7 +219,7 @@ static void uv_calc_shift_project(float *target, float *shift, float rotmat[][4]
 
                /* almost project_short */
            Mat4MulVec4fl(G.vd->persmat,pv4);
-               if (fabs(pv[3]) > 0.00001) { /* avoid division by zero */
+               if (fabs(pv4[3]) > 0.00001) { /* avoid division by zero */
                        target[0] = dx/2.0 + (dx/2.0)*pv4[0]/pv4[3];
                        target[1] = dy/2.0 + (dy/2.0)*pv4[1]/pv4[3];
                }