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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-12-19 16:43:04 +0300
committerAntony Riakiotakis <kalast@gmail.com>2014-12-19 16:43:29 +0300
commit3b639b8b3d7742213559d028a23cfc664a13c013 (patch)
treed6787aa1a4777ac269b7c1f05690476fccc72178 /source
parent3e0ff35b4b1bc9151206b250740031baea0f9204 (diff)
Minor cleanup to previous commit
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3bd4362de65..0e337e96336 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;