diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-09-01 14:35:10 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-09-01 14:35:10 +0400 |
commit | d91916725d0d20f95c6d4c069428bd1076680087 (patch) | |
tree | 7d632f92de96fdd038f49cc601abe734494479e5 /source | |
parent | 35bc266de7c8e4b3e8904adfec0128af4bf9051e (diff) |
Fix T41620
Issue here is that indices of edges will be incorrect when index of
vertices forming the edge is 3-0 or 2-0.
There are still issues here at uv edges where seam polygons intersect
each other but to solve that we need a better pass that detects uv edges
and pushes polygons along the "normal" of the edge instead of scaling
the polygon itself.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index a6cbe1f92b2..bdacfd23ae0 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -952,7 +952,9 @@ static bool check_seam(const ProjPaintState *ps, /* set up the other face */ *other_face = face_index; - *orig_fidx = (i1_fidx < i2_fidx) ? i1_fidx : i2_fidx; + + /* we check if difference is 1 here, else we might have a case of edge 2-0 or 3-0 for quads */ + *orig_fidx = (i1_fidx < i2_fidx && (i2_fidx - i1_fidx == 1)) ? i1_fidx : i2_fidx; /* initialize face winding if needed */ if ((ps->faceWindingFlags[face_index] & PROJ_FACE_WINDING_INIT) == 0) |