From d91916725d0d20f95c6d4c069428bd1076680087 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 1 Sep 2014 12:35:10 +0200 Subject: 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. --- source/blender/editors/sculpt_paint/paint_image_proj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source') 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) -- cgit v1.2.3