BMesh: rename loop walker -> edgeloop
authorCampbell Barton <ideasman42@gmail.com>
Fri, 15 May 2015 00:55:22 +0000 (10:55 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 15 May 2015 00:55:56 +0000 (10:55 +1000)
source/blender/bmesh/intern/bmesh_walkers.h
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/intern/bmesh_walkers_private.h
source/blender/editors/mesh/editmesh_select.c

index e84880d..00217dd 100644 (file)
@@ -110,7 +110,7 @@ void  BMW_reset(BMWalker *walker);
 enum {
        BMW_VERT_SHELL,
        BMW_FACE_SHELL,
-       BMW_LOOP,
+       BMW_EDGELOOP,
        BMW_FACELOOP,
        BMW_EDGERING,
        BMW_EDGEBOUNDARY,
index b7bf80b..6cdabe6 100644 (file)
@@ -543,9 +543,9 @@ static bool bm_edge_is_single(BMEdge *e)
                (BM_edge_is_boundary(e->l->next->e) || BM_edge_is_boundary(e->l->prev->e)));
 }
 
-static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
+static void bmw_EdgeLoopWalker_begin(BMWalker *walker, void *data)
 {
-       BMwLoopWalker *lwalk = NULL, owalk, *owalk_pt;
+       BMwEdgeLoopWalker *lwalk = NULL, owalk, *owalk_pt;
        BMEdge *e = data;
        BMVert *v;
        const int vert_edge_count[2] = {
@@ -593,7 +593,7 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
 
        /* rewind */
        while ((owalk_pt = BMW_current_state(walker))) {
-               owalk = *((BMwLoopWalker *)owalk_pt);
+               owalk = *((BMwEdgeLoopWalker *)owalk_pt);
                BMW_walk(walker);
        }
 
@@ -606,16 +606,16 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
        BLI_gset_insert(walker->visit_set, owalk.cur);
 }
 
-static void *bmw_LoopWalker_yield(BMWalker *walker)
+static void *bmw_EdgeLoopWalker_yield(BMWalker *walker)
 {
-       BMwLoopWalker *lwalk = BMW_current_state(walker);
+       BMwEdgeLoopWalker *lwalk = BMW_current_state(walker);
 
        return lwalk->cur;
 }
 
-static void *bmw_LoopWalker_step(BMWalker *walker)
+static void *bmw_EdgeLoopWalker_step(BMWalker *walker)
 {
-       BMwLoopWalker *lwalk, owalk;
+       BMwEdgeLoopWalker *lwalk, owalk;
        BMEdge *e, *nexte = NULL;
        BMLoop *l;
        BMVert *v;
@@ -1278,12 +1278,12 @@ static BMWalker bmw_IslandWalker_Type = {
        BM_EDGE | BM_FACE, /* valid restrict masks */
 };
 
-static BMWalker bmw_LoopWalker_Type = {
+static BMWalker bmw_EdgeLoopWalker_Type = {
        BM_EDGE,
-       bmw_LoopWalker_begin,
-       bmw_LoopWalker_step,
-       bmw_LoopWalker_yield,
-       sizeof(BMwLoopWalker),
+       bmw_EdgeLoopWalker_begin,
+       bmw_EdgeLoopWalker_step,
+       bmw_EdgeLoopWalker_yield,
+       sizeof(BMwEdgeLoopWalker),
        BMW_DEPTH_FIRST,
        0, /* valid restrict masks */ /* could add flags here but so far none are used */
 };
@@ -1341,7 +1341,7 @@ static BMWalker bmw_ConnectedVertexWalker_Type = {
 BMWalker *bm_walker_types[] = {
        &bmw_VertShellWalker_Type,          /* BMW_VERT_SHELL */
        &bmw_FaceShellWalker_Type,          /* BMW_FACE_SHELL */
-       &bmw_LoopWalker_Type,               /* BMW_LOOP */
+       &bmw_EdgeLoopWalker_Type,           /* BMW_EDGELOOP */
        &bmw_FaceLoopWalker_Type,           /* BMW_FACELOOP */
        &bmw_EdgeringWalker_Type,           /* BMW_EDGERING */
        &bmw_EdgeboundaryWalker_Type,       /* BMW_EDGEBOUNDARY */
index 82d1e76..629f4f0 100644 (file)
@@ -57,14 +57,14 @@ typedef struct BMwIslandWalker {
        BMFace *cur;
 } BMwIslandWalker;
 
-typedef struct BMwLoopWalker {
+typedef struct BMwEdgeLoopWalker {
        BMwGenericWalker header;
        BMEdge *cur, *start;
        BMVert *lastv, *startv;
        BMFace *f_hub;
        bool is_boundary; /* boundary looping changes behavior */
        bool is_single;  /* single means the edge verts are only connected to 1 face */
-} BMwLoopWalker;
+} BMwEdgeLoopWalker;
 
 typedef struct BMwFaceLoopWalker {
        BMwGenericWalker header;
index 4ce493d..0a712a2 100644 (file)
@@ -1454,7 +1454,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
        else {
                for (edindex = 0; edindex < totedgesel; edindex += 1) {
                        eed = edarray[edindex];
-                       walker_select(em, BMW_LOOP, eed, true);
+                       walker_select(em, BMW_EDGELOOP, eed, true);
                }
                EDBM_selectmode_flush(em);
        }
@@ -1512,12 +1512,12 @@ static void mouse_mesh_loop_edge(BMEditMesh *em, BMEdge *eed, bool select, bool
 {
        bool edge_boundary = false;
 
-       /* cycle between BMW_LOOP / BMW_EDGEBOUNDARY  */
+       /* cycle between BMW_EDGELOOP / BMW_EDGEBOUNDARY  */
        if (select_cycle && BM_edge_is_boundary(eed)) {
                int tot[2];
 
                /* if the loops selected toggle the boundaries */
-               walker_select_count(em, BMW_LOOP, eed, select, false,
+               walker_select_count(em, BMW_EDGELOOP, eed, select, false,
                                    &tot[0], &tot[1]);
                if (tot[select] == 0) {
                        edge_boundary = true;
@@ -1539,7 +1539,7 @@ static void mouse_mesh_loop_edge(BMEditMesh *em, BMEdge *eed, bool select, bool
                walker_select(em, BMW_EDGEBOUNDARY, eed, select);
        }
        else {
-               walker_select(em, BMW_LOOP, eed, select);
+               walker_select(em, BMW_EDGELOOP, eed, select);
        }
 }