diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-13 07:53:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-13 07:53:08 +0400 |
commit | cfbc495b8ddbbda16708cbbb5159689d0ef143ab (patch) | |
tree | f1ebbfffe3fed400a34127c6db4a8ccaf2012f83 /source/blender/bmesh | |
parent | 15a6911dd131f5c82117eb2ffa878c951673cd27 (diff) |
BMesh: minor speedup to BM_face_split_edgenet
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mods.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 6475b86f0fd..22a0374faa4 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -616,12 +616,11 @@ static bool bm_face_split_edgenet_find_loop_walk( BMIter eiter; BMEdge *e_next; - BLI_SMALLSTACK_PUSH(vert_visit, v); - BM_ELEM_API_FLAG_ENABLE(v, VERT_VISIT); - - #ifdef USE_FASTPATH_NOFORK walk_nofork: +#else + BLI_SMALLSTACK_PUSH(vert_visit, v); + BM_ELEM_API_FLAG_ENABLE(v, VERT_VISIT); #endif BLI_assert(STACK_SIZE(edge_order) == 0); @@ -681,6 +680,12 @@ walk_nofork: edge_order[j].angle = angle_signed_on_axis_v3v3v3_v3(v_prev->co, v->co, edge_order[j].v->co, face_normal); } qsort(edge_order, STACK_SIZE(edge_order), sizeof(struct VertOrder), BLI_sortutil_cmp_float_reverse); + +#ifdef USE_FASTPATH_NOFORK + /* only tag forks */ + BLI_SMALLSTACK_PUSH(vert_visit, v); + BM_ELEM_API_FLAG_ENABLE(v, VERT_VISIT); +#endif } while ((eo = STACK_POP_PTR(edge_order))) { |