Commit: 3b639b8b3d7742213559d028a23cfc664a13c013
Author: Antony Riakiotakis
Date:   Fri Dec 19 14:43:04 2014 +0100
Branches: master
https://developer.blender.org/rB3b639b8b3d7742213559d028a23cfc664a13c013

Minor cleanup to previous commit

===================================================================

M       source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c 
b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3bd4362..0e337e9 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1969,7 +1969,6 @@ static void line_rect_clip(
         const float uv1[2], const float uv2[2],
         float uv[2], bool is_ortho)
 {
-       float p[2];
        float min = FLT_MAX, tmp;
        if ((l1[0] - rect->xmin) * (l2[0] - rect->xmin) < 0) {
                tmp = rect->xmin;
@@ -1988,11 +1987,10 @@ static void line_rect_clip(
                min = min_ff((tmp - l1[1]) / (l2[1] - l1[1]), min);
        }
        
-       p[0] = min;
-       p[1] = (is_ortho) ? 1.0f : (l1[3] + p[0] * (l2[3] - l1[3]));
+       tmp = (is_ortho) ? 1.0f : (l1[3] + min * (l2[3] - l1[3]));
        
-       uv[0] = (uv1[0] + p[0] * (uv2[0] - uv1[0])) / p[1];
-       uv[1] = (uv1[1] + p[0] * (uv2[1] - uv1[1])) / p[1];
+       uv[0] = (uv1[0] + min * (uv2[0] - uv1[0])) / tmp;
+       uv[1] = (uv1[1] + min * (uv2[1] - uv1[1])) / tmp;
 }
 
 
@@ -2891,7 +2889,7 @@ static bool project_bucket_face_isect(ProjPaintState *ps, 
int bucket_x, int buck
        int fidx;
 
        project_bucket_bounds(ps, bucket_x, bucket_y, &bucket_bounds);
-
+       
        /* Is one of the faces verts in the bucket bounds? */
 
        fidx = mf->v4 ? 3 : 2;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to