more replacement for BM_edge_face_count() use.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 18 Apr 2012 06:57:28 +0000 (06:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 18 Apr 2012 06:57:28 +0000 (06:57 +0000)
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/transform/transform.c

index ae7294e..cccda67 100644 (file)
@@ -743,7 +743,7 @@ static void *bmw_FaceLoopWalker_step(BMWalker *walker)
        if (!bmw_FaceLoopWalker_include_face(walker, l)) {
                l = lwalk->l;
                l = l->next->next;
-               if (BM_edge_face_count(l->e) != 2) {
+               if (!BM_edge_is_manifold(l->e)) {
                        l = l->prev->prev;
                }
                l = l->radial_next;
index 7d07dc0..fd6106a 100644 (file)
@@ -106,7 +106,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
                BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        BMVert *v1, *v2, *v3, *v4;
                        
-                       if (BM_edge_face_count(e) != 2 || BMO_elem_flag_test(bm, e, EDGE_MARK)) {
+                       if (!BM_edge_is_manifold(e) || BMO_elem_flag_test(bm, e, EDGE_MARK)) {
                                continue;
                        }
 
index 5ef70f9..c3796fe 100644 (file)
@@ -158,7 +158,7 @@ static int BME_Bevel_Dissolve_Disk(BMesh *bm, BMVert *v)
 
        /* hrmf, we could have a version of BM_vert_is_manifold() which checks for this case */
        BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
-               if (BM_edge_face_count(e) != 2) {
+               if (!BM_edge_is_manifold(e)) {
                        return 0;
                }
        }
index 00835b7..6505337 100644 (file)
@@ -2371,7 +2371,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
        }
        
        BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
-               if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN) && BM_edge_face_count(e) != 2) {
+               if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN) && !BM_edge_is_manifold(e)) {
                        BM_elem_select_set(em->bm, e, TRUE);
                }
        }
index 557c879..12cd789 100644 (file)
@@ -2801,7 +2801,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
                if (BM_elem_flag_test(e, BM_ELEM_HIDDEN))
                        continue;
 
-               if (BM_edge_face_count(e) != 0) {
+               if (!BM_edge_is_wire(e)) {
                        BM_elem_select_set(em->bm, e, FALSE);
                }
        }
index f4bfa1e..0a85c52 100644 (file)
@@ -4437,7 +4437,7 @@ static int createSlideVerts(TransInfo *t)
 
        BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
-                       if (BM_edge_face_count(e) != 2) {
+                       if (!BM_edge_is_manifold(e)) {
                                MEM_freeN(sld);
                                BMBVH_FreeBVH(btree);
                                return 0; /* can only handle exactly 2 faces around each edge */