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
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-09-28 22:53:24 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-09-28 22:54:23 +0300
commit5cdb2aadfcc7906050e163c48e88a005cfd42089 (patch)
tree460000816ab9343cc7600e02a7cb9da26a9c7a98
parentc7a7c3f5e5ddd5d8919da84e75c1a277ba0b6de9 (diff)
Fix flag wrongly set in 'BM_face_split_edgenet_connect_islands'
Sometimes the `use_partial_connect` option could trigger the assert: ``` BLI_assert(!BM_elem_flag_test(l_iter->v, VERT_NOT_IN_STACK)); ``` This can happen when `v_delimit->e` is not part of edgenet, so `v_other` will not have the flag.
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon_edgenet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
index 86a7d8153f0..3ce572077b8 100644
--- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
+++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c
@@ -1135,11 +1135,13 @@ static BMVert *bm_face_split_edgenet_partial_connect(BMesh *bm, BMVert *v_delimi
BMVert *v_other = BM_edge_other_vert(e_face_init ? e_face_init : v_delimit->e, v_delimit);
BLI_SMALLSTACK_PUSH(search, v_other);
- BM_elem_flag_disable(v_other, VERT_NOT_IN_STACK);
+ if (BM_elem_flag_test(v_other, VERT_NOT_IN_STACK)) {
+ BM_elem_flag_disable(v_other, VERT_NOT_IN_STACK);
+ BLI_linklist_prepend_alloca(&vert_stack, v_other);
+ }
while ((v_other = BLI_SMALLSTACK_POP(search))) {
BLI_assert(BM_elem_flag_test(v_other, VERT_NOT_IN_STACK) == false);
- BLI_linklist_prepend_alloca(&vert_stack, v_other);
BMEdge *e_iter = v_other->e;
do {
BMVert *v_step = BM_edge_other_vert(e_iter, v_other);
@@ -1147,6 +1149,7 @@ static BMVert *bm_face_split_edgenet_partial_connect(BMesh *bm, BMVert *v_delimi
if (BM_elem_flag_test(v_step, VERT_NOT_IN_STACK)) {
BM_elem_flag_disable(v_step, VERT_NOT_IN_STACK);
BLI_SMALLSTACK_PUSH(search, v_step);
+ BLI_linklist_prepend_alloca(&vert_stack, v_other);
}
}
} while ((e_iter = BM_DISK_EDGE_NEXT(e_iter, v_other)) != v_other->e);