minor speedup for bevel, avoid calling find_bevvert() when we know the edge isn't...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 22 Nov 2012 11:02:57 +0000 (11:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 22 Nov 2012 11:02:57 +0000 (11:02 +0000)
source/blender/bmesh/tools/bmesh_bevel.c

index 36cf396b55e4e501afda84ae394e58b45dc9e5cc..4ed6832470a2b64041461283d4ba29c795fe7d9d 100644 (file)
@@ -1554,9 +1554,9 @@ static int bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f)
        BLI_array_staticdeclare(vv, BM_DEFAULT_NGON_STACK_SIZE);
 
        BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
-               bv = find_bevvert(bp, l->v);
-               if (bv) {
+               if (BM_elem_flag_test(l->v, BM_ELEM_TAG)) {
                        lprev = l->prev;
+                       bv = find_bevvert(bp, l->v);
                        e = find_edge_half(bv, l->e);
                        eprev = find_edge_half(bv, lprev->e);
                        BLI_assert(e != NULL && eprev != NULL);
@@ -1624,7 +1624,6 @@ static void bevel_rebuild_existing_polygons(BMesh *bm, BevelParams *bp, BMVert *
 }
 
 
-
 /*
  * Build the polygons along the selected Edge
  */