[Bf-blender-cvs] [2ccbdec] master: Transform: PET only treat faces as connected diagonally across quads

Campbell Barton noreply at git.blender.org
Wed Jun 18 07:50:09 CEST 2014


Commit: 2ccbdec6e5c1cb97e19a142dfe5c1255e8ec3bf0
Author: Campbell Barton
Date:   Wed Jun 18 15:16:01 2014 +1000
https://developer.blender.org/rB2ccbdec6e5c1cb97e19a142dfe5c1255e8ec3bf0

Transform: PET only treat faces as connected diagonally across quads

Was an intentional change, but worse for concave ngons, resolves T40675

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index d582a0c..72ac4ad 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1916,20 +1916,16 @@ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float
 				}
 			}
 			
-			/* connected face-verts (excluding adjacent verts) */
+			/* imaginary edge diagonally across quad */
 			BM_ITER_ELEM (l, &iter, v, BM_LOOPS_OF_VERT) {
-				if ((BM_elem_flag_test(l->f, BM_ELEM_HIDDEN) == 0) && (l->f->len > 3)) {
-					BMLoop *l_end = l->prev;
-					l = l->next->next;
-					do {
-						BMVert *v_other = l->v;
-						if (bmesh_test_dist_add(v, v_other, dists, dists_prev, mtx)) {
-							if (BM_elem_flag_test(v_other, BM_ELEM_TAG) == 0) {
-								BM_elem_flag_enable(v_other, BM_ELEM_TAG);
-								BLI_LINKSTACK_PUSH(queue_next, v_other);
-							}
+				if ((BM_elem_flag_test(l->f, BM_ELEM_HIDDEN) == 0) && (l->f->len == 4)) {
+					BMVert *v_other = l->next->next->v;
+					if (bmesh_test_dist_add(v, v_other, dists, dists_prev, mtx)) {
+						if (BM_elem_flag_test(v_other, BM_ELEM_TAG) == 0) {
+							BM_elem_flag_enable(v_other, BM_ELEM_TAG);
+							BLI_LINKSTACK_PUSH(queue_next, v_other);
 						}
-					} while ((l = l->next) != l_end);
+					}
 				}
 			}
 		}




More information about the Bf-blender-cvs mailing list