[Bf-blender-cvs] [1247f609d49] master: Correct last commit

Campbell Barton noreply at git.blender.org
Thu May 18 13:46:23 CEST 2017


Commit: 1247f609d49c4766619e6d82f7e1cd7935b78afe
Author: Campbell Barton
Date:   Thu May 18 21:48:52 2017 +1000
Branches: master
https://developer.blender.org/rB1247f609d49c4766619e6d82f7e1cd7935b78afe

Correct last commit

VERT_VISIT was used in a nested function.

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

M	source/blender/bmesh/intern/bmesh_polygon_edgenet.c

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

diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
index 64233151b04..e515f9af63f 100644
--- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
+++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
@@ -62,6 +62,7 @@
 #define EDGE_NET   _FLAG_WALK
 /* tag verts we've visit */
 #define VERT_VISIT _FLAG_WALK
+#define VERT_IN_QUEUE _FLAG_WALK_ALT
 
 struct VertOrder {
 	float   angle;
@@ -512,7 +513,7 @@ bool BM_face_split_edgenet(
 	} while ((l_iter = l_iter->next) != l_first);
 #endif
 
-	/* Note: 'VERT_VISIT' is often not needed at all,
+	/* Note: 'VERT_IN_QUEUE' is often not needed at all,
 	 * however in rare cases verts are added multiple times to the queue,
 	 * that on it's own is harmless but in _very_ rare cases,
 	 * the queue will overflow its maximum size,
@@ -520,13 +521,13 @@ bool BM_face_split_edgenet(
 
 	for (i = 0; i < edge_net_len; i++) {
 		BM_ELEM_API_FLAG_ENABLE(edge_net[i], EDGE_NET);
-		BM_ELEM_API_FLAG_DISABLE(edge_net[i]->v1, VERT_VISIT);
-		BM_ELEM_API_FLAG_DISABLE(edge_net[i]->v2, VERT_VISIT);
+		BM_ELEM_API_FLAG_DISABLE(edge_net[i]->v1, VERT_IN_QUEUE);
+		BM_ELEM_API_FLAG_DISABLE(edge_net[i]->v2, VERT_IN_QUEUE);
 	}
 	l_iter = l_first = BM_FACE_FIRST_LOOP(f);
 	do {
 		BM_ELEM_API_FLAG_ENABLE(l_iter->e, EDGE_NET);
-		BM_ELEM_API_FLAG_DISABLE(l_iter->v, VERT_VISIT);
+		BM_ELEM_API_FLAG_DISABLE(l_iter->v, VERT_IN_QUEUE);
 	} while ((l_iter = l_iter->next) != l_first);
 
 	float face_normal_matrix[3][3];
@@ -535,10 +536,10 @@ bool BM_face_split_edgenet(
 
 	/* any vert can be used to begin with */
 	STACK_PUSH(vert_queue, l_first->v);
-	BM_ELEM_API_FLAG_ENABLE(l_first->v, VERT_VISIT);
+	BM_ELEM_API_FLAG_ENABLE(l_first->v, VERT_IN_QUEUE);
 
 	while ((v = STACK_POP(vert_queue))) {
-		BM_ELEM_API_FLAG_DISABLE(v, VERT_VISIT);
+		BM_ELEM_API_FLAG_DISABLE(v, VERT_IN_QUEUE);
 		if (bm_face_split_edgenet_find_loop(
 		        v, f->no, face_normal_matrix,
 		        edge_order, edge_order_len, face_verts, &face_verts_len))
@@ -569,11 +570,11 @@ bool BM_face_split_edgenet(
 				l_iter = l_first = BM_FACE_FIRST_LOOP(f_new);
 				do {
 					/* Avoid adding to queue multiple times (not common but happens). */
-					if (BM_ELEM_API_FLAG_TEST(l_iter->v, VERT_VISIT) &&
+					if (!BM_ELEM_API_FLAG_TEST(l_iter->v, VERT_IN_QUEUE) &&
 					    bm_face_split_edgenet_find_loop_pair_exists(l_iter->v))
 					{
 						STACK_PUSH(vert_queue, l_iter->v);
-						BM_ELEM_API_FLAG_ENABLE(l_iter->v, VERT_VISIT);
+						BM_ELEM_API_FLAG_ENABLE(l_iter->v, VERT_IN_QUEUE);
 					}
 				} while ((l_iter = l_iter->next) != l_first);
 			}




More information about the Bf-blender-cvs mailing list