style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
authorCampbell Barton <ideasman42@gmail.com>
Thu, 19 Apr 2012 11:44:12 +0000 (11:44 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 19 Apr 2012 11:44:12 +0000 (11:44 +0000)
72 files changed:
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/object.c
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/bmesh/intern/bmesh_iterators.c
source/blender/bmesh/intern/bmesh_marking.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_mesh_conv.c
source/blender/bmesh/intern/bmesh_mesh_validate.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_bevel.c
source/blender/bmesh/operators/bmo_connect.c
source/blender/bmesh/operators/bmo_create.c
source/blender/bmesh/operators/bmo_dissolve.c
source/blender/bmesh/operators/bmo_dupe.c
source/blender/bmesh/operators/bmo_edgesplit.c
source/blender/bmesh/operators/bmo_extrude.c
source/blender/bmesh/operators/bmo_inset.c
source/blender/bmesh/operators/bmo_join_triangles.c
source/blender/bmesh/operators/bmo_mirror.c
source/blender/bmesh/operators/bmo_primitive.c
source/blender/bmesh/operators/bmo_removedoubles.c
source/blender/bmesh/operators/bmo_slide.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_bvh.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_slide.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/render/render_shading.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/util/crazyspace.c
source/blender/editors/uvedit/uvedit_buttons.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/bmesh/bmesh_py_types.h

index d7c7a9a..5ccf47d 100644 (file)
@@ -572,7 +572,7 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
                                                        insert = 0;
                                                }
                                                else {
-                                                       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_FACE, f) {
+                                                       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_FACE, f) {
                                                                if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
                                                                        /* Don't insert triangles tessellated from faces that have
                                                                         * any selected verts.*/
index ed561a5..232011c 100644 (file)
@@ -1929,7 +1929,7 @@ DerivedMesh *CDDM_from_BMEditMesh(BMEditMesh *em, Mesh *UNUSED(me), int use_mdis
                mp->loopstart = j;
                mp->mat_nr = efa->mat_nr;
                
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, efa) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, efa) {
                        mloop->v = BM_elem_index_get(l->v);
                        mloop->e = BM_elem_index_get(l->e);
                        CustomData_from_bmesh_block(&bm->ldata, &dm->loopData, l->head.data, j);
index 2450f3c..f2238a3 100644 (file)
@@ -2191,7 +2191,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest,
 
        if (t != BM_LOOPS_OF_FACE) {
                /*ensure all current elements follow new customdata layout*/
-               BM_ITER(h, &iter, bm, t, NULL) {
+               BM_ITER (h, &iter, bm, t, NULL) {
                        tmp = NULL;
                        CustomData_bmesh_copy_data(&destold, dest, h->data, &tmp);
                        CustomData_bmesh_free_block(&destold, &h->data);
@@ -2204,8 +2204,8 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest,
                BMIter liter;
 
                /*ensure all current elements follow new customdata layout*/
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                                tmp = NULL;
                                CustomData_bmesh_copy_data(&destold, dest, l->head.data, &tmp);
                                CustomData_bmesh_free_block(&destold, &l->head.data);
index 3556b1f..d17de34 100644 (file)
@@ -493,7 +493,7 @@ static void emDM_drawUVEdges(DerivedMesh *dm)
        BMIter iter;
 
        glBegin(GL_LINES);
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                BMIter liter;
                BMLoop *l;
                MLoopUV *lastluv = NULL, *firstluv = NULL;
@@ -501,7 +501,7 @@ static void emDM_drawUVEdges(DerivedMesh *dm)
                if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                        continue;
 
-               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
+               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                        MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
 
                        if (luv) {
@@ -1468,8 +1468,8 @@ static void emDM_copyLoopArray(DerivedMesh *dm, MLoop *loop_r)
 
        BM_mesh_elem_index_ensure(bm, BM_VERT | BM_EDGE);
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        loop_r->v = BM_elem_index_get(l->v);
                        loop_r->e = BM_elem_index_get(l->e);
                        loop_r++;
@@ -1486,7 +1486,7 @@ static void emDM_copyPolyArray(DerivedMesh *dm, MPoly *poly_r)
        int i;
 
        i = 0;
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                poly_r->flag = BM_face_flag_to_mflag(f);
                poly_r->loopstart = i;
                poly_r->totloop = f->len;
@@ -1559,7 +1559,7 @@ static void emDM_getVertCos(DerivedMesh *dm, float (*cos_r)[3])
        int i;
 
        i= 0;
-       BM_ITER(eve, &iter, emdm->tc->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, emdm->tc->bm, BM_VERTS_OF_MESH, NULL) {
                if (emdm->vertexCos) {
                        copy_v3_v3(cos_r[i], emdm->vertexCos[i]);
                }
@@ -1709,7 +1709,7 @@ DerivedMesh *getEditDerivedBMesh(
                bmdm->polyNos = MEM_mallocN(sizeof(*bmdm->polyNos)*bm->totface, "bmdm_pno");
 
                i = 0;
-               BM_ITER(efa, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                        BM_elem_index_set(efa, i); /* set_inline */
                        BM_face_normal_update_vcos(bm, efa, bmdm->polyNos[i], (float const (*)[3])vertexCos);
                        i++;
@@ -1719,7 +1719,7 @@ DerivedMesh *getEditDerivedBMesh(
                eve=BM_iter_new(&viter, bm, BM_VERTS_OF_MESH, NULL);
                for (i=0; eve; eve=BM_iter_step(&viter), i++) {
                        float *no = bmdm->vertexNos[i];
-                       BM_ITER(efa, &fiter, bm, BM_FACES_OF_VERT, eve) {
+                       BM_ITER (efa, &fiter, bm, BM_FACES_OF_VERT, eve) {
                                add_v3_v3(no, bmdm->polyNos[BM_elem_index_get(efa)]);
                        }
 
index 8c754a7..fc10a32 100644 (file)
@@ -520,7 +520,7 @@ static char *key_block_get_data(Key *key, KeyBlock *actkb, KeyBlock *kb, char **
                                a = 0;
                                co = MEM_callocN(sizeof(float) * 3 * me->edit_btmesh->bm->totvert, "key_block_get_data");
 
-                               BM_ITER(eve, &iter, me->edit_btmesh->bm, BM_VERTS_OF_MESH, NULL) {
+                               BM_ITER (eve, &iter, me->edit_btmesh->bm, BM_VERTS_OF_MESH, NULL) {
                                        copy_v3_v3(co[a], eve->co);
                                        a++;
                                }
index 4d8d6e9..f93592b 100644 (file)
@@ -1770,7 +1770,7 @@ static void give_parvert(Object *par, int nr, float vec[3])
                        BMVert *eve;
                        BMIter iter;
 
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                int *keyindex = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX);
                                
                                if (keyindex && *keyindex==nr) {
index ec2b9ac..179feec 100644 (file)
@@ -495,7 +495,7 @@ void BMO_remove_tagged_faces(BMesh *bm, const short oflag)
        BMFace *f;
        BMIter iter;
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, f, oflag)) {
                        BM_face_kill(bm, f);
                }
@@ -507,7 +507,7 @@ void BMO_remove_tagged_edges(BMesh *bm, const short oflag)
        BMEdge *e;
        BMIter iter;
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e, oflag)) {
                        BM_edge_kill(bm, e);
                }
@@ -519,7 +519,7 @@ void BMO_remove_tagged_verts(BMesh *bm, const short oflag)
        BMVert *v;
        BMIter iter;
 
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, oflag)) {
                        BM_vert_kill(bm, v);
                }
@@ -545,14 +545,14 @@ static void bmo_remove_tagged_context_verts(BMesh *bm, const short oflag)
        BMIter iter;
        BMIter itersub;
 
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, oflag)) {
                        /* Visit edge */
-                       BM_ITER(e, &itersub, bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (e, &itersub, bm, BM_EDGES_OF_VERT, v) {
                                BMO_elem_flag_enable(bm, e, oflag);
                        }
                        /* Visit face */
-                       BM_ITER(f, &itersub, bm, BM_FACES_OF_VERT, v) {
+                       BM_ITER (f, &itersub, bm, BM_FACES_OF_VERT, v) {
                                BMO_elem_flag_enable(bm, f, oflag);
                        }
                }
@@ -571,9 +571,9 @@ static void bmo_remove_tagged_context_edges(BMesh *bm, const short oflag)
        BMIter iter;
        BMIter itersub;
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e, oflag)) {
-                       BM_ITER(f, &itersub, bm, BM_FACES_OF_EDGE, e) {
+                       BM_ITER (f, &itersub, bm, BM_FACES_OF_EDGE, e) {
                                BMO_elem_flag_enable(bm, f, oflag);
                        }
                }
@@ -610,7 +610,7 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                case DEL_EDGES:
                {
                        /* flush down to vert */
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                                if (BMO_elem_flag_test(bm, e, oflag)) {
                                        BMO_elem_flag_enable(bm, e->v1, oflag);
                                        BMO_elem_flag_enable(bm, e->v2, oflag);
@@ -618,7 +618,7 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                        }
                        bmo_remove_tagged_context_edges(bm, oflag);
                        /* remove loose vertice */
-                       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                                if (BMO_elem_flag_test(bm, v, oflag) && (!(v->e)))
                                        BMO_elem_flag_enable(bm, v, DEL_WIREVERT);
                        }
@@ -649,7 +649,7 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                case DEL_FACES:
                {
                        /* go through and mark all edges and all verts of all faces for delet */
-                       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                                if (BMO_elem_flag_test(bm, f, oflag)) {
                                        for (e = BM_iter_new(&eiter, bm, BM_EDGES_OF_FACE, f); e; e = BM_iter_step(&eiter))
                                                BMO_elem_flag_enable(bm, e, oflag);
@@ -658,7 +658,7 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                                }
                        }
                        /* now go through and mark all remaining faces all edges for keeping */
-                       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                                if (!BMO_elem_flag_test(bm, f, oflag)) {
                                        for (e = BM_iter_new(&eiter, bm, BM_EDGES_OF_FACE, f); e; e = BM_iter_step(&eiter)) {
                                                BMO_elem_flag_disable(bm, e, oflag);
@@ -669,7 +669,7 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                                }
                        }
                        /* also mark all the vertices of remaining edges for keeping */
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                                if (!BMO_elem_flag_test(bm, e, oflag)) {
                                        BMO_elem_flag_disable(bm, e->v1, oflag);
                                        BMO_elem_flag_disable(bm, e->v2, oflag);
@@ -687,13 +687,13 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
                case DEL_ALL:
                {
                        /* does this option even belong in here? */
-                       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                                BMO_elem_flag_enable(bm, f, oflag);
                        }
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                                BMO_elem_flag_enable(bm, e, oflag);
                        }
-                       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                                BMO_elem_flag_enable(bm, v, oflag);
                        }
 
index 8b1fee3..ce1474e 100644 (file)
@@ -1746,7 +1746,7 @@ int BM_vert_splice(BMesh *bm, BMVert *v, BMVert *vtarget)
        }
 
        /* retarget all the loops of v to vtarget */
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                l->v = vtarget;
        }
 
@@ -1792,7 +1792,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len)
        visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__);
 
        maxindex = 0;
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                if (BLI_ghash_haskey(visithash, e)) {
                        continue;
                }
@@ -1805,7 +1805,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len)
                while ((e = BLI_array_pop(stack))) {
                        BLI_ghash_insert(visithash, e, SET_INT_IN_POINTER(maxindex));
 
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
                                nl = (l->v == v) ? l->prev : l->next;
                                if (!BLI_ghash_haskey(visithash, nl->e)) {
                                        BLI_array_append(stack, nl->e);
@@ -1825,7 +1825,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len)
 
        /* Replace v with the new verts in each group */
 #if 0
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                /* call first since its faster then a hash lookup */
                if (l->v != v) {
                        continue;
@@ -1851,7 +1851,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len)
         * bad practice but save alloc'ing a new array - note, the comment above is useful, keep it
         * if you are tidying up code - campbell */
        BLI_array_empty(stack);
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                if (l->v == v) {
                        BLI_array_append(stack, (BMEdge *)l);
                }
@@ -1865,7 +1865,7 @@ int bmesh_vert_separate(BMesh *bm, BMVert *v, BMVert ***r_vout, int *r_vout_len)
 
        BLI_array_free(stack);
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                i = GET_INT_FROM_POINTER(BLI_ghash_lookup(visithash, e));
                if (i == 0) {
                        continue;
index 2a3242d..d8a977c 100644 (file)
@@ -489,7 +489,7 @@ void BM_face_multires_bounds_smooth(BMesh *bm, BMFace *f)
        if (!CustomData_has_layer(&bm->ldata, CD_MDISPS))
                return;
        
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                MDisps *mdp = CustomData_bmesh_get(&bm->ldata, l->prev->head.data, CD_MDISPS);
                MDisps *mdl = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS);
                MDisps *mdn = CustomData_bmesh_get(&bm->ldata, l->next->head.data, CD_MDISPS);
@@ -521,7 +521,7 @@ void BM_face_multires_bounds_smooth(BMesh *bm, BMFace *f)
                }
        }
        
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                MDisps *mdl1 = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS);
                MDisps *mdl2;
                float co1[3], co2[3], co[3];
@@ -726,7 +726,7 @@ static void update_data_blocks(BMesh *bm, CustomData *olddata, CustomData *data)
 
                CustomData_bmesh_init_pool(data, bm->totvert, BM_VERT);
 
-               BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        block = NULL;
                        CustomData_bmesh_set_default(data, &block);
                        CustomData_bmesh_copy_data(olddata, data, eve->head.data, &block);
@@ -739,7 +739,7 @@ static void update_data_blocks(BMesh *bm, CustomData *olddata, CustomData *data)
 
                CustomData_bmesh_init_pool(data, bm->totedge, BM_EDGE);
 
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        block = NULL;
                        CustomData_bmesh_set_default(data, &block);
                        CustomData_bmesh_copy_data(olddata, data, eed->head.data, &block);
@@ -753,8 +753,8 @@ static void update_data_blocks(BMesh *bm, CustomData *olddata, CustomData *data)
                BMLoop *l;
 
                CustomData_bmesh_init_pool(data, bm->totloop, BM_LOOP);
-               BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, efa) {
+               BM_ITER (efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, efa) {
                                block = NULL;
                                CustomData_bmesh_set_default(data, &block);
                                CustomData_bmesh_copy_data(olddata, data, l->head.data, &block);
@@ -768,7 +768,7 @@ static void update_data_blocks(BMesh *bm, CustomData *olddata, CustomData *data)
 
                CustomData_bmesh_init_pool(data, bm->totface, BM_FACE);
 
-               BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        block = NULL;
                        CustomData_bmesh_set_default(data, &block);
                        CustomData_bmesh_copy_data(olddata, data, efa->head.data, &block);
index b53896a..b234d45 100644 (file)
@@ -93,7 +93,7 @@ int BM_iter_as_array(BMesh *bm, const char type, void *data, void **array, const
                BMIter iter;
                void *val;
 
-               BM_ITER(val, &iter, bm, type, data) {
+               BM_ITER (val, &iter, bm, type, data) {
                        array[i] = val;
                        i++;
                        if (i == len) {
index 3492b42..faf2d79 100644 (file)
@@ -84,7 +84,7 @@ void BM_mesh_select_mode_flush(BMesh *bm)
        int ok;
 
        if (bm->selectmode & SCE_SELECT_VERTEX) {
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(e->v1, BM_ELEM_SELECT) &&
                            BM_elem_flag_test(e->v2, BM_ELEM_SELECT) &&
                            !BM_elem_flag_test(e, BM_ELEM_HIDDEN))
@@ -95,7 +95,7 @@ void BM_mesh_select_mode_flush(BMesh *bm)
                                BM_elem_flag_disable(e, BM_ELEM_SELECT);
                        }
                }
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                        ok = TRUE;
                        if (!BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
                                l_iter = l_first = BM_FACE_FIRST_LOOP(f);
@@ -114,7 +114,7 @@ void BM_mesh_select_mode_flush(BMesh *bm)
                }
        }
        else if (bm->selectmode & SCE_SELECT_EDGE) {
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                        ok = TRUE;
                        if (!BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
                                l_iter = l_first = BM_FACE_FIRST_LOOP(f);
@@ -154,7 +154,7 @@ void BM_mesh_deselect_flush(BMesh *bm)
 
        int ok;
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                if (!(BM_elem_flag_test(e->v1, BM_ELEM_SELECT) &&
                      BM_elem_flag_test(e->v2, BM_ELEM_SELECT) &&
                      !BM_elem_flag_test(e, BM_ELEM_HIDDEN)))
@@ -163,7 +163,7 @@ void BM_mesh_deselect_flush(BMesh *bm)
                }
        }
 
-       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                ok = TRUE;
                if (!BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
                        l_iter = l_first = BM_FACE_FIRST_LOOP(f);
@@ -205,7 +205,7 @@ void BM_mesh_select_flush(BMesh *bm)
 
        int ok;
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e->v1, BM_ELEM_SELECT) &&
                    BM_elem_flag_test(e->v2, BM_ELEM_SELECT) &&
                    !BM_elem_flag_test(e, BM_ELEM_HIDDEN))
@@ -214,7 +214,7 @@ void BM_mesh_select_flush(BMesh *bm)
                }
        }
 
-       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                ok = TRUE;
                if (!BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
                        l_iter = l_first = BM_FACE_FIRST_LOOP(f);
@@ -360,10 +360,10 @@ void BM_face_select_set(BMesh *bm, BMFace *f, int select)
                BM_elem_flag_disable(f, BM_ELEM_SELECT);
 
                /* flush down to edges */
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        BMIter fiter;
                        BMFace *f2;
-                       BM_ITER(f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
+                       BM_ITER (f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
                                if (BM_elem_flag_test(f2, BM_ELEM_SELECT))
                                        break;
                        }
@@ -374,10 +374,10 @@ void BM_face_select_set(BMesh *bm, BMFace *f, int select)
                }
 
                /* flush down to verts */
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        BMIter eiter;
                        BMEdge *e;
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, l->v) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, l->v) {
                                if (BM_elem_flag_test(e, BM_ELEM_SELECT))
                                        break;
                        }
@@ -405,10 +405,10 @@ void BM_mesh_select_mode_set(BMesh *bm, int selectmode)
        if (bm->selectmode & SCE_SELECT_VERTEX) {
                /* disabled because selection flushing handles these */
 #if 0
-               BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        BM_elem_flag_disable(ele, BM_ELEM_SELECT);
                }
-               BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        BM_elem_flag_disable(ele, BM_ELEM_SELECT);
                }
 #endif
@@ -417,12 +417,12 @@ void BM_mesh_select_mode_set(BMesh *bm, int selectmode)
        else if (bm->selectmode & SCE_SELECT_EDGE) {
                /* disabled because selection flushing handles these */
 #if 0
-               BM_ITER(ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        BM_elem_flag_disable(ele, BM_ELEM_SELECT);
                }
 #endif
 
-               BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) {
                                BM_edge_select_set(bm, (BMEdge *)ele, TRUE);
                        }
@@ -432,11 +432,11 @@ void BM_mesh_select_mode_set(BMesh *bm, int selectmode)
        else if (bm->selectmode & SCE_SELECT_FACE) {
                /* disabled because selection flushing handles these */
 #if 0
-               BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        BM_elem_flag_disable(ele, BM_ELEM_SELECT);
                }
 #endif
-               BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) {
                                BM_face_select_set(bm, (BMFace *)ele, TRUE);
                        }
@@ -543,7 +543,7 @@ BMFace *BM_active_face_get(BMesh *bm, int sloppy)
                }
                /* Last attempt: try to find any selected face */
                if (f == NULL) {
-                       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                                if (BM_elem_flag_test(f, BM_ELEM_SELECT)) {
                                        break;
                                }
@@ -896,7 +896,7 @@ static void vert_flush_hide_set(BMesh *bm, BMVert *v)
        BMEdge *e;
        int hide = TRUE;
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                hide = hide && BM_elem_flag_test(e, BM_ELEM_HIDDEN);
        }
 
@@ -909,7 +909,7 @@ static void edge_flush_hide(BMesh *bm, BMEdge *e)
        BMFace *f;
        int hide = TRUE;
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_EDGE, e) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_EDGE, e) {
                hide = hide && BM_elem_flag_test(f, BM_ELEM_HIDDEN);
        }
 
@@ -925,10 +925,10 @@ void BM_vert_hide_set(BMesh *bm, BMVert *v, int hide)
 
        BM_elem_flag_set(v, BM_ELEM_HIDDEN, hide);
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                BM_elem_flag_set(e, BM_ELEM_HIDDEN, hide);
 
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, e) {
                        BM_elem_flag_set(f, BM_ELEM_HIDDEN, hide);
                }
        }
@@ -941,7 +941,7 @@ void BM_edge_hide_set(BMesh *bm, BMEdge *e, int hide)
        /* BMVert *v; */
 
        /* edge hiding: faces around the edge */
-       BM_ITER(f, &iter, bm, BM_FACES_OF_EDGE, e) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_EDGE, e) {
                BM_elem_flag_set(f, BM_ELEM_HIDDEN, hide);
        }
        
@@ -959,11 +959,11 @@ void BM_face_hide_set(BMesh *bm, BMFace *f, int hide)
 
        BM_elem_flag_set(f, BM_ELEM_HIDDEN, hide);
 
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_FACE, f) {
                edge_flush_hide(bm, l->e);
        }
 
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_FACE, f) {
                vert_flush_hide_set(bm, l->v);
        }
 }
index c15937a..826d4db 100644 (file)
@@ -104,15 +104,15 @@ void BM_mesh_data_free(BMesh *bm)
        BMIter iter;
        BMIter itersub;
        
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                CustomData_bmesh_free_block(&(bm->vdata), &(v->head.data));
        }
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                CustomData_bmesh_free_block(&(bm->edata), &(e->head.data));
        }
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                CustomData_bmesh_free_block(&(bm->pdata), &(f->head.data));
-               BM_ITER(l, &itersub, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &itersub, bm, BM_LOOPS_OF_FACE, f) {
                        CustomData_bmesh_free_block(&(bm->ldata), &(l->head.data));
                }
        }
@@ -211,7 +211,7 @@ void BM_mesh_normals_update(BMesh *bm, const short skip_hidden)
        float (*edgevec)[3];
        
        /* calculate all face normals */
-       BM_ITER(f, &faces, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &faces, bm, BM_FACES_OF_MESH, NULL) {
                if (skip_hidden && BM_elem_flag_test(f, BM_ELEM_HIDDEN))
                        continue;
 #if 0  /* UNUSED */
@@ -223,7 +223,7 @@ void BM_mesh_normals_update(BMesh *bm, const short skip_hidden)
        }
        
        /* Zero out vertex normals */
-       BM_ITER(v, &verts, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &verts, bm, BM_VERTS_OF_MESH, NULL) {
                if (skip_hidden && BM_elem_flag_test(v, BM_ELEM_HIDDEN))
                        continue;
 
@@ -235,7 +235,7 @@ void BM_mesh_normals_update(BMesh *bm, const short skip_hidden)
         * normals */
        index = 0;
        edgevec = MEM_callocN(sizeof(float) * 3 * bm->totedge, "BM normal computation array");
-       BM_ITER(e, &edges, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &edges, bm, BM_EDGES_OF_MESH, NULL) {
                BM_elem_index_set(e, index); /* set_inline */
 
                if (e->l) {
@@ -251,12 +251,12 @@ void BM_mesh_normals_update(BMesh *bm, const short skip_hidden)
        bm->elem_index_dirty &= ~BM_EDGE;
 
        /* add weighted face normals to vertices */
-       BM_ITER(f, &faces, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &faces, bm, BM_FACES_OF_MESH, NULL) {
 
                if (skip_hidden && BM_elem_flag_test(f, BM_ELEM_HIDDEN))
                        continue;
 
-               BM_ITER(l, &loops, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &loops, bm, BM_LOOPS_OF_FACE, f) {
                        float *e1diff, *e2diff;
                        float dotprod;
                        float fac;
@@ -282,7 +282,7 @@ void BM_mesh_normals_update(BMesh *bm, const short skip_hidden)
        }
        
        /* normalize the accumulated vertex normals */
-       BM_ITER(v, &verts, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &verts, bm, BM_VERTS_OF_MESH, NULL) {
                if (skip_hidden && BM_elem_flag_test(v, BM_ELEM_HIDDEN))
                        continue;
 
@@ -312,7 +312,7 @@ static void bm_rationalize_normals(BMesh *bm, int undo)
        BMIter iter;
        
        if (undo) {
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(f, BM_ELEM_TAG)) {
                                BM_face_normal_flip(bm, f);
                        }
@@ -327,7 +327,7 @@ static void bm_rationalize_normals(BMesh *bm, int undo)
        BMO_push(bm, &bmop);
        bmo_righthandfaces_exec(bm, &bmop);
        
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                BM_elem_flag_set(f, BM_ELEM_TAG, BMO_elem_flag_test(bm, f, FACE_FLIP));
        }
 
@@ -350,10 +350,10 @@ static void UNUSED_FUNCTION(bm_mdisps_space_set)(Object *ob, BMesh *bm, int from
                
                mdisps = CustomData_get_layer(&dm->loopData, CD_MDISPS);
                
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        BMLoop *l;
                        BMIter liter;
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                                MDisps *lmd = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS);
                                
                                if (!lmd->disps) {
@@ -463,7 +463,7 @@ void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag)
        if (hflag & BM_VERT) {
                if (bm->elem_index_dirty & BM_VERT) {
                        int index = 0;
-                       BM_ITER(ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                BM_elem_index_set(ele, index); /* set_ok */
                                index++;
                        }
@@ -478,7 +478,7 @@ void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag)
        if (hflag & BM_EDGE) {
                if (bm->elem_index_dirty & BM_EDGE) {
                        int index = 0;
-                       BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                BM_elem_index_set(ele, index); /* set_ok */
                                index++;
                        }
@@ -493,7 +493,7 @@ void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag)
        if (hflag & BM_FACE) {
                if (bm->elem_index_dirty & BM_FACE) {
                        int index = 0;
-                       BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                                BM_elem_index_set(ele, index); /* set_ok */
                                index++;
                        }
@@ -540,7 +540,7 @@ void BM_mesh_elem_index_validate(BMesh *bm, const char *location, const char *fu
                int err_val = 0;
                int err_idx = 0;
 
-               BM_ITER(ele, &iter, bm, iter_types[i], NULL) {
+               BM_ITER (ele, &iter, bm, iter_types[i], NULL) {
                        if (!is_dirty) {
                                if (BM_elem_index_get(ele) != index) {
                                        err_val = BM_elem_index_get(ele);
index c8876e5..cc96cfb 100644 (file)
@@ -336,7 +336,7 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
                if (i == me->act_face) bm->act_face = f;
 
                j = 0;
-               BM_ITER_INDEX(l, &iter, bm, BM_LOOPS_OF_FACE, f, j) {
+               BM_ITER_INDEX (l, &iter, bm, BM_LOOPS_OF_FACE, f, j) {
                        /* Save index of correspsonding MLoop */
                        BM_elem_index_set(l, mpoly->loopstart + j); /* set_loop */
                }
@@ -355,8 +355,8 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
                 * but is an optimization, to avoid copying a bunch of interpolated customdata
                 * for each BMLoop (from previous BMLoops using the same edge), always followed
                 * by freeing the interpolated data and overwriting it with data from the Mesh. */
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                                int li = BM_elem_index_get(l);
                                CustomData_to_bmesh_block(&me->ldata, &bm->ldata, li, &l->head.data);
                                BM_elem_index_set(l, 0); /* set_loop */
@@ -379,9 +379,9 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
                BMFace  *face;
                MSelect *msel;
 
-               BM_ITER_INDEX(vert, &iter, bm, BM_VERTS_OF_MESH, NULL, i) { vert_array[i] = vert; }
-               BM_ITER_INDEX(edge, &iter, bm, BM_EDGES_OF_MESH, NULL, i) { edge_array[i] = edge; }
-               BM_ITER_INDEX(face, &iter, bm, BM_FACES_OF_MESH, NULL, i) { face_array[i] = face; }
+               BM_ITER_INDEX (vert, &iter, bm, BM_VERTS_OF_MESH, NULL, i) { vert_array[i] = vert; }
+               BM_ITER_INDEX (edge, &iter, bm, BM_EDGES_OF_MESH, NULL, i) { edge_array[i] = edge; }
+               BM_ITER_INDEX (face, &iter, bm, BM_FACES_OF_MESH, NULL, i) { face_array[i] = face; }
 
                for (i = 0, msel = me->mselect; i < me->totselect; i++, msel++) {
                        switch (msel->type) {
@@ -432,7 +432,7 @@ static BMVert **bm_to_mesh_vertex_map(BMesh *bm, int ototvert)
        vertMap = MEM_callocN(sizeof(*vertMap) * ototvert, "vertMap");
        if (CustomData_has_layer(&bm->vdata, CD_SHAPE_KEYINDEX)) {
                int *keyi;
-               BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        keyi = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX);
                        if (keyi) {
                                if (((index = *keyi) != ORIGINDEX_NONE) && (index < ototvert)) {
@@ -448,7 +448,7 @@ static BMVert **bm_to_mesh_vertex_map(BMesh *bm, int ototvert)
                }
        }
        else {
-               BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        if (i < ototvert) {
                                vertMap[i] = eve;
                        }
@@ -564,7 +564,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
        mesh_update_customdata_pointers(me, 0);
 
        i = 0;
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                float *bweight = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_BWEIGHT);
 
                mvert->bweight = bweight ? (char)((*bweight) * 255) : 0;
@@ -588,7 +588,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
 
        med = medge;
        i = 0;
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                float *crease = CustomData_bmesh_get(&bm->edata, e->head.data, CD_CREASE);
                float *bweight = CustomData_bmesh_get(&bm->edata, e->head.data, CD_BWEIGHT);
 
@@ -614,7 +614,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
 
        i = 0;
        j = 0;
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                mpoly->loopstart = j;
                mpoly->totloop = f->len;
                mpoly->mat_nr = f->mat_nr;
@@ -783,7 +783,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
 
                                ofs = MEM_callocN(sizeof(float) * 3 * bm->totvert,  "currkey->data");
                                mvert = me->mvert;
-                               BM_ITER_INDEX(eve, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+                               BM_ITER_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                                        keyi = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_SHAPE_KEYINDEX);
                                        if (keyi && *keyi != ORIGINDEX_NONE) {
                                                sub_v3_v3v3(ofs[i], mvert->co, fp[*keyi]);
@@ -806,7 +806,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess)
                        oldkey = currkey->data;
 
                        mvert = me->mvert;
-                       BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
 
                                if (currkey == actkey) {
                                        copy_v3_v3(fp, eve->co);
index f91e9d8..6f30134 100644 (file)
@@ -70,7 +70,7 @@ int BM_mesh_validate(BMesh *bm)
        bm->elem_index_dirty |= BM_ALL;
        BM_mesh_elem_index_ensure(bm, BM_ALL);
 
-       BM_ITER_INDEX(v, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (v, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                if (BM_elem_flag_test(v, BM_ELEM_SELECT | BM_ELEM_HIDDEN) == (BM_ELEM_SELECT | BM_ELEM_HIDDEN)) {
                        ERRMSG("vert %d: is hidden and selected", i);
                }
@@ -83,13 +83,13 @@ int BM_mesh_validate(BMesh *bm)
        }
 
        /* check edges */
-       BM_ITER_INDEX(e, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
                if (e->v1 == e->v2)
                ERRMSG("edge %d: duplicate index: %d", i, BM_elem_index_get(e->v1));
        }
 
        /* edge radial structure */
-       BM_ITER_INDEX(e, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (e, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
                if (BM_elem_flag_test(e, BM_ELEM_SELECT | BM_ELEM_HIDDEN) == (BM_ELEM_SELECT | BM_ELEM_HIDDEN)) {
                        ERRMSG("edge %d: is hidden and selected", i);
                }
@@ -117,7 +117,7 @@ int BM_mesh_validate(BMesh *bm)
        }
 
        /* face structure */
-       BM_ITER_INDEX(f, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (f, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
                BMLoop *l_iter;
                BMLoop *l_first;
 
index 20306d3..f4aa113 100644 (file)
@@ -286,8 +286,8 @@ BMEdge *BM_verts_connect(BMesh *bm, BMVert *v1, BMVert *v2, BMFace **r_f)
        BMFace *f_iter;
 
        /* be warned: this can do weird things in some ngon situation, see BM_face_legal_splits */
-       BM_ITER(f_iter, &fiter, bm, BM_FACES_OF_VERT, v1) {
-               BM_ITER(v_iter, &viter, bm, BM_FACES_OF_VERT, f_iter) {
+       BM_ITER (f_iter, &fiter, bm, BM_FACES_OF_VERT, v1) {
+               BM_ITER (v_iter, &viter, bm, BM_FACES_OF_VERT, f_iter) {
                        if (v_iter == v2) {
                                BMLoop *nl;
 
@@ -521,7 +521,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac,
                BMFace *f;
                BLI_array_staticdeclare(faces, 8);
 
-               BM_ITER(f, &iter, bm, BM_FACES_OF_VERT, kv) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_VERT, kv) {
                        BLI_array_append(faces, f);
                }
 
@@ -556,7 +556,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac,
                        for (i = 0; i < 2; i++) {
                                /* cant kill data we loop on, build a list and remove those */
                                BLI_array_empty(bad_faces);
-                               BM_ITER(f, &fiter, bm, BM_FACES_OF_VERT, verts[i]) {
+                               BM_ITER (f, &fiter, bm, BM_FACES_OF_VERT, verts[i]) {
                                        if (f->len < 3) {
                                                BLI_array_append(bad_faces, f);
                                        }
index a1cdcc6..32abaf1 100644 (file)
@@ -473,7 +473,7 @@ static int bmo_mesh_flag_count(BMesh *bm, const char htype, const short oflag,
 
        for (i = 0; i < 3; i++) {
                if (htype & flag_types[i]) {
-                       BM_ITER(ele_f, &iter, bm, iter_types[i], NULL) {
+                       BM_ITER (ele_f, &iter, bm, iter_types[i], NULL) {
                                if (BMO_elem_flag_test_bool(bm, ele_f, oflag) == test_for_enabled)
                                        count++;
                        }
@@ -508,7 +508,7 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *UNUSED(op), const char hty
 
        for (i = 0; i < 3; i++) {
                if (htype & flag_types[i]) {
-                       BM_ITER(ele, &iter, bm, iter_types[i], NULL) {
+                       BM_ITER (ele, &iter, bm, iter_types[i], NULL) {
                                BMO_elem_flag_disable(bm, ele, oflag);
                        }
                }
@@ -663,21 +663,21 @@ static void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot
                /* TODO - collapse these loops into one */
 
                if (htype & BM_VERT) {
-                       BM_ITER(ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                ((BMHeader **)output->data.p)[i] = ele;
                                i++;
                        }
                }
 
                if (htype & BM_EDGE) {
-                       BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                ((BMHeader **)output->data.p)[i] = ele;
                                i++;
                        }
                }
 
                if (htype & BM_FACE) {
-                       BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                                ((BMHeader **)output->data.p)[i] = ele;
                                i++;
                        }
@@ -714,7 +714,7 @@ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *sl
                /* TODO - collapse these loops into one */
 
                if (htype & BM_VERT) {
-                       BM_ITER(ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) &&
                                    BM_elem_flag_test_bool(ele, hflag) == test_for_enabled)
                                {
@@ -725,7 +725,7 @@ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *sl
                }
 
                if (htype & BM_EDGE) {
-                       BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) &&
                                    BM_elem_flag_test_bool(ele, hflag) == test_for_enabled)
                                {
@@ -736,7 +736,7 @@ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *sl
                }
 
                if (htype & BM_FACE) {
-                       BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                                if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) &&
                                    BM_elem_flag_test_bool(ele, hflag) == test_for_enabled)
                                {
@@ -828,7 +828,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo
                /* TODO - collapse these loops into one */
 
                if (htype & BM_VERT) {
-                       BM_ITER(ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                if (BMO_elem_flag_test_bool(bm, (BMElemF *)ele, oflag) == test_for_enabled) {
                                        ele_array[i] = ele;
                                        i++;
@@ -837,7 +837,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo
                }
 
                if (htype & BM_EDGE) {
-                       BM_ITER(ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                if (BMO_elem_flag_test_bool(bm, (BMElemF *)ele, oflag) == test_for_enabled) {
                                        ele_array[i] = ele;
                                        i++;
@@ -846,7 +846,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo
                }
 
                if (htype & BM_FACE) {
-                       BM_ITER(ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (ele, &iter, bm, BM_FACES_OF_MESH, NULL) {
                                if (BMO_elem_flag_test_bool(bm, (BMElemF *)ele, oflag) == test_for_enabled) {
                                        ele_array[i] = ele;
                                        i++;
@@ -1035,19 +1035,19 @@ static void bmo_flag_layer_alloc(BMesh *bm)
        bm->toolflagpool = newpool = BLI_mempool_create(sizeof(BMFlagLayer) * bm->totflags, 512, 512, 0);
        
        /* now go through and memcpy all the flags. Loops don't get a flag layer at this time.. */
-       BM_ITER_INDEX(ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, old_totflags_size);
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, old_totflags_size);
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, old_totflags_size);
@@ -1080,19 +1080,19 @@ static void bmo_flag_layer_free(BMesh *bm)
        bm->toolflagpool = newpool = BLI_mempool_create(new_totflags_size, 512, 512, BLI_MEMPOOL_SYSMALLOC);
        
        /* now go through and memcpy all the flag */
-       BM_ITER_INDEX(ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, new_totflags_size);
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, new_totflags_size);
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
                oldflags = ele->oflags;
                ele->oflags = BLI_mempool_calloc(newpool);
                memcpy(ele->oflags, oldflags, new_totflags_size);
@@ -1115,15 +1115,15 @@ static void bmo_flag_layer_clear(BMesh *bm)
        const int totflags_offset = bm->totflags - 1;
 
        /* now go through and memcpy all the flag */
-       BM_ITER_INDEX(ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                memset(ele->oflags + totflags_offset, 0, sizeof(BMFlagLayer));
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_EDGES_OF_MESH, NULL, i) {
                memset(ele->oflags + totflags_offset, 0, sizeof(BMFlagLayer));
                BM_elem_index_set(ele, i); /* set_inline */
        }
-       BM_ITER_INDEX(ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
+       BM_ITER_INDEX (ele, &iter, bm, BM_FACES_OF_MESH, NULL, i) {
                memset(ele->oflags + totflags_offset, 0, sizeof(BMFlagLayer));
                BM_elem_index_set(ele, i); /* set_inline */
        }
index 1b480ab..869ab4f 100644 (file)
@@ -164,7 +164,7 @@ float BM_face_area_calc(BMesh *bm, BMFace *f)
 
        BLI_array_fixedstack_declare(verts, BM_NGON_STACK_SIZE, f->len, __func__);
 
-       BM_ITER_INDEX(l, &iter, bm, BM_LOOPS_OF_FACE, f, i) {
+       BM_ITER_INDEX (l, &iter, bm, BM_LOOPS_OF_FACE, f, i) {
                copy_v3_v3(verts[i], l->v->co);
        }
 
@@ -360,7 +360,7 @@ void BM_vert_normal_update(BMesh *bm, BMVert *v)
 
        zero_v3(v->no);
 
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                /* Same calculation used in BM_mesh_normals_update */
                sub_v3_v3v3(vec1, l->v->co, l->prev->v->co);
                sub_v3_v3v3(vec2, l->next->v->co, l->v->co);
@@ -384,7 +384,7 @@ void BM_vert_normal_update_all(BMesh *bm, BMVert *v)
        BMIter iter;
        BMFace *f;
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_VERT, v) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_VERT, v) {
                BM_face_normal_update(bm, f);
        }
 
index b021fb4..c615f81 100644 (file)
@@ -125,7 +125,7 @@ BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v)
 
        BLI_assert(BM_edge_exists(v_prev, v) != NULL);
 
-       BM_ITER(l_iter, &liter, NULL, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l_iter, &liter, NULL, BM_LOOPS_OF_VERT, v) {
                if (l_iter->f == f) {
                        break;
                }
@@ -379,7 +379,7 @@ int BM_vert_edge_count_nonwire(BMVert *v)
        int count = 0;
        BMIter eiter;
        BMEdge *edge;
-       BM_ITER(edge, &eiter, NULL, BM_EDGES_OF_VERT, v) {
+       BM_ITER (edge, &eiter, NULL, BM_EDGES_OF_VERT, v) {
                if (edge->l) {
                        count++;
                }
@@ -416,7 +416,7 @@ int BM_vert_face_count(BMVert *v)
        BMLoop *l;
        BMIter iter;
 
-       BM_ITER(l, &iter, NULL, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &iter, NULL, BM_LOOPS_OF_VERT, v) {
                count++;
        }
 
@@ -877,7 +877,7 @@ BMEdge *BM_edge_exists(BMVert *v1, BMVert *v2)
        BMIter iter;
        BMEdge *e;
 
-       BM_ITER(e, &iter, NULL, BM_EDGES_OF_VERT, v1) {
+       BM_ITER (e, &iter, NULL, BM_EDGES_OF_VERT, v1) {
                if (e->v1 == v2 || e->v2 == v2)
                        return e;
        }
@@ -902,7 +902,7 @@ int BM_face_exists_overlap(BMesh *bm, BMVert **varr, int len, BMFace **r_overlap
        int i, amount;
 
        for (i = 0; i < len; i++) {
-               BM_ITER(f, &viter, bm, BM_FACES_OF_VERT, varr[i]) {
+               BM_ITER (f, &viter, bm, BM_FACES_OF_VERT, varr[i]) {
                        amount = BM_verts_in_face(bm, f, varr, len);
                        if (amount >= len) {
                                if (r_overlapface) {
@@ -932,7 +932,7 @@ int BM_face_exists(BMesh *bm, BMVert **varr, int len, BMFace **r_existface)
        int i, amount;
 
        for (i = 0; i < len; i++) {
-               BM_ITER(f, &viter, bm, BM_FACES_OF_VERT, varr[i]) {
+               BM_ITER (f, &viter, bm, BM_FACES_OF_VERT, varr[i]) {
                        amount = BM_verts_in_face(bm, f, varr, len);
                        if (amount == len && amount == f->len) {
                                if (r_existface) {
@@ -978,15 +978,15 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
        for (i = 0; i < len; i++) {
                /* save some time by looping over edge faces rather then vert faces
                 * will still loop over some faces twice but not as many */
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, earr[i]) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, earr[i]) {
                        BM_elem_flag_disable(f, BM_ELEM_INTERNAL_TAG);
-                       BM_ITER(v, &viter, bm, BM_VERTS_OF_FACE, f) {
+                       BM_ITER (v, &viter, bm, BM_VERTS_OF_FACE, f) {
                                BM_elem_flag_disable(v, BM_ELEM_INTERNAL_TAG);
                        }
                }
 
                /* clear all edge tags */
-               BM_ITER(e, &fiter, bm, BM_EDGES_OF_VERT, varr[i]) {
+               BM_ITER (e, &fiter, bm, BM_EDGES_OF_VERT, varr[i]) {
                        BM_elem_flag_disable(e, BM_ELEM_INTERNAL_TAG);
                }
        }
@@ -1005,10 +1005,10 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
        /* 1) tag all faces connected to edges - if all their verts are boundary */
        tot_tag = 0;
        for (i = 0; i < len; i++) {
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, earr[i]) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, earr[i]) {
                        if (!BM_elem_flag_test(f, BM_ELEM_INTERNAL_TAG)) {
                                ok = TRUE;
-                               BM_ITER(v, &viter, bm, BM_VERTS_OF_FACE, f) {
+                               BM_ITER (v, &viter, bm, BM_VERTS_OF_FACE, f) {
                                        if (!BM_elem_flag_test(v, BM_ELEM_INTERNAL_TAG)) {
                                                ok = FALSE;
                                                break;
@@ -1036,7 +1036,7 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
         *    check each have 2 tagges faces connected (faces that only use 'varr' verts) */
        ok = TRUE;
        for (i = 0; i < len; i++) {
-               BM_ITER(e, &fiter, bm, BM_EDGES_OF_VERT, varr[i]) {
+               BM_ITER (e, &fiter, bm, BM_EDGES_OF_VERT, varr[i]) {
 
                        if (/* non-boundary edge */
                            BM_elem_flag_test(e, BM_ELEM_INTERNAL_TAG) == FALSE &&
@@ -1045,7 +1045,7 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
                            BM_elem_flag_test(e->v2, BM_ELEM_INTERNAL_TAG) == TRUE)
                        {
                                int tot_face_tag = 0;
-                               BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
+                               BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, e) {
                                        if (BM_elem_flag_test(f, BM_ELEM_INTERNAL_TAG)) {
                                                tot_face_tag++;
                                        }
index cccda67..6f28311 100644 (file)
@@ -115,7 +115,7 @@ static void bmw_ShellWalker_begin(BMWalker *walker, void *data)
                        /* starting the walk at a vert, add all the edges
                         * to the worklist */
                        v = (BMVert *)h;
-                       BM_ITER(e, &eiter, walker->bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (e, &eiter, walker->bm, BM_EDGES_OF_VERT, v) {
                                bmw_ShellWalker_visitEdge(walker, e);
                        }
                        break;
@@ -151,7 +151,7 @@ static void *bmw_ShellWalker_step(BMWalker *walker)
 
        for (i = 0; i < 2; i++) {
                v = i ? e->v2 : e->v1;
-               BM_ITER(e2, &iter, walker->bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e2, &iter, walker->bm, BM_EDGES_OF_VERT, v) {
                        bmw_ShellWalker_visitEdge(walker, e2);
                }
        }
@@ -249,7 +249,7 @@ static void *bmw_ConnectedVertexWalker_step(BMWalker *walker)
 
        BMW_state_remove(walker);
 
-       BM_ITER(e, &iter, walker->bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &iter, walker->bm, BM_EDGES_OF_VERT, v) {
                v2 = BM_edge_other_vert(e, v);
                if (!BLI_ghash_haskey(walker->visithash, v2)) {
                        bmw_ConnectedVertexWalker_visitVertex(walker, v2);
@@ -450,7 +450,7 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
                BMFace *f_iter;
                BMFace *f_best = NULL;
 
-               BM_ITER(f_iter, &iter, walker->bm, BM_FACES_OF_EDGE, e) {
+               BM_ITER (f_iter, &iter, walker->bm, BM_FACES_OF_EDGE, e) {
                        if (f_best == NULL || f_best->len < f_iter->len) {
                                f_best = f_iter;
                        }
@@ -606,7 +606,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
                for (i = 0; i < 2; i++) {
                        v = i ? e->v2 : e->v1;
 
-                       BM_ITER(nexte, &eiter, walker->bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (nexte, &eiter, walker->bm, BM_EDGES_OF_VERT, v) {
                                if ((nexte->l == NULL) &&
                                    bmw_mask_check_edge(walker, nexte) &&
                                    !BLI_ghash_haskey(walker->visithash, nexte))
@@ -953,7 +953,7 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker)
         * mloopuv's coordinates. in addition, push on l->next if necessary */
        for (i = 0; i < 2; i++) {
                cl = i ? nl : l;
-               BM_ITER(l2, &liter, walker->bm, BM_LOOPS_OF_VERT, cl->v) {
+               BM_ITER (l2, &liter, walker->bm, BM_LOOPS_OF_VERT, cl->v) {
                        d1 = CustomData_bmesh_get_layer_n(&walker->bm->ldata,
                                                          cl->head.data, walker->layer);
                        
index 0165195..dd94e14 100644 (file)
@@ -80,7 +80,7 @@ static void calc_corner_co(BMesh *bm, BMLoop *l, const float fac, float r_co[3],
                copy_v3_v3(l_co_prev, l->prev->v->co);
                copy_v3_v3(l_co, l->v->co);
                
-               BM_ITER(l2, &iter, bm, BM_LOOPS_OF_VERT, l->v) {
+               BM_ITER (l2, &iter, bm, BM_LOOPS_OF_VERT, l->v) {
                        if (l2->f != l->f) {
                                copy_v3_v3(l_co_next, BM_edge_other_vert(l2->e, l2->next->v)->co);
                                break;
@@ -207,7 +207,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        
        BLI_smallhash_init(&hash);
        
-       BMO_ITER(e, &siter, bm, op, "geom", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "geom", BM_EDGE) {
                BMO_elem_flag_enable(bm, e, BEVEL_FLAG|BEVEL_DEL);
                BMO_elem_flag_enable(bm, e->v1, BEVEL_FLAG|BEVEL_DEL);
                BMO_elem_flag_enable(bm, e->v2, BEVEL_FLAG|BEVEL_DEL);
@@ -228,14 +228,14 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
 #endif
        }
        
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                BMO_elem_flag_enable(bm, v, VERT_OLD);
        }
 
 #if 0
        //a bit of cleaner code that, alas, doens't work.
        /* build edge tag */
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e->v1, BEVEL_FLAG) || BMO_elem_flag_test(bm, e->v2, BEVEL_FLAG)) {
                        BMIter liter;
                        BMLoop *l;
@@ -247,14 +247,14 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                BMO_elem_flag_enable(bm, e, EDGE_OLD);
                        }
                        
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
                                BMLoop *l2;
                                BMIter liter2;
                                
                                if (BMO_elem_flag_test(bm, l->f, BEVEL_FLAG))
                                        continue;
 
-                               BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_FACE, l->f) {
+                               BM_ITER (l2, &liter2, bm, BM_LOOPS_OF_FACE, l->f) {
                                        BM_elem_index_set(l2, BLI_array_count(tags)); /* set_loop */
                                        BLI_array_growone(tags);
 
@@ -277,7 +277,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
 #endif
        
        /* create and assign looptag structure */
-       BMO_ITER(e, &siter, bm, op, "geom", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "geom", BM_EDGE) {
                BMLoop *l;
                BMIter liter;
 
@@ -299,7 +299,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                
                /* find all faces surrounding e->v1 and, e->v2 */
                for (i = 0; i < 2; i++) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, i ? e->v2:e->v1) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, i ? e->v2:e->v1) {
                                BMLoop *l2;
                                BMIter liter2;
                                
@@ -308,7 +308,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                        continue;
                                
                                /* create tags for all loops in l-> */
-                               BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_FACE, l->f) {
+                               BM_ITER (l2, &liter2, bm, BM_LOOPS_OF_FACE, l->f) {
                                        BLI_array_growone(tags);
                                        BM_elem_index_set(l2, BLI_array_count(tags) - 1); /* set_loop */
                                        
@@ -329,13 +329,13 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
 
        bm->elem_index_dirty |= BM_EDGE;
        
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                BMIter eiter;
                
                if (!BMO_elem_flag_test(bm, v, BEVEL_FLAG))
                        continue;
                
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                        if (!BMO_elem_flag_test(bm, e, BEVEL_FLAG) && !ETAG_GET(e, v)) {
                                BMVert *v2;
                                float co[3];
@@ -364,7 +364,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                
                BMO_elem_flag_enable(bm, faces[i], FACE_OLD);
                
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
                        float co[3];
 
                        if (BMO_elem_flag_test(bm, l->e, BEVEL_FLAG)) {
@@ -438,7 +438,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                BLI_array_empty(verts);
                BLI_array_empty(edges);
                
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
                        BMVert *v2;
                        
                        tag = tags + BM_elem_index_get(l);
@@ -489,7 +489,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                int j;
                
                /* create quad spans between split edge */
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, faces[i]) {
                        BMVert *v1 = NULL, *v2 = NULL, *v3 = NULL, *v4 = NULL;
                        
                        if (!BMO_elem_flag_test(bm, l->e, BEVEL_FLAG))
@@ -516,7 +516,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                        BMIter eiter;
                                        BMVert *v = j ? v4 : v3;
 
-                                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+                                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                                if (!BM_vert_in_edge(e, v3) || !BM_vert_in_edge(e, v4))
                                                        continue;
                                                
@@ -600,7 +600,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                BMO_elem_flag_enable(bm, f, FACE_NEW|FACE_SPAN);
                                
                                /* un-tag edges in f for deletio */
-                               BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_FACE, f) {
+                               BM_ITER (l2, &liter2, bm, BM_LOOPS_OF_FACE, f) {
                                        BMO_elem_flag_disable(bm, l2->e, BEVEL_DEL);
                                }
                        }
@@ -611,7 +611,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        }
        
        /* fill in holes at vertices */
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                BMIter eiter;
                BMVert *vv, *vstart = NULL, *lastv = NULL;
                SmallHash tmphash;
@@ -625,7 +625,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                BLI_array_empty(verts);
                BLI_array_empty(edges);
                
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                        BMIter liter;
                        BMVert *v1 = NULL, *v2 = NULL;
                        BMLoop *l;
@@ -637,7 +637,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                continue;
                        
                        rad = 0;
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_EDGE, e) {
                                if (!BMO_elem_flag_test(bm, l->f, FACE_OLD))
                                        continue;
                                
@@ -685,7 +685,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                vstart = vstart ? vstart : verts[0];
                vv = vstart;
                do {
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, vv) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, vv) {
                                BMVert *vv2 = BM_edge_other_vert(e, vv);
                                
                                if (vv2 != lastv && BLI_smallhash_haskey(&tmphash, (intptr_t)vv2)) {
@@ -730,7 +730,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                        lastv = NULL;
                        BLI_array_empty(edges);
                        do {
-                               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, vv) {
+                               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, vv) {
                                        BMVert *vv2 = BM_edge_other_vert(e, vv);
                                        
                                        if (vv2 != lastv && BLI_smallhash_haskey(&tmphash, (intptr_t)vv2)) {
@@ -787,7 +787,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                BMIter liter;
                BMFace *f = faces[i];
                
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        BMLoop *l2;
                        BMIter liter2;
                        
@@ -795,7 +795,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                        if (!tag->newv)
                                continue;
                        
-                       BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_VERT, tag->newv) {
+                       BM_ITER (l2, &liter2, bm, BM_LOOPS_OF_VERT, tag->newv) {
                                if (!BMO_elem_flag_test(bm, l2->f, FACE_NEW) || (l2->v != tag->newv && l2->v != l->v))
                                        continue;
                                
@@ -812,7 +812,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                                        BMLoop *l3;
                                        BMIter liter3;
                                        
-                                       BM_ITER(l3, &liter3, bm, BM_LOOPS_OF_FACE, l2->f) {
+                                       BM_ITER (l3, &liter3, bm, BM_LOOPS_OF_FACE, l2->f) {
                                                BM_loop_interp_multires(bm, l3, l->f);
                                        }
                                }
@@ -821,7 +821,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        }
        
        /* handle vertices along boundary edge */
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, VERT_OLD) &&
                    BMO_elem_flag_test(bm, v, BEVEL_FLAG) &&
                    !BMO_elem_flag_test(bm, v, BEVEL_DEL))
@@ -830,7 +830,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                        BMLoop *lorig = NULL;
                        BMIter liter;
                        
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                                // BMIter liter2;
                                // BMLoop *l2 = l->v == v ? l : l->next, *l3;
                                
@@ -843,7 +843,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
                        if (!lorig)
                                continue;
                        
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                                BMLoop *l2 = l->v == v ? l : l->next;
                                
                                BM_elem_attrs_copy(bm, bm, lorig->f, l2->f);
@@ -853,7 +853,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        }
 #if 0
        /* clean up any remaining 2-edged face */
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                if (f->len == 2) {
                        BMFace *faces[2] = {f, BM_FACE_FIRST_LOOP(f)->radial_next->f};
                        
@@ -868,7 +868,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        BMO_op_callf(bm, "del geom=%fv context=%i", BEVEL_DEL, DEL_VERTS);
 
        /* clean up any edges that might not get properly delete */
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e, EDGE_OLD) && !e->l)
                        BMO_elem_flag_enable(bm, e, BEVEL_DEL);
        }
index 69a9b75..98bf22f 100644 (file)
@@ -135,7 +135,7 @@ static BMVert *get_outer_vert(BMesh *bm, BMEdge *e)
        int i;
 
        i = 0;
-       BM_ITER(e2, &iter, bm, BM_EDGES_OF_VERT, e->v1) {
+       BM_ITER (e2, &iter, bm, BM_EDGES_OF_VERT, e->v1) {
                if (BMO_elem_flag_test(bm, e2, EDGE_MARK)) {
                        i++;
                }
@@ -191,7 +191,7 @@ static void bm_vert_loop_pair(BMesh *bm, BMVert *v1, BMVert *v2, BMLoop **l1, BM
        if ((v1->e && v1->e->l) &&
            (v2->e && v2->e->l))
        {
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v1) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v1) {
                        if (l->prev->v == v2) {
                                *l1 = l;
                                *l2 = l->prev;
@@ -225,7 +225,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
 
        BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
 
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                if (!BMO_elem_flag_test(bm, e, EDGE_DONE)) {
                        BMVert *v, *ov;
                        /* BMEdge *e2, *e3, *oe = e; */ /* UNUSED */
@@ -241,7 +241,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
                        do {
                                v = BM_edge_other_vert(e2, v);
                                nexte = NULL;
-                               BM_ITER(e3, &iter, bm, BM_EDGES_OF_VERT, v) {
+                               BM_ITER (e3, &iter, bm, BM_EDGES_OF_VERT, v) {
                                        if (e3 != e2 && BMO_elem_flag_test(bm, e3, EDGE_MARK)) {
                                                if (nexte == NULL) {
                                                        nexte = e3;
@@ -278,7 +278,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
                                BMO_elem_flag_enable(bm, e2, EDGE_DONE);
                                
                                v = BM_edge_other_vert(e2, v);
-                               BM_ITER(e3, &iter, bm, BM_EDGES_OF_VERT, v) {
+                               BM_ITER (e3, &iter, bm, BM_EDGES_OF_VERT, v) {
                                        if (e3 != e2 && BMO_elem_flag_test(bm, e3, EDGE_MARK) && !BMO_elem_flag_test(bm, e3, EDGE_DONE)) {
                                                break;
                                        }
index bf34806..a090536 100644 (file)
@@ -225,7 +225,7 @@ static int UNUSED_FUNCTION(rotsys_fill_faces)(BMesh *bm, EdgeData *edata, VertDa
        SmallHash visithash, *hash = &visithash;
        int i;
        
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                BMEdge *e2, *starte;
                BMVert *startv;
                int rad, ok;
@@ -366,7 +366,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
        
 #define SIGN(n) ((n)<0.0f)
        
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                BMIter eiter;
                float no[3], cent[3];
                int j, k = 0, totedge = 0;
@@ -376,7 +376,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
                
                BLI_array_empty(edges);
                
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                        if (BMO_elem_flag_test(bm, e, EDGE_MARK)) {
                                BLI_array_append(edges, e);
                                totedge++;
@@ -581,7 +581,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
 #if 0
        /* create visualizing geometr */
        BMVert *lastv;
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                BMVert *v2;
                BMFace *f;
                int totedge = BM_vert_edge_count(v);
@@ -915,12 +915,12 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
        
        BM_mesh_elem_index_ensure(bm, BM_VERT);
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                BMO_elem_flag_enable(bm, f, ELE_ORIG);
        }
 
        i = 0;
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                BM_elem_index_set(e, i); /* set_inline */
                
                if (!BMO_elem_flag_test(bm, e, EDGE_MARK)) {
@@ -937,7 +937,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
                edge = NULL;
                group = 0;
                
-               BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+               BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                        /* if restrict is on, only start on faces in the restrict map */
                        if (use_restrict && !BMO_slot_map_contains(bm, op, "restrict", e))
                                continue;
@@ -1076,7 +1076,7 @@ static BMEdge *edge_next(BMesh *bm, BMEdge *e)
        int i;
 
        for (i = 0; i < 2; i++) {
-               BM_ITER(e2, &iter, bm, BM_EDGES_OF_VERT, i ? e->v2 : e->v1) {
+               BM_ITER (e2, &iter, bm, BM_EDGES_OF_VERT, i ? e->v2 : e->v1) {
                        if ((BMO_elem_flag_test(bm, e2, EDGE_MARK)) &&
                            (!BMO_elem_flag_test(bm, e2, EDGE_VIS)) &&
                            (e2 != e))
@@ -1104,7 +1104,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
        
        /* validate that each edge has at most one other tagged edge in the
         * disk cycle around each of it's vertices */
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                for (i = 0; i < 2; i++) {
                        count = BMO_vert_edge_flags_count(bm, i ? e->v2 : e->v1, EDGE_MARK);
                        if (count > 2) {
@@ -1126,7 +1126,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
        /* find connected loops within the input edge */
        count = 0;
        while (1) {
-               BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+               BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                        if (!BMO_elem_flag_test(bm, e, EDGE_VIS)) {
                                if (BMO_vert_edge_flags_count(bm, e->v1, EDGE_MARK) == 1 ||
                                    BMO_vert_edge_flags_count(bm, e->v2, EDGE_MARK) == 1)
@@ -1280,7 +1280,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
        const short mat_nr = BMO_slot_int_get(op, "mat_nr");
 
        /* count number of each element type we were passe */
-       BMO_ITER(h, &oiter, bm, op, "geom", BM_VERT|BM_EDGE|BM_FACE) {
+       BMO_ITER (h, &oiter, bm, op, "geom", BM_VERT|BM_EDGE|BM_FACE) {
                switch (h->htype) {
                        case BM_VERT: totv++; break;
                        case BM_EDGE: tote++; break;
@@ -1314,10 +1314,10 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
                int ok = TRUE;
 
 
-               BMO_ITER(v, &oiter, bm, op, "geom", BM_VERT) {
+               BMO_ITER (v, &oiter, bm, op, "geom", BM_VERT) {
                        /* count how many flagged edges this vertex uses */
                        int tot_edges = 0;
-                       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                                if (BMO_elem_flag_test(bm, e, ELE_NEW)) {
                                        tot_edges++;
                                        if (tot_edges > 2) {
@@ -1392,7 +1392,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
 
        /* now, count how many verts we have */
        amount = 0;
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, ELE_NEW)) {
                        verts[amount] = v;
                        amount++;
@@ -1459,7 +1459,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
                BMVert **vert_arr = MEM_mallocN(sizeof(BMVert **) * totv, __func__);
                int i = 0;
 
-               BMO_ITER(v, &oiter, bm, op, "geom", BM_VERT) {
+               BMO_ITER (v, &oiter, bm, op, "geom", BM_VERT) {
                        vert_arr[i] = v;
                        i++;
                }
index 88b8eef..b694084 100644 (file)
@@ -93,7 +93,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
                BMIter viter;
                BMVert *v;
 
-               BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                        BMO_elem_flag_set(bm, v, VERT_MARK, (BM_vert_edge_count(v) != 2));
                }
        }
@@ -101,7 +101,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
        BMO_slot_buffer_flag_enable(bm, op, "faces", BM_FACE, FACE_MARK);
        
        /* collect region */
-       BMO_ITER(f, &oiter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &oiter, bm, op, "faces", BM_FACE) {
 
                if (!BMO_elem_flag_test(bm, f, FACE_MARK)) {
                        continue;
@@ -171,7 +171,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
                BMIter viter;
                BMVert *v;
 
-               BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                        if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
                                if (BM_vert_edge_count(v) == 2) {
                                        BM_vert_collapse_edge(bm, v->e, v, TRUE);
@@ -208,7 +208,7 @@ void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
        int i;
 
 
-       BMO_ITER(e, &oiter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &oiter, bm, op, "edges", BM_EDGE) {
                if (BM_edge_face_pair(e, &fa, &fb)) {
                        BMO_elem_flag_enable(bm, e->v1, VERT_MARK);
                        BMO_elem_flag_enable(bm, e->v2, VERT_MARK);
@@ -219,7 +219,7 @@ void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, VERT_MARK) && BM_vert_edge_count(v) == 2) {
                        BLI_array_append(verts, v);
                }
@@ -257,12 +257,12 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
        int use_verts = BMO_slot_bool_get(op, "use_verts");
 
        if (use_verts) {
-               BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                        BMO_elem_flag_set(bm, v, VERT_MARK, (BM_vert_edge_count(v) != 2));
                }
        }
 
-       BMO_ITER(e, &eiter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &eiter, bm, op, "edges", BM_EDGE) {
                BMFace *fa, *fb;
 
                if (BM_edge_face_pair(e, &fa, &fb)) {
@@ -276,7 +276,7 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
        }
 
        if (use_verts) {
-               BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                        if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
                                if (BM_vert_edge_count(v) == 2) {
                                        BM_vert_collapse_edge(bm, v->e, v, TRUE);
index 24e25ef..1a06743 100644 (file)
@@ -163,8 +163,8 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
        BMO_elem_flag_enable(target_mesh, target_face, DUPE_NEW);
        
        /* copy per-loop custom data */
-       BM_ITER(source_loop, &iter, source_mesh, BM_LOOPS_OF_FACE, source_face) {
-               BM_ITER(target_loop, &iter2, target_mesh, BM_LOOPS_OF_FACE, target_face) {
+       BM_ITER (source_loop, &iter, source_mesh, BM_LOOPS_OF_FACE, source_face) {
+               BM_ITER (target_loop, &iter2, target_mesh, BM_LOOPS_OF_FACE, target_face) {
                        if (BLI_ghash_lookup(vhash, source_loop->v) == target_loop->v) {
                                BM_elem_attrs_copy(source_mesh, target_mesh, source_loop, target_loop);
                                break;
@@ -201,7 +201,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
        ehash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh dupeops e");
 
        /* duplicate flagged vertices */
-       BM_ITER(v, &viter, source, BM_VERTS_OF_MESH, source) {
+       BM_ITER (v, &viter, source, BM_VERTS_OF_MESH, source) {
                if (BMO_elem_flag_test(source, v, DUPE_INPUT) &&
                    !BMO_elem_flag_test(source, v, DUPE_DONE))
                {
@@ -210,7 +210,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
 
                        v2 = copy_vertex(source, v, target, vhash);
 
-                       BM_ITER(f, &iter, source, BM_FACES_OF_VERT, v) {
+                       BM_ITER (f, &iter, source, BM_FACES_OF_VERT, v) {
                                if (BMO_elem_flag_test(source, f, DUPE_INPUT)) {
                                        isolated = 0;
                                        break;
@@ -218,7 +218,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
                        }
 
                        if (isolated) {
-                               BM_ITER(e, &iter, source, BM_EDGES_OF_VERT, v) {
+                               BM_ITER (e, &iter, source, BM_EDGES_OF_VERT, v) {
                                        if (BMO_elem_flag_test(source, e, DUPE_INPUT)) {
                                                isolated = 0;
                                                break;
@@ -235,7 +235,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
        }
 
        /* now we dupe all the edges */
-       BM_ITER(e, &eiter, source, BM_EDGES_OF_MESH, source) {
+       BM_ITER (e, &eiter, source, BM_EDGES_OF_MESH, source) {
                if (BMO_elem_flag_test(source, e, DUPE_INPUT) &&
                    !BMO_elem_flag_test(source, e, DUPE_DONE))
                {
@@ -255,10 +255,10 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
        }
 
        /* first we dupe all flagged faces and their elements from source */
-       BM_ITER(f, &fiter, source, BM_FACES_OF_MESH, source) {
+       BM_ITER (f, &fiter, source, BM_FACES_OF_MESH, source) {
                if (BMO_elem_flag_test(source, f, DUPE_INPUT)) {
                        /* vertex pass */
-                       BM_ITER(v, &viter, source, BM_VERTS_OF_FACE, f) {
+                       BM_ITER (v, &viter, source, BM_VERTS_OF_FACE, f) {
                                if (!BMO_elem_flag_test(source, v, DUPE_DONE)) {
                                        copy_vertex(source, v, target, vhash);
                                        BMO_elem_flag_enable(source, v, DUPE_DONE);
@@ -266,7 +266,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target)
                        }
 
                        /* edge pass */
-                       BM_ITER(e, &eiter, source, BM_EDGES_OF_FACE, f) {
+                       BM_ITER (e, &eiter, source, BM_EDGES_OF_FACE, f) {
                                if (!BMO_elem_flag_test(source, e, DUPE_DONE)) {
                                        copy_edge(op, source, e, target, vhash, ehash);
                                        BMO_elem_flag_enable(source, e, DUPE_DONE);
index dd03401..05703ce 100644 (file)
@@ -60,7 +60,7 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
        vtouch = MEM_callocN(sizeof(char) * bm->totvert, __func__);
 
        /* tag all boundary verts so as not to untag an edge which is inbetween only 2 faces [] */
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
 
                /* unrelated to flag assignment in this function - since this is the
                 * only place we loop over all edges, disable tag */
@@ -81,14 +81,14 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
 
        /* single marked edges unconnected to any other marked edges
         * are illegal, go through and unmark them */
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                /* lame, but we don't want the count to exceed 255,
                 * so just count to 2, its all we need */
                unsigned char *vt;
                vt = &vtouch[BM_elem_index_get(e->v1)]; if (*vt < 2) (*vt)++;
                vt = &vtouch[BM_elem_index_get(e->v2)]; if (*vt < 2) (*vt)++;
        }
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                if (vtouch[BM_elem_index_get(e->v1)] == 1 &&
                    vtouch[BM_elem_index_get(e->v2)] == 1)
                {
@@ -118,7 +118,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
                 * This is needed so we don't split off the edge but then none of its verts which
                 * would leave a duplicate edge.
                 */
-               BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+               BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                        if (UNLIKELY((BMO_elem_flag_test(bm, e->v1, VERT_SEAM) == FALSE &&
                                      (BMO_elem_flag_test(bm, e->v2, VERT_SEAM) == FALSE))))
                        {
@@ -130,7 +130,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
 
        bm_edgesplit_validate_seams(bm, op);
 
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                if (BMO_elem_flag_test(bm, e, EDGE_SEAM)) {
                        /* this flag gets copied so we can be sure duplicate edges get it too (important) */
                        BM_elem_flag_enable(e, BM_ELEM_INTERNAL_TAG);
@@ -146,7 +146,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
        }
 
        if (use_verts) {
-               BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+               BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                        if (BMO_elem_flag_test(bm, e->v1, VERT_SEAM) == FALSE) {
                                BM_elem_flag_disable(e->v1, BM_ELEM_TAG);
                        }
@@ -156,7 +156,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                if (BMO_elem_flag_test(bm, e, EDGE_SEAM)) {
                        if (BM_elem_flag_test(e->v1, BM_ELEM_TAG)) {
                                BM_elem_flag_disable(e->v1, BM_ELEM_TAG);
index ef08331..af62aba 100644 (file)
@@ -56,13 +56,13 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
        BLI_array_declare(edges);
        int i;
 
-       BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
                BLI_array_empty(edges);
                BLI_array_growitems(edges, f->len);
 
                i = 0;
                firstv = lastv = NULL;
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        v = BM_vert_create(bm, l->v->co, l->v);
 
                        /* skip on the first iteration */
@@ -93,7 +93,7 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
                BM_elem_attrs_copy(bm, bm, f, f2);
 
                l2 = BM_iter_new(&liter2, bm, BM_LOOPS_OF_FACE, f2);
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        BM_elem_attrs_copy(bm, bm, l, l2);
 
                        l3 = l->next;
@@ -175,7 +175,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
        BMEdge *e, *e2;
        BMFace *f;
        
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                BMO_elem_flag_enable(bm, e, EXT_INPUT);
                BMO_elem_flag_enable(bm, e->v1, EXT_INPUT);
                BMO_elem_flag_enable(bm, e->v2, EXT_INPUT);
@@ -258,7 +258,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
        /* if one flagged face is bordered by an un-flagged face, then we delete
         * original geometry unless caller explicitly asked to keep it. */
        if (!BMO_slot_bool_get(op, "alwayskeeporig")) {
-               BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
 
                        int edge_face_tot;
 
@@ -269,7 +269,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
                        found = FALSE; /* found a face that isn't input? */
                        edge_face_tot = 0; /* edge/face count */
 
-                       BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
+                       BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, e) {
                                if (!BMO_elem_flag_test(bm, f, EXT_INPUT)) {
                                        found = TRUE;
                                        delorig = TRUE;
@@ -287,10 +287,10 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
        }
 
        /* calculate verts to delete */
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                found = FALSE;
 
-               BM_ITER(e, &viter, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &viter, bm, BM_EDGES_OF_VERT, v) {
                        if (!BMO_elem_flag_test(bm, e, EXT_INPUT) || !BMO_elem_flag_test(bm, e, EXT_DEL)) {
                                found = TRUE;
                                break;
@@ -299,7 +299,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
 
                /* avoid an extra loop */
                if (found == TRUE) {
-                       BM_ITER(f, &viter, bm, BM_FACES_OF_VERT, v) {
+                       BM_ITER (f, &viter, bm, BM_FACES_OF_VERT, v) {
                                if (!BMO_elem_flag_test(bm, f, EXT_INPUT)) {
                                        found = TRUE;
                                        break;
@@ -312,7 +312,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
                }
        }
        
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, f, EXT_INPUT)) {
                        BMO_elem_flag_enable(bm, f, EXT_DEL);
                }
@@ -335,7 +335,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
        
        /* if not delorig, reverse loops of original face */
        if (!delorig) {
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        if (BMO_elem_flag_test(bm, f, EXT_INPUT)) {
                                BM_face_normal_flip(bm, f);
                        }
@@ -418,18 +418,18 @@ static void calc_solidify_normals(BMesh *bm)
        /* can't use BM_edge_face_count because we need to count only marked faces */
        int *edge_face_count = MEM_callocN(sizeof(int) * bm->totedge, __func__);
 
-       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                BM_elem_flag_enable(v, BM_ELEM_TAG);
        }
 
        BM_mesh_elem_index_ensure(bm, BM_EDGE);
 
-       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, f, FACE_MARK)) {
                        continue;
                }
 
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_FACE, f) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_FACE, f) {
 
                        /* And mark all edges and vertices on the
                         * marked faces */
@@ -440,7 +440,7 @@ static void calc_solidify_normals(BMesh *bm)
                }
        }
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, e, EDGE_MARK)) {
                        continue;
                }
@@ -458,7 +458,7 @@ static void calc_solidify_normals(BMesh *bm)
        MEM_freeN(edge_face_count);
        edge_face_count = NULL; /* don't re-use */
 
-       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_vert_is_manifold(v)) {
                        BMO_elem_flag_enable(bm, v, VERT_NONMAN);
                        continue;
@@ -469,7 +469,7 @@ static void calc_solidify_normals(BMesh *bm)
                }
        }
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
 
                /* If the edge is not part of a the solidify region
                 * its normal should not be considered */
@@ -485,7 +485,7 @@ static void calc_solidify_normals(BMesh *bm)
 
                f1 = f2 = NULL;
 
-               BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
+               BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, e) {
                        if (BMO_elem_flag_test(bm, f, FACE_MARK)) {
                                if (f1 == NULL) {
                                        f1 = f;
@@ -530,7 +530,7 @@ static void calc_solidify_normals(BMesh *bm)
        }
 
        /* normalize accumulated vertex normal */
-       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, v, VERT_MARK)) {
                        continue;
                }
@@ -542,7 +542,7 @@ static void calc_solidify_normals(BMesh *bm)
                else if (normalize_v3(v->no) == 0.0f && !BM_elem_flag_test(v, BM_ELEM_TAG)) {
                        /* exceptional case, totally flat. use the normal
                         * of any marked face around the vertex */
-                       BM_ITER(f, &fiter, bm, BM_FACES_OF_VERT, v) {
+                       BM_ITER (f, &fiter, bm, BM_FACES_OF_VERT, v) {
                                if (BMO_elem_flag_test(bm, f, FACE_MARK)) {
                                        break;
                                }
@@ -571,13 +571,13 @@ static void solidify_add_thickness(BMesh *bm, const float dist)
 
        BM_mesh_elem_index_ensure(bm, BM_VERT);
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, f, FACE_MARK)) {
                        continue;
                }
 
                BLI_array_growitems(verts, f->len);
-               BM_ITER_INDEX(l, &loopIter, bm, BM_LOOPS_OF_FACE, f, i) {
+               BM_ITER_INDEX (l, &loopIter, bm, BM_LOOPS_OF_FACE, f, i) {
                        verts[i] = l->v->co;
                }
 
@@ -585,7 +585,7 @@ static void solidify_add_thickness(BMesh *bm, const float dist)
                angle_poly_v3(face_angles, (const float **)verts, f->len);
 
                i = 0;
-               BM_ITER(l, &loopIter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &loopIter, bm, BM_LOOPS_OF_FACE, f) {
                        v = l->v;
                        index = BM_elem_index_get(v);
                        vert_accum[index] += face_angles[i];
@@ -597,7 +597,7 @@ static void solidify_add_thickness(BMesh *bm, const float dist)
                BLI_array_empty(face_angles);
        }
 
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                index = BM_elem_index_get(v);
                if (vert_accum[index]) { /* zero if unselected */
                        madd_v3_v3fl(v->co, v->no, dist * (vert_angles[index] / vert_accum[index]));
index 1c823e7..38fa723 100644 (file)
@@ -122,7 +122,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
 
        /* first count all inset edges we will split */
        /* fill in array and initialize tagging */
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (
                    /* tag if boundary is enabled */
                    (use_boundary && BM_edge_is_boundary(e) && BM_elem_flag_test(e->l->f, BM_ELEM_TAG)) ||
@@ -152,7 +152,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
 
        /* fill in array and initialize tagging */
        es = edge_info;
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                i = BM_elem_index_get(e);
                if (i != -1) {
                        /* calc edge-split info */
@@ -246,7 +246,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
                                        int vecpair[2];
 
                                        /* find adjacent */
-                                       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v_split) {
+                                       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v_split) {
                                                if (BM_elem_flag_test(e, BM_ELEM_TAG) &&
                                                    e->l && BM_elem_flag_test(e->l->f, BM_ELEM_TAG))
                                                {
@@ -411,7 +411,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
                                        if (r_vout_len > 2) {
                                                int ok = TRUE;
                                                /* last step, NULL this vertex if has a tagged face */
-                                               BM_ITER(f, &iter, bm, BM_FACES_OF_VERT, v_split) {
+                                               BM_ITER (f, &iter, bm, BM_FACES_OF_VERT, v_split) {
                                                        if (BM_elem_flag_test(f, BM_ELEM_TAG)) {
                                                                ok = FALSE;
                                                                break;
index 0102811..a31b635 100644 (file)
@@ -237,15 +237,15 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
        int i, totedge;
 
        /* flag all edges of all input face */
-       BMO_ITER(f1, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f1, &siter, bm, op, "faces", BM_FACE) {
                BMO_elem_flag_enable(bm, f1, FACE_INPUT);
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f1) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f1) {
                        BMO_elem_flag_enable(bm, l->e, EDGE_MARK);
                }
        }
 
        /* unflag edges that are invalid; e.g. aren't surrounded by triangle */
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, e, EDGE_MARK))
                        continue;
 
@@ -266,7 +266,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
        }
        
        i = 0;
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                BMVert *v1, *v2, *v3, *v4;
                BMFace *f1, *f2;
                float measure;
@@ -323,7 +323,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
                BMO_elem_flag_enable(bm, e, EDGE_CHOSEN);
        }
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, e, EDGE_CHOSEN))
                        continue;
 
@@ -332,7 +332,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
                BM_faces_join_pair(bm, f1, f2, e, TRUE);
        }
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e, EDGE_MARK)) {
                        /* ok, this edge wasn't merged, check if it's
                         * in a 2-tri-pair island, and if so merg */
@@ -344,7 +344,7 @@ void bmo_join_triangles_exec(BMesh *bm, BMOperator *op)
                                continue;
 
                        for (i = 0; i < 2; i++) {
-                               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, i ? f2 : f1) {
+                               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, i ? f2 : f1) {
                                        if (l->e != e && BMO_elem_flag_test(bm, l->e, EDGE_MARK)) {
                                                break;
                                        }
index 17a00f5..003cb49 100644 (file)
@@ -70,7 +70,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
        /* create old -> new mappin */
        i = 0;
        /* v2 = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); */ /* UNUSED */
-       BMO_ITER(v, &siter, bm, &dupeop, "newout", BM_VERT) {
+       BMO_ITER (v, &siter, bm, &dupeop, "newout", BM_VERT) {
                BLI_array_growone(vmap);
                vmap[i] = v;
                /* v2 = BM_iter_step(&iter); */ /* UNUSED */
@@ -101,8 +101,8 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
                int totlayer;
                BMIter liter;
 
-               BMO_ITER(f, &siter, bm, &dupeop, "newout", BM_FACE) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BMO_ITER (f, &siter, bm, &dupeop, "newout", BM_FACE) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                                totlayer = CustomData_number_of_layers(&bm->ldata, CD_MLOOPUV);
                                for (i = 0; i < totlayer; i++) {
                                        luv = CustomData_bmesh_get_n(&bm->ldata, l->head.data, CD_MLOOPUV, i);
index 4e89b7b..ec2504c 100644 (file)
@@ -370,7 +370,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
        }
 
        /* and now do imat */
-       BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, eve, VERT_MARK)) {
                        mul_m4_v3(mat, eve->co);
                }
@@ -415,7 +415,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
 
                eftemp = BM_face_create_quad_tri(bm, v1, v2, v3, NULL, NULL, FALSE);
                
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, eftemp) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, eftemp) {
                        BMO_elem_flag_enable(bm, l->e, EDGE_MARK);
                }
 
@@ -437,7 +437,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
        }
 
        /* must transform after because of sphere subdivision */
-       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
                        mul_m4_v3(mat, v->co);
                }
index d126da5..3eec943 100644 (file)
@@ -43,7 +43,7 @@ static void remdoubles_splitface(BMFace *f, BMesh *bm, BMOperator *op)
        BMVert *v2, *doub;
        int split = FALSE;
 
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                v2 = BMO_slot_map_ptr_get(bm, op, "targetmap", l->v);
                /* ok: if v2 is NULL (e.g. not in the map) then it's
                 *     a target vert, otherwise it's a double */
@@ -108,7 +108,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
        int a, b;
 
        /* mark merge verts for deletion */
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                if ((v2 = BMO_slot_map_ptr_get(bm, op, "targetmap", v))) {
                        BMO_elem_flag_enable(bm, v, ELE_DEL);
 
@@ -119,11 +119,11 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
 
        /* check if any faces are getting their own corners merged
           together, split face if so */
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                remdoubles_splitface(f, bm, op);
        }
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (BMO_elem_flag_test(bm, e->v1, ELE_DEL) || BMO_elem_flag_test(bm, e->v2, ELE_DEL)) {
                        v = BMO_slot_map_ptr_get(bm, op, "targetmap", e->v1);
                        v2 = BMO_slot_map_ptr_get(bm, op, "targetmap", e->v2);
@@ -143,9 +143,9 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
        }
 
        /* BMESH_TODO, stop abusing face index here */
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                BM_elem_index_set(f, 0); /* set_dirty! */
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        if (BMO_elem_flag_test(bm, l->v, ELE_DEL)) {
                                BMO_elem_flag_enable(bm, f, FACE_MARK|ELE_DEL);
                        }
@@ -158,7 +158,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
 
        /* faces get "modified" by creating new faces here, then at the
           end the old faces are deleted */
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, f, FACE_MARK))
                        continue;
 
@@ -170,7 +170,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
                BLI_array_empty(edges);
                BLI_array_empty(loops);
                a = 0;
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        v = l->v;
                        v2 = l->next->v;
                        if (BMO_elem_flag_test(bm, v, ELE_DEL)) {
@@ -218,7 +218,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op)
                        BM_elem_attrs_copy(bm, bm, f, f2);
 
                        a = 0;
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f2) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f2) {
                                l2 = loops[a];
                                BM_elem_attrs_copy(bm, bm, l2, l);
 
@@ -269,7 +269,7 @@ void bmo_pointmerge_facedata_exec(BMesh *bm, BMOperator *op)
                return;
 
        fac = 1.0f / tot;
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, snapv) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, snapv) {
                if (!firstl) {
                        firstl = l;
                }
@@ -290,8 +290,8 @@ void bmo_pointmerge_facedata_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
-               BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, v) {
+       BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
+               BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, v) {
                        if (l == firstl) {
                                continue;
                        }
@@ -318,8 +318,8 @@ void bmo_vert_average_facedata_exec(BMesh *bm, BMOperator *op)
                type = bm->ldata.layers[i].type;
                CustomData_data_initminmax(type, &min, &max);
 
-               BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
-                       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, v) {
+               BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
+                       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, v) {
                                block = CustomData_bmesh_get_layer_n(&bm->ldata, l->head.data, i);
                                CustomData_data_dominmax(type, block, &min, &max);
                        }
@@ -329,8 +329,8 @@ void bmo_vert_average_facedata_exec(BMesh *bm, BMOperator *op)
                CustomData_data_multiply(type, &max, 0.5f);
                CustomData_data_add(type, &min, &max);
 
-               BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
-                       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, v) {
+               BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
+                       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, v) {
                                block = CustomData_bmesh_get_layer_n(&bm->ldata, l->head.data, i);
                                CustomData_data_copy_value(type, &min, block);
                        }
@@ -350,7 +350,7 @@ void bmo_pointmerge_exec(BMesh *bm, BMOperator *op)
        //BMO_op_callf(bm, "collapse_uvs edges=%s", op, "edges");
        BMO_op_init(bm, &weldop, "weldverts");
        
-       BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
                if (!snapv) {
                        snapv = v;
                        copy_v3_v3(snapv->co, vec);
@@ -384,7 +384,7 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
                 BMW_FLAG_NOP, /* no need to use BMW_FLAG_TEST_HIDDEN, already marked data */
                 BMW_NIL_LAY);
 
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, e, EDGE_MARK))
                        continue;
 
@@ -444,8 +444,8 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer)
                 BMW_FLAG_NOP, /* no need to use BMW_FLAG_TEST_HIDDEN, already marked data */
                 layer);
 
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        if (BMO_elem_flag_test(bm, l->e, EDGE_MARK)) {
                                /* walk */
                                BLI_array_empty(blocks);
@@ -500,7 +500,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c
        dist3 = dist * 3.0f;
 
        i = 0;
-       BMO_ITER(v, &oiter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (v, &oiter, bm, op, "verts", BM_VERT) {
                BLI_array_growone(verts);
                verts[i++] = v;
        }
@@ -583,7 +583,7 @@ void bmo_automerge_exec(BMesh *bm, BMOperator *op)
         * can be merged away into any other verts. Mark all other verts
         * as VERT_KEEP. */
        BMO_slot_buffer_flag_enable(bm, op, "verts", BM_VERT, VERT_IN);
-       BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
                if (!BMO_elem_flag_test(bm, v, VERT_IN)) {
                        BMO_elem_flag_enable(bm, v, VERT_KEEP);
                }
index 7b7b063..4b1c2b5 100644 (file)
@@ -68,7 +68,7 @@ void bmo_vertex_slide_exec(BMesh *bm, BMOperator *op)
        }
 
        /* Count selected edges */
-       BMO_ITER(h, &oiter, bm, op, "edge", BM_VERT | BM_EDGE) {
+       BMO_ITER (h, &oiter, bm, op, "edge", BM_VERT | BM_EDGE) {
                switch (h->htype) {
                        case BM_EDGE:
                                selected_edges++;
@@ -88,7 +88,7 @@ void bmo_vertex_slide_exec(BMesh *bm, BMOperator *op)
        }
 
        /* Make sure we get the correct edge. */
-       BM_ITER(edge, &iter, bm, BM_EDGES_OF_VERT, vertex) {
+       BM_ITER (edge, &iter, bm, BM_EDGES_OF_VERT, vertex) {
                if (BMO_elem_flag_test(bm, edge, EDGE_MARK) && BM_vert_in_edge(edge, vertex)) {
                        slide_edge = edge;
                        break;
index 335b025..3d148d6 100644 (file)
@@ -742,7 +742,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        BM_data_layer_add(bmesh, &bmesh->vdata, CD_SHAPEKEY);
        skey = CustomData_number_of_layers(&bmesh->vdata, CD_SHAPEKEY) - 1;
        
-       BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
                float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey);
                copy_v3_v3(co, v->co);
        }
@@ -768,7 +768,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
                             BM_EDGE, EDGE_PERCENT);
 
 
-       BM_ITER(face, &fiter, bmesh, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (face, &fiter, bmesh, BM_FACES_OF_MESH, NULL) {
                BMEdge *e1 = NULL, *e2 = NULL;
                float vec1[3], vec2[3];
 
@@ -783,7 +783,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
                matched = 0;
 
                totesel = 0;
-               BM_ITER_INDEX(nl, &liter, bmesh, BM_LOOPS_OF_FACE, face, i) {
+               BM_ITER_INDEX (nl, &liter, bmesh, BM_LOOPS_OF_FACE, face, i) {
                        edges[i] = nl->e;
                        verts[i] = nl->v;
 
@@ -894,7 +894,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        }
 
        /* copy original-geometry displacements to current coordinates */
-       BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
                float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey);
                copy_v3_v3(v->co, co);
        }
@@ -916,7 +916,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
                        BLI_array_empty(splits);
 
                        /* for case of two edges, connecting them shouldn't be too hard */
-                       BM_ITER(l, &liter, bmesh, BM_LOOPS_OF_FACE, face) {
+                       BM_ITER (l, &liter, bmesh, BM_LOOPS_OF_FACE, face) {
                                BLI_array_growone(loops);
                                loops[BLI_array_count(loops) - 1] = l;
                        }
@@ -1003,7 +1003,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        }
 
        /* copy original-geometry displacements to current coordinates */
-       BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) {
                float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey);
                copy_v3_v3(v->co, co);
        }
@@ -1064,7 +1064,7 @@ void BM_mesh_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float s
                                BMEdge *e;
                                BMIter eiter;
 
-                               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, ele) {
+                               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, ele) {
                                        if (!BM_elem_flag_test(e, BM_ELEM_SELECT) &&
                                             BM_elem_flag_test(e->v1, BM_ELEM_SELECT) &&
                                             BM_elem_flag_test(e->v2, BM_ELEM_SELECT))
@@ -1101,7 +1101,7 @@ void bmo_edgebisect_exec(BMesh *bm, BMOperator *op)
        params.origkey = skey;
 
        /* go through and split edges */
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                bm_subdivide_multicut(bm, e, &params, e->v1, e->v2);
        }
 
index fd6106a..33c4cfc 100644 (file)
@@ -94,7 +94,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
        
        BMO_slot_buffer_flag_enable(bm, op, "constrain_edges", BM_EDGE, EDGE_MARK);
        
-       BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
                if (f->len == 3) {
                        BMO_elem_flag_enable(bm, f, FACE_MARK);
                }
@@ -103,7 +103,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
        while (!stop) {
                stop = 1;
                
-               BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        BMVert *v1, *v2, *v3, *v4;
                        
                        if (!BM_edge_is_manifold(e) || BMO_elem_flag_test(bm, e, EDGE_MARK)) {
@@ -175,7 +175,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
        
        BLI_begin_edgefill(&sf_ctx);
        
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                BMO_elem_flag_enable(bm, e, EDGE_MARK);
                
                if (!BLI_smallhash_haskey(&hash, (uintptr_t)e->v1)) {
@@ -206,7 +206,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
                BMIter liter;
                
                BMO_elem_flag_enable(bm, f, ELE_NEW);
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        if (!BMO_elem_flag_test(bm, l->e, EDGE_MARK)) {
                                BMO_elem_flag_enable(bm, l->e, ELE_NEW);
                        }
index ea1fc51..b35bcc8 100644 (file)
@@ -59,7 +59,7 @@ void bmo_transform_exec(BMesh *bm, BMOperator *op)
 
        BMO_slot_mat4_get(op, "mat", mat);
 
-       BMO_ITER(v, &iter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (v, &iter, bm, op, "verts", BM_VERT) {
                mul_m4_v3(mat, v->co);
        }
 }
@@ -113,7 +113,7 @@ void bmo_reversefaces_exec(BMesh *bm, BMOperator *op)
        BMOIter siter;
        BMFace *f;
 
-       BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
                BM_face_normal_flip(bm, f);
        }
 }
@@ -131,7 +131,7 @@ void bmo_edgerotate_exec(BMesh *bm, BMOperator *op)
 #define EDGE_OUT   1
 #define FACE_TAINT 1
 
-       BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                /**
                 * this ends up being called twice, could add option to not to call check in
                 * #BM_edge_rotate to get some extra speed */
@@ -180,14 +180,14 @@ static void bmo_regionextend_extend(BMesh *bm, BMOperator *op, int usefaces)
        BMOIter siter;
 
        if (!usefaces) {
-               BMO_ITER(v, &siter, bm, op, "geom", BM_VERT) {
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+               BMO_ITER (v, &siter, bm, op, "geom", BM_VERT) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
                                        break;
                        }
 
                        if (e) {
-                               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+                               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                        BMO_elem_flag_enable(bm, e, SEL_FLAG);
                                        BMO_elem_flag_enable(bm, BM_edge_other_vert(e, v), SEL_FLAG);
                                }
@@ -199,9 +199,9 @@ static void bmo_regionextend_extend(BMesh *bm, BMOperator *op, int usefaces)
                BMFace *f, *f2;
                BMLoop *l;
 
-               BMO_ITER(f, &siter, bm, op, "geom", BM_FACE) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
-                               BM_ITER(f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
+               BMO_ITER (f, &siter, bm, op, "geom", BM_FACE) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+                               BM_ITER (f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
                                        if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
                                                BMO_elem_flag_enable(bm, f2, SEL_FLAG);
                                        }
@@ -219,8 +219,8 @@ static void bmo_regionextend_constrict(BMesh *bm, BMOperator *op, int usefaces)
        BMOIter siter;
 
        if (!usefaces) {
-               BMO_ITER(v, &siter, bm, op, "geom", BM_VERT) {
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+               BMO_ITER (v, &siter, bm, op, "geom", BM_VERT) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                if (!BMO_elem_flag_test(bm, e, SEL_ORIG))
                                        break;
                        }
@@ -228,7 +228,7 @@ static void bmo_regionextend_constrict(BMesh *bm, BMOperator *op, int usefaces)
                        if (e) {
                                BMO_elem_flag_enable(bm, v, SEL_FLAG);
 
-                               BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+                               BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                        BMO_elem_flag_enable(bm, e, SEL_FLAG);
                                }
 
@@ -240,9 +240,9 @@ static void bmo_regionextend_constrict(BMesh *bm, BMOperator *op, int usefaces)
                BMFace *f, *f2;
                BMLoop *l;
 
-               BMO_ITER(f, &siter, bm, op, "geom", BM_FACE) {
-                       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
-                               BM_ITER(f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
+               BMO_ITER (f, &siter, bm, op, "geom", BM_FACE) {
+                       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+                               BM_ITER (f2, &fiter, bm, BM_FACES_OF_EDGE, l->e) {
                                        if (!BMO_elem_flag_test(bm, f2, SEL_ORIG)) {
                                                BMO_elem_flag_enable(bm, f, SEL_FLAG);
                                                break;
@@ -312,7 +312,7 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
        BMO_slot_buffer_flag_enable(bm, op, "faces", BM_FACE, FACE_FLAG);
 
        /* find a starting face */
-       BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
 
                /* clear dirty flag */
                BM_elem_flag_disable(f, BM_ELEM_TAG);
@@ -358,8 +358,8 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
                f = fstack[i];
                i--;
 
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
-                       BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_LOOP, l) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+                       BM_ITER (l2, &liter2, bm, BM_LOOPS_OF_LOOP, l) {
                                if (!BMO_elem_flag_test(bm, l2->f, FACE_FLAG) || l2 == l)
                                        continue;
 
@@ -395,7 +395,7 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
        BLI_array_free(fstack);
 
        /* check if we have faces yet to do.  if so, recurse */
-       BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (f, &siter, bm, op, "faces", BM_FACE) {
                if (!BMO_elem_flag_test(bm, f, FACE_VIS)) {
                        bmo_righthandfaces_exec(bm, op);
                        break;
@@ -419,12 +419,12 @@ void bmo_vertexsmooth_exec(BMesh *bm, BMOperator *op)
        clipz = BMO_slot_bool_get(op, "mirror_clip_z");
 
        i = 0;
-       BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
                BLI_array_growone(cos);
                co = cos[i];
                
                j  = 0;
-               BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                        co2 = BM_edge_other_vert(e, v)->co;
                        add_v3_v3v3(co, co, co2);
                        j += 1;
@@ -450,7 +450,7 @@ void bmo_vertexsmooth_exec(BMesh *bm, BMOperator *op)
        }
 
        i = 0;
-       BMO_ITER(v, &siter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (v, &siter, bm, op, "verts", BM_VERT) {
                copy_v3_v3(v->co, cos[i]);
                i++;
        }
@@ -475,7 +475,7 @@ static float ngon_fake_area(BMesh *bm, BMFace *f)
 
        BM_face_center_mean_calc(bm, f, c);
 
-       BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                if (num_verts == 0) {
                        copy_v3_v3(v, l->v->co);
                        copy_v3_v3(sv, l->v->co);
@@ -533,7 +533,7 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op)
         * so the overall complexity will be less than $O(mn)$ where is the total number of selected faces,
         * and n is the total number of faces
         */
-       BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (fs, &fs_iter, bm, op, "faces", BM_FACE) {
                if (!BMO_elem_flag_test(bm, fs, FACE_MARK)) {   /* is this really needed ? */
                        BMO_elem_flag_enable(bm, fs, FACE_MARK);
                        num_sels++;
@@ -545,7 +545,7 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op)
        f_ext = (SimSel_FaceExt *)MEM_callocN(sizeof(SimSel_FaceExt) * num_total, "f_ext util.c");
 
        /* loop through all the faces and fill the faces/indices structure */
-       BM_ITER(fm, &fm_iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (fm, &fm_iter, bm, BM_FACES_OF_MESH, NULL) {
                f_ext[i].f = fm;
                if (BMO_elem_flag_test(bm, fm, FACE_MARK)) {
                        indices[idx] = i;
@@ -673,7 +673,7 @@ static float edge_angle(BMesh *bm, BMEdge *e)
 
        /* first edge faces, don't account for 3+ */
 
-       BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
+       BM_ITER (f, &fiter, bm, BM_FACES_OF_EDGE, e) {
                if (f_prev == NULL) {
                        f_prev = f;
                }
@@ -723,7 +723,7 @@ void bmo_similaredges_exec(BMesh *bm, BMOperator *op)
        num_total = BM_mesh_elem_count(bm, BM_EDGE);
 
        /* iterate through all selected edges and mark them */
-       BMO_ITER(es, &es_iter, bm, op, "edges", BM_EDGE) {
+       BMO_ITER (es, &es_iter, bm, op, "edges", BM_EDGE) {
                BMO_elem_flag_enable(bm, es, EDGE_MARK);
                num_sels++;
        }
@@ -733,7 +733,7 @@ void bmo_similaredges_exec(BMesh *bm, BMOperator *op)
        e_ext = (SimSel_EdgeExt *)MEM_callocN(sizeof(SimSel_EdgeExt) * num_total, "e_ext util.c");
 
        /* loop through all the edges and fill the edges/indices structure */
-       BM_ITER(e, &e_iter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &e_iter, bm, BM_EDGES_OF_MESH, NULL) {
                e_ext[i].e = e;
                if (BMO_elem_flag_test(bm, e, EDGE_MARK)) {
                        indices[idx] = i;
@@ -887,7 +887,7 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
        num_total = BM_mesh_elem_count(bm, BM_VERT);
 
        /* iterate through all selected edges and mark them */
-       BMO_ITER(vs, &vs_iter, bm, op, "verts", BM_VERT) {
+       BMO_ITER (vs, &vs_iter, bm, op, "verts", BM_VERT) {
                BMO_elem_flag_enable(bm, vs, VERT_MARK);
                num_sels++;
        }
@@ -897,7 +897,7 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
        v_ext = (SimSel_VertExt *)MEM_mallocN(sizeof(SimSel_VertExt) * num_total, "vertex extra");
 
        /* loop through all the vertices and fill the vertices/indices structure */
-       BM_ITER(v, &v_iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &v_iter, bm, BM_VERTS_OF_MESH, NULL) {
                v_ext[i].v = v;
                if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
                        indices[idx] = i;
@@ -984,7 +984,7 @@ void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op)
 
        int dir = BMO_slot_int_get(op, "dir");
 
-       BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (fs, &fs_iter, bm, op, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPUV)) {
                        if (dir == DIRECTION_CW) { /* same loops direction */
                                BMLoop *lf;     /* current face loops */
@@ -993,7 +993,7 @@ void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op)
                                float t_uv[2];  /* tmp uvs */
 
                                int n = 0;
-                               BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                               BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                        /* current loop uv is the previous loop uv */
                                        MLoopUV *luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPUV);
                                        if (n == 0) {
@@ -1017,7 +1017,7 @@ void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op)
                                float t_uv[2];  /* current uvs */
 
                                int n = 0;
-                               BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                               BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                        /* previous loop uv is the current loop uv */
                                        luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPUV);
                                        if (n == 0) {
@@ -1050,7 +1050,7 @@ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op)
        BLI_array_declare(uvs);
        float (*uvs)[2] = NULL;
 
-       BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (fs, &fs_iter, bm, op, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPUV)) {
                        BMLoop *lf;     /* current face loops */
                        int i;
@@ -1058,7 +1058,7 @@ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op)
                        BLI_array_empty(uvs);
                        BLI_array_growitems(uvs, fs->len);
 
-                       BM_ITER_INDEX(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs, i) {
+                       BM_ITER_INDEX (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs, i) {
                                MLoopUV *luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPUV);
 
                                /* current loop uv is the previous loop uv */
@@ -1067,7 +1067,7 @@ void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op)
 
                        /* now that we have the uvs in the array, reverse! */
                        i = 0;
-                       BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                       BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                /* current loop uv is the previous loop uv */
                                MLoopUV *luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPUV);
                                luv->uv[0] = uvs[(fs->len - i - 1)][0];
@@ -1093,7 +1093,7 @@ void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op)
 
        int dir = BMO_slot_int_get(op, "dir");
 
-       BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (fs, &fs_iter, bm, op, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPCOL)) {
                        if (dir == DIRECTION_CW) { /* same loops direction */
                                BMLoop *lf;     /* current face loops */
@@ -1102,7 +1102,7 @@ void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op)
                                MLoopCol t_col; /* tmp color */
 
                                int n = 0;
-                               BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                               BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                        /* current loop color is the previous loop color */
                                        MLoopCol *luv = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPCOL);
                                        if (n == 0) {
@@ -1126,7 +1126,7 @@ void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op)
                                MLoopCol t_col; /* current color */
 
                                int n = 0;
-                               BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                               BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                        /* previous loop color is the current loop color */
                                        lcol = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPCOL);
                                        if (n == 0) {
@@ -1158,13 +1158,13 @@ void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op)
        BLI_array_declare(cols);
        MLoopCol *cols = NULL;
 
-       BMO_ITER(fs, &fs_iter, bm, op, "faces", BM_FACE) {
+       BMO_ITER (fs, &fs_iter, bm, op, "faces", BM_FACE) {
                if (CustomData_has_layer(&(bm->ldata), CD_MLOOPCOL)) {
                        BMLoop *lf;     /* current face loops */
                        int i = 0;
 
                        BLI_array_empty(cols);
-                       BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                       BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                MLoopCol *lcol = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPCOL);
 
                                /* current loop uv is the previous loop color */
@@ -1175,7 +1175,7 @@ void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op)
 
                        /* now that we have the uvs in the array, reverse! */
                        i = 0;
-                       BM_ITER(lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
+                       BM_ITER (lf, &l_iter, bm, BM_LOOPS_OF_FACE, fs) {
                                /* current loop uv is the previous loop color */
                                MLoopCol *lcol = CustomData_bmesh_get(&bm->ldata, lf->head.data, CD_MLOOPCOL);
                                *lcol = cols[(fs->len - i - 1)];
@@ -1212,10 +1212,10 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op)
        int num_total = 0 /*, num_sels = 0 */, i = 0;
        int type = BMO_slot_int_get(op, "type");
 
-       BMO_ITER(vs, &vs_iter, bm, op, "startv", BM_VERT) {
+       BMO_ITER (vs, &vs_iter, bm, op, "startv", BM_VERT) {
                sv = vs;
        }
-       BMO_ITER(vs, &vs_iter, bm, op, "endv", BM_VERT) {
+       BMO_ITER (vs, &vs_iter, bm, op, "endv", BM_VERT) {
                ev = vs;
        }
 
@@ -1227,7 +1227,7 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op)
        /* iterate through all the mesh vertices */
        /* loop through all the vertices and fill the vertices/indices structure */
        i = 0;
-       BM_ITER(v, &v_iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &v_iter, bm, BM_VERTS_OF_MESH, NULL) {
                vert_list[i].v = v;
                vert_list[i].parent = NULL;
                vert_list[i].weight = FLT_MAX;
@@ -1262,7 +1262,7 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op)
 
                v_weight = vert_list[BM_elem_index_get(v)].weight;
 
-               BM_ITER(e, &e_i, bm, BM_EDGES_OF_VERT, v) {
+               BM_ITER (e, &e_i, bm, BM_EDGES_OF_VERT, v) {
                        BMVert *u;
                        float e_weight = v_weight;
 
index 83dcf3c..307136c 100644 (file)
@@ -788,13 +788,13 @@ static float UNUSED_FUNCTION(BME_bevel_get_angle_vert)(BMesh *bm, BMVert *v)
        float angle_diff = 0.0f;
 
 
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, v) {
                BM_loop_face_normal(l, n_tmp);
                madd_v3_v3fl(n, n_tmp, BM_loop_face_angle(l));
        }
        normalize_v3(n);
 
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, v) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, v) {
                /* could cache from before */
                BM_loop_face_normal(l, n_tmp);
                angle_diff += angle_normalized_v3v3(n, n_tmp) * (BM_loop_face_angle(l) * (float)(M_PI * 0.5));
index d4a7997..f1d0d63 100644 (file)
@@ -814,7 +814,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
        if (em) {
                totedge = me->edit_btmesh->bm->totedge;
 
-               BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                        topo_hash[BM_elem_index_get(eed->v1)]++;
                        topo_hash[BM_elem_index_get(eed->v2)]++;
                }
@@ -835,7 +835,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
                /* use the number of edges per vert to give verts unique topology IDs */
 
                if (em) {
-                       BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                                topo_hash[BM_elem_index_get(eed->v1)] += topo_hash_prev[BM_elem_index_get(eed->v2)];
                                topo_hash[BM_elem_index_get(eed->v2)] += topo_hash_prev[BM_elem_index_get(eed->v1)];
                        }
index 4b21b6b..9f5ab8a 100644 (file)
@@ -125,7 +125,7 @@ BMBVHTree *BMBVH_NewBVH(BMEditMesh *em, int flag, Scene *scene, Object *obedit)
                void *data[3];
                
                tree->cos = MEM_callocN(sizeof(float) * 3 * em->bm->totvert, "bmbvh cos");
-               BM_ITER_INDEX(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL, i) {
+               BM_ITER_INDEX (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL, i) {
                        BM_elem_index_set(v, i); /* set_inline */
                        copy_v3_v3(tree->cos[i], v->co);
                }
index 39b2142..dc0d8f1 100644 (file)
@@ -556,7 +556,7 @@ static void knife_get_vert_faces(knifetool_opdata *kcd, KnifeVert *kfv, BMFace *
        }
        else if (kfv->v) {
                BMesh *bm = kcd->em->bm;
-               BM_ITER(f, &bmiter, bm, BM_FACES_OF_VERT, kfv->v) {
+               BM_ITER (f, &bmiter, bm, BM_FACES_OF_VERT, kfv->v) {
                        knife_append_list(kcd, lst, f);
                }
        }
@@ -569,7 +569,7 @@ static void knife_get_edge_faces(knifetool_opdata *kcd, KnifeEdge *kfe, ListBase
 
        if (kfe->e) {
                BMesh *bm = kcd->em->bm;
-               BM_ITER(f, &bmiter, bm, BM_FACES_OF_EDGE, kfe->e) {
+               BM_ITER (f, &bmiter, bm, BM_FACES_OF_EDGE, kfe->e) {
                        knife_append_list(kcd, lst, f);
                }
        }
@@ -1681,7 +1681,7 @@ static void remerge_faces(knifetool_opdata *kcd)
        BMO_op_finish(bm, &bmop);
 
        BLI_smallhash_init(visit);
-       BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                BMIter eiter;
                BMEdge *e;
                BMFace *f2;
@@ -1702,14 +1702,14 @@ static void remerge_faces(knifetool_opdata *kcd)
 
                        BLI_array_append(faces, f2);
 
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_FACE, f2) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_FACE, f2) {
                                BMIter fiter;
                                BMFace *f3;
 
                                if (BMO_elem_flag_test(bm, e, BOUNDARY))
                                        continue;
 
-                               BM_ITER(f3, &fiter, bm, BM_FACES_OF_EDGE, e) {
+                               BM_ITER (f3, &fiter, bm, BM_FACES_OF_EDGE, e) {
                                        if (!BMO_elem_flag_test(bm, f3, FACE_NEW))
                                                continue;
                                        if (BLI_smallhash_haskey(visit, (intptr_t)f3))
@@ -1764,14 +1764,14 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
 
        /* BMESH_TODO this should be valid now, leaving here until we can ensure this - campbell */
        i = 0;
-       BM_ITER(f, &bmiter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &bmiter, bm, BM_FACES_OF_MESH, NULL) {
                BM_elem_index_set(f, i); /* set_inline */
                faces[i] = f;
                i++;
        }
        bm->elem_index_dirty &= ~BM_FACE;
 
-       BM_ITER(e, &bmiter, bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &bmiter, bm, BM_EDGES_OF_MESH, NULL) {
                BMO_elem_flag_enable(bm, e, BOUNDARY);
        }
 
@@ -1959,7 +1959,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
        bm->elem_index_dirty |= BM_FACE;
 
        /* interpolate customdata */
-       BM_ITER(f, &bmiter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &bmiter, bm, BM_FACES_OF_MESH, NULL) {
                BMLoop *l1;
                BMFace *f2;
                BMIter liter1;
@@ -1974,7 +1974,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
 
                BM_elem_attrs_copy(bm, bm, f2, f);
 
-               BM_ITER(l1, &liter1, bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l1, &liter1, bm, BM_LOOPS_OF_FACE, f) {
                        BM_loop_interp_from_face(bm, l1, f2, TRUE, TRUE);
                }
        }
@@ -2281,7 +2281,7 @@ static int find_hole_chains(knifetool_opdata *kcd, ListBase *hole, BMFace *f, Li
        }
 
        j = 0;
-       BM_ITER(v, &iter, kcd->em->bm, BM_VERTS_OF_FACE, f) {
+       BM_ITER (v, &iter, kcd->em->bm, BM_VERTS_OF_FACE, f) {
                fco[j] = BLI_memarena_alloc(kcd->arena, 2 * sizeof(float));
                fco[j][0] = v->co[ax];
                fco[j][1] = v->co[ay];
@@ -2388,7 +2388,7 @@ static int knife_edge_in_face(knifetool_opdata *kcd, KnifeEdge *kfe, BMFace *f)
        l2 = NULL;
 
        /* find out if v1 and v2, if set, are part of the face */
-       BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (l, &iter, bm, BM_LOOPS_OF_FACE, f) {
                if (v1 && l->v == v1)
                        l1 = l;
                if (v2 && l->v == v2)
index 90f88ab..a41059e 100644 (file)
@@ -145,7 +145,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed,
 
        /* find correct order for v[1] */
        if (!(BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))) {
-               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_LOOP, l) {
+               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_LOOP, l) {
                        if (BM_edge_in_face(l->f, eed) && BM_edge_in_face(l->f, lasteed))
                                break;
                }
index f22a4ae..7904c6f 100644 (file)
@@ -158,7 +158,7 @@ static BMEdge *edbm_ripsel_edge_mark_step(BMesh *bm, BMVert *v, const int uid)
 {
        BMIter iter;
        BMEdge *e;
-       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                if (IS_VISIT_POSSIBLE(e) && !IS_VISIT_DONE(e)) {
                        BMLoop *l_a, *l_b;
 
@@ -196,8 +196,8 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
        EdgeLoopPair *lp;
 
        /* initialize loops with dummy invalid index values */
-       BM_ITER(f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
-               BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
+       BM_ITER (f, &fiter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (l, &liter, bm, BM_LOOPS_OF_FACE, f) {
                        BM_elem_index_set(l, INVALID_UID);
                }
        }
@@ -213,7 +213,7 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
                BMEdge *e_last;
 
                e_first = NULL;
-               BM_ITER(e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &eiter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (IS_VISIT_POSSIBLE(e) && !IS_VISIT_DONE(e)) {
                                e_first = e;
                                break;
@@ -290,7 +290,7 @@ static BMEdge *edbm_ripsel_edge_uid_step(BMesh *bm, BMEdge *e_orig, BMVert **v_p
        BMVert *v = BM_edge_other_vert(e_orig, *v_prev);
        const int uid_cmp = BM_elem_index_get(e_orig->l) - 1;
 
-       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                if (BM_elem_index_get(e->l) == uid_cmp) {
                        *v_prev = v;
                        return e;
@@ -374,7 +374,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
        ED_view3d_ob_project_mat_get(rv3d, obedit, projectMat);
 
        /* BM_ELEM_SELECT --> BM_ELEM_TAG */
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                BM_elem_flag_set(e, BM_ELEM_TAG, BM_elem_flag_test(e, BM_ELEM_SELECT));
        }
 
@@ -393,7 +393,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
                else {
                        ese.ele = NULL;
 
-                       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                if (BM_elem_flag_test(v, BM_ELEM_SELECT))
                                        break;
                        }
@@ -407,7 +407,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
 
                if (v->e) {
                        /* find closest edge to mouse cursor */
-                       BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (e, &iter, bm, BM_EDGES_OF_VERT, v) {
                                int is_boundary = BM_edge_is_boundary(e);
                                /* consider wire as boundary for this purpose,
                                 * otherwise we can't a face away from a wire edge */
@@ -455,7 +455,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
                                dist = FLT_MAX;
 
                                for (i = 0; i < vout_len; i++) {
-                                       BM_ITER(l, &iter, bm, BM_LOOPS_OF_VERT, vout[i]) {
+                                       BM_ITER (l, &iter, bm, BM_LOOPS_OF_VERT, vout[i]) {
                                                if (!BM_elem_flag_test(l->f, BM_ELEM_HIDDEN)) {
                                                        float l_mid_co[3];
                                                        BM_loop_face_tangent(l, l_mid_co);
@@ -534,10 +534,10 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
        }
        else {
                /* expand edge selection */
-               BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        e2 = NULL;
                        i = 0;
-                       BM_ITER(e, &eiter, bm, BM_EDGES_OF_VERT, v) {
+                       BM_ITER (e, &eiter, bm, BM_EDGES_OF_VERT, v) {
                                /* important to check selection rather then tag here
                                 * else we get feedback loop */
                                if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
@@ -584,7 +584,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
        {
                /* simple per edge selection check, saves a lot of code and is almost good enough */
                BMOIter siter;
-               BMO_ITER(e, &siter, bm, &bmop, "edgeout", BM_EDGE) {
+               BMO_ITER (e, &siter, bm, &bmop, "edgeout", BM_EDGE) {
                        if (edbm_rip_edge_side_measure(e, ar, projectMat, fmval) > 0.0f) {
                                BM_elem_select_set(bm, e, FALSE);
                        }
@@ -604,12 +604,12 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
 #else
 
                dist = FLT_MAX;
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
                                /* disable by default, re-enable winner at end */
                                BM_elem_select_set(bm, v, FALSE);
 
-                               BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
+                               BM_ITER (l, &liter, bm, BM_LOOPS_OF_VERT, v) {
                                        /* calculate a point in the face, rather then calculate the middle,
                                         * make a vector pointing between the 2 edges attached to this loop */
                                        sub_v3_v3v3(l_prev_co, l->prev->v->co, l->v->co);
index 6505337..df1775c 100644 (file)
@@ -75,7 +75,7 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend)
        BMVert *v1, *v2;
        BMIter iter;
 
-       BM_ITER(v1, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v1, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_elem_flag_test(v1, BM_ELEM_SELECT) || BM_elem_flag_test(v1, BM_ELEM_HIDDEN)) {
                        BM_elem_flag_disable(v1, BM_ELEM_TAG);
                }
@@ -89,7 +89,7 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend)
        if (!extend)
                EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
-       BM_ITER(v1, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v1, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_elem_flag_test(v1, BM_ELEM_TAG) || BM_elem_flag_test(v1, BM_ELEM_HIDDEN))
                        continue;
 
@@ -1221,7 +1221,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
        /* note, would pass BM_EDGE except we are looping over all edges anyway */
        BM_mesh_elem_index_ensure(em->bm, BM_VERT /* | BM_EDGE */);
 
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
                        BLI_smallhash_insert(&visithash, (uintptr_t)e, NULL);
                }
@@ -1239,7 +1239,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
        cost = MEM_mallocN(sizeof(*cost) * totedge, "SeamPathCost");
 
        /* count edges, compute adjacent edges offsets and fill adjacent */
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                nedges[BM_elem_index_get(e->v1) + 1]++;
                nedges[BM_elem_index_get(e->v2) + 1]++;
        }
@@ -1252,7 +1252,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
        nedges[0] = nedges[1] = 0;
 
        i = 0;
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                edges[nedges[BM_elem_index_get(e->v1) + 1]++] = i;
                edges[nedges[BM_elem_index_get(e->v2) + 1]++] = i;
 
@@ -1643,7 +1643,7 @@ void EDBM_deselect_by_material(BMEditMesh *em, const short index, const short se
        BMIter iter;
        BMFace *efa;
 
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                        continue;
                if (efa->mat_nr == index) {
@@ -1668,21 +1668,21 @@ void EDBM_select_swap(BMEditMesh *em) /* exported for UV */
        BMFace *efa;
        
        if (em->bm->selectmode & SCE_SELECT_VERTEX) {
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eve, BM_ELEM_HIDDEN))
                                continue;
                        BM_elem_select_set(em->bm, eve, !BM_elem_flag_test(eve, BM_ELEM_SELECT));
                }
        }
        else if (em->selectmode & SCE_SELECT_EDGE) {
-               BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eed, BM_ELEM_HIDDEN))
                                continue;
                        BM_elem_select_set(em->bm, eed, !BM_elem_flag_test(eed, BM_ELEM_SELECT));
                }
        }
        else {
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                                continue;
                        BM_elem_select_set(em->bm, efa, !BM_elem_flag_test(efa, BM_ELEM_SELECT));
@@ -1702,13 +1702,13 @@ int EDBM_select_interior_faces(BMEditMesh *em)
        int ok;
        int change = FALSE;
 
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                        continue;
 
 
                ok = TRUE;
-               BM_ITER(eed, &eiter, bm, BM_EDGES_OF_FACE, efa) {
+               BM_ITER (eed, &eiter, bm, BM_EDGES_OF_FACE, efa) {
                        if (BM_edge_face_count(eed) < 3) {
                                ok = FALSE;
                                break;
@@ -1785,7 +1785,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *
 
                if (limit) {
                        /* hflag no-seam --> bmo-tag */
-                       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                /* BMESH_TODO, don't use 'BM_ELEM_SELECT' here, its a HFLAG only! */
                                BMO_elem_flag_set(bm, e, BM_ELEM_SELECT, !BM_elem_flag_test(e, BM_ELEM_SEAM));
                        }
@@ -1870,13 +1870,13 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
        if (em->selectmode == SCE_SELECT_FACE) {
                BMFace *efa;
 
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        BM_elem_flag_set(efa, BM_ELEM_TAG, (BM_elem_flag_test(efa, BM_ELEM_SELECT) &&
                                                            !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)));
                }
 
                if (limit) {
-                       BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                /* BMESH_TODO, don't use 'BM_ELEM_SELECT' here, its a HFLAG only! */
                                BMO_elem_flag_set(bm, e, BM_ELEM_SELECT, !BM_elem_flag_test(e, BM_ELEM_SEAM));
                        }
@@ -1887,7 +1887,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
                         BMW_FLAG_TEST_HIDDEN,
                         BMW_NIL_LAY);
 
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(efa, BM_ELEM_TAG)) {
                                e = BMW_begin(&walker, efa);
                                for (; efa; efa = BMW_step(&walker)) {
@@ -1898,7 +1898,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
                BMW_end(&walker);
        }
        else  {
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
                                BM_elem_flag_enable(v, BM_ELEM_TAG);
                        }
@@ -1912,7 +1912,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
                         BMW_FLAG_TEST_HIDDEN,
                         BMW_NIL_LAY);
 
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
                                e = BMW_begin(&walker, v);
                                for (; e; e = BMW_step(&walker)) {
@@ -2044,8 +2044,7 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h
        /* Walker restrictions uses BMO flags, not header flags,
         * so transfer BM_ELEM_SELECT from HFlags onto a BMO flag layer. */
        BMO_push(bm, NULL);
-       BM_ITER(ele, &iter, bm, itertype, NULL)
-       {
+       BM_ITER (ele, &iter, bm, itertype, NULL) {
                if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) {
                        /* BMESH_TODO, don't use 'BM_ELEM_SELECT' here, its a HFLAG only! */
                        BMO_elem_flag_enable(bm, (BMElemF *)ele, BM_ELEM_SELECT);
@@ -2103,7 +2102,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
        }
 
        if (em->selectmode & SCE_SELECT_VERTEX) {
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
                                *r_eve = v;
                                return;
@@ -2111,7 +2110,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
                }
        }
        else if (em->selectmode & SCE_SELECT_EDGE) {
-               BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
                                *r_eed = e;
                                return;
@@ -2224,7 +2223,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
 
        sharp = DEG2RADF(sharp);
 
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_HIDDEN) || !e->l)
                        continue;
 
@@ -2279,11 +2278,11 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
 
        sharp = (sharp * M_PI) / 180.0;
 
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                BM_elem_flag_disable(f, BM_ELEM_TAG);
        }
 
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (BM_elem_flag_test(f, BM_ELEM_HIDDEN) || !BM_elem_flag_test(f, BM_ELEM_SELECT) || BM_elem_flag_test(f, BM_ELEM_TAG))
                        continue;
 
@@ -2301,8 +2300,8 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
 
                        BM_elem_flag_enable(f, BM_ELEM_TAG);
 
-                       BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
-                               BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_LOOP, l) {
+                       BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
+                               BM_ITER (l2, &liter2, em->bm, BM_LOOPS_OF_LOOP, l) {
                                        float angle;
 
                                        if (BM_elem_flag_test(l2->f, BM_ELEM_TAG) || BM_elem_flag_test(l2->f, BM_ELEM_HIDDEN))
@@ -2364,13 +2363,13 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        
-       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_elem_flag_test(v, BM_ELEM_HIDDEN) && !BM_vert_is_manifold(v)) {
                        BM_elem_select_set(em->bm, v, TRUE);
                }
        }
        
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN) && !BM_edge_is_manifold(e)) {
                        BM_elem_select_set(em->bm, e, TRUE);
                }
@@ -2412,7 +2411,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
                EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        if (em->selectmode & SCE_SELECT_VERTEX) {
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BLI_frand() < randfac) {
                                BM_elem_select_set(em->bm, eve, TRUE);
                        }
@@ -2420,7 +2419,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
                EDBM_selectmode_flush(em);
        }
        else if (em->selectmode & SCE_SELECT_EDGE) {
-               BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && BLI_frand() < randfac) {
                                BM_elem_select_set(em->bm, eed, TRUE);
                        }
@@ -2428,7 +2427,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
                EDBM_selectmode_flush(em);
        }
        else {
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BLI_frand() < randfac) {
                                BM_elem_select_set(em->bm, efa, TRUE);
                        }
@@ -2470,15 +2469,15 @@ static int edbm_select_next_loop_exec(bContext *C, wmOperator *UNUSED(op))
        BMVert *v;
        BMIter iter;
        
-       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                BM_elem_flag_disable(v, BM_ELEM_TAG);
        }
        
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                BMLoop *l;
                BMIter liter;
                
-               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
                        if (BM_elem_flag_test(l->v, BM_ELEM_SELECT)) {
                                BM_elem_flag_enable(l->next->v, BM_ELEM_TAG);
                                BM_elem_select_set(em->bm, l->v, FALSE);
@@ -2486,7 +2485,7 @@ static int edbm_select_next_loop_exec(bContext *C, wmOperator *UNUSED(op))
                }
        }
 
-       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(v, BM_ELEM_TAG)) {
                        BM_elem_select_set(em->bm, v, TRUE);
                }
@@ -2523,18 +2522,18 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
        
        em_setup_viewcontext(C, &vc);
        
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                BM_elem_flag_disable(e, BM_ELEM_TAG);
        }
 
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                BMLoop *l1, *l2;
                BMIter liter1, liter2;
                
-               BM_ITER(l1, &liter1, em->bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l1, &liter1, em->bm, BM_LOOPS_OF_FACE, f) {
                        int tot = 0, totsel = 0;
                        
-                       BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_EDGE, l1->e) {
+                       BM_ITER (l2, &liter2, em->bm, BM_LOOPS_OF_EDGE, l1->e) {
                                tot++;
                                totsel += BM_elem_flag_test(l2->f, BM_ELEM_SELECT) != 0;
                        }
@@ -2546,7 +2545,7 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
 
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
        
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_TAG) && !BM_elem_flag_test(e, BM_ELEM_HIDDEN))
                        BM_edge_select_set(em->bm, e, TRUE);
        }
@@ -2598,11 +2597,11 @@ static int loop_find_region(BMEditMesh *em, BMLoop *l, int flag,
                f = BLI_array_pop(stack);
                BLI_array_append(region, f);
                
-               BM_ITER(l1, &liter1, em->bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l1, &liter1, em->bm, BM_LOOPS_OF_FACE, f) {
                        if (BM_elem_flag_test(l1->e, flag))
                                continue;
                        
-                       BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_EDGE, l1->e) {
+                       BM_ITER (l2, &liter2, em->bm, BM_LOOPS_OF_EDGE, l1->e) {
                                if (BLI_smallhash_haskey(fhash, (uintptr_t)l2->f))
                                        continue;
                                
@@ -2645,11 +2644,11 @@ static int loop_find_regions(BMEditMesh *em, int selbigger)
        
        BLI_smallhash_init(&visithash);
        
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                BM_elem_flag_disable(f, BM_ELEM_TAG);
        }
 
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
                        BLI_array_append(edges, e);
                        BM_elem_flag_enable(e, BM_ELEM_TAG);
@@ -2673,7 +2672,7 @@ static int loop_find_regions(BMEditMesh *em, int selbigger)
                if (!BM_elem_flag_test(e, BM_ELEM_TAG))
                        continue;
                
-               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_EDGE, e) {
+               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_EDGE, e) {
                        if (BLI_smallhash_haskey(&visithash, (uintptr_t)l->f))
                                continue;
                                                
@@ -2700,7 +2699,7 @@ static int loop_find_regions(BMEditMesh *em, int selbigger)
                        
                        for (j = 0; j < tot; j++) {
                                BM_elem_flag_enable(region[j], BM_ELEM_TAG);
-                               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, region[j]) {
+                               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, region[j]) {
                                        BM_elem_flag_disable(l->e, BM_ELEM_TAG);
                                }
                        }
@@ -2736,7 +2735,7 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
        
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
        
-       BM_ITER(f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (f, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (BM_elem_flag_test(f, BM_ELEM_TAG) && !BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
                        BM_face_select_set(em->bm, f, TRUE);
                }
index 266117e..f678999 100644 (file)
@@ -504,8 +504,7 @@ static int vtx_slide_set_frame(VertexSlideOp *vso)
        }
 
        /* Iterate over edges of vertex and copy them */
-       BM_ITER_INDEX(edge, &iter, bm, BM_EDGES_OF_VERT, sel_vtx, idx)
-       {
+       BM_ITER_INDEX (edge, &iter, bm, BM_EDGES_OF_VERT, sel_vtx, idx) {
                curr_vert = BM_edge_other_vert(edge, sel_vtx);
                if (curr_vert) {
                        BLI_array_growone(vtx_frame);
index 12cd789..e5eb7ad 100644 (file)
@@ -159,7 +159,7 @@ void EMBM_project_snap_verts(bContext *C, ARegion *ar, Object *obedit, BMEditMes
        BMIter iter;
        BMVert *eve;
 
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)     {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)    {
                if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                        float mval[2], vec[3], no_dummy[3];
                        int dist_dummy;
@@ -190,11 +190,11 @@ static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char
 
        BMO_op_exec(em->bm, &bmop);
        
-       BMO_ITER(f, &siter, em->bm, &bmop, "faceout", BM_FACE) {
+       BMO_ITER (f, &siter, em->bm, &bmop, "faceout", BM_FACE) {
                BM_elem_select_set(em->bm, f, TRUE);
 
                /* set face vertex normals to face normal */
-               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
+               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, f) {
                        copy_v3_v3(l->v->no, f->no);
                }
        }
@@ -327,7 +327,7 @@ static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag,
 
        zero_v3(nor);
        
-       BMO_ITER(ele, &siter, bm, &extop, "geomout", BM_ALL) {
+       BMO_ITER (ele, &siter, bm, &extop, "geomout", BM_ALL) {
                BM_elem_select_set(bm, ele, TRUE);
 
                if (ele->head.htype == BM_FACE) {
@@ -735,7 +735,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
 
        INIT_MINMAX(min, max);
        
-       BM_ITER(v1, &iter, vc.em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v1, &iter, vc.em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(v1, BM_ELEM_SELECT)) {
                        DO_MINMAX(v1->co, min, max);
                        done = 1;
@@ -757,7 +757,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
 
                /* check for edges that are half selected, use for rotation */
                done = 0;
-               BM_ITER(eed, &iter, vc.em->bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, vc.em->bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                                float co1[3], co2[3];
                                mul_v3_m4v3(co1, vc.obedit->obmat, eed->v1->co);
@@ -859,7 +859,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                EDBM_op_init(vc.em, &bmop, op, "makevert co=%v", min);
                BMO_op_exec(vc.em->bm, &bmop);
 
-               BMO_ITER(v1, &oiter, vc.em->bm, &bmop, "newvertout", BM_VERT) {
+               BMO_ITER (v1, &oiter, vc.em->bm, &bmop, "newvertout", BM_VERT) {
                        BM_elem_select_set(vc.em->bm, v1, TRUE);
                }
 
@@ -1075,7 +1075,7 @@ static int edbm_mark_seam(bContext *C, wmOperator *op)
        }
 
        if (clear) {
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_SELECT) || BM_elem_flag_test(eed, BM_ELEM_HIDDEN))
                                continue;
                        
@@ -1083,7 +1083,7 @@ static int edbm_mark_seam(bContext *C, wmOperator *op)
                }
        }
        else {
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_SELECT) || BM_elem_flag_test(eed, BM_ELEM_HIDDEN))
                                continue;
                        BM_elem_flag_enable(eed, BM_ELEM_SEAM);
@@ -1129,7 +1129,7 @@ static int edbm_mark_sharp(bContext *C, wmOperator *op)
        }
 
        if (!clear) {
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_SELECT) || BM_elem_flag_test(eed, BM_ELEM_HIDDEN))
                                continue;
                        
@@ -1137,7 +1137,7 @@ static int edbm_mark_sharp(bContext *C, wmOperator *op)
                }
        }
        else {
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_SELECT) || BM_elem_flag_test(eed, BM_ELEM_HIDDEN))
                                continue;
                        
@@ -1341,7 +1341,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
        }
 
        /* first see if we have two adjacent faces */
-       BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                BM_elem_flag_disable(eed, BM_ELEM_TAG);
                if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                        BMFace *fa, *fb;
@@ -1581,7 +1581,7 @@ static void mesh_set_smooth_faces(BMEditMesh *em, short smooth)
 
        if (em == NULL) return;
        
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
                        BM_elem_flag_set(efa, BM_ELEM_SMOOTH, smooth);
                }
@@ -1863,7 +1863,7 @@ static int merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob,
        else {
                float fac;
                int i = 0;
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(v, BM_ELEM_SELECT))
                                continue;
                        add_v3_v3(cent, v->co);
@@ -2149,7 +2149,7 @@ static void shape_propagate(BMEditMesh *em, wmOperator *op)
                return;
        }
        
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_elem_flag_test(eve, BM_ELEM_SELECT) || BM_elem_flag_test(eve, BM_ELEM_HIDDEN))
                        continue;
 
@@ -2218,7 +2218,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op)
        if (totshape == 0 || shape < 0 || shape >= totshape)
                return OPERATOR_CANCELLED;
 
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (!BM_elem_flag_test(eve, BM_ELEM_SELECT) || BM_elem_flag_test(eve, BM_ELEM_HIDDEN))
                        continue;
 
@@ -2323,7 +2323,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
                else if (mode == 1)
                        value += limit;
 
-               BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) {
                                switch (mode) {
                                        case -1: /* aligned */
@@ -2797,7 +2797,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
        EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_FACES);
 
        /* clean up any loose edges */
-       BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                if (BM_elem_flag_test(e, BM_ELEM_HIDDEN))
                        continue;
 
@@ -2808,7 +2808,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
        EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_EDGES);
 
        /* clean up any loose verts */
-       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(v, BM_ELEM_HIDDEN))
                        continue;
 
@@ -2844,7 +2844,7 @@ static int mesh_separate_material(Main *bmain, Scene *scene, Base *editbase, wmO
                const short mat_nr = f_cmp->mat_nr;
                int tot = 0;
 
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        if (f->mat_nr == mat_nr) {
                                BM_face_select_set(bm, f, TRUE);
                                tot++;
@@ -2888,7 +2888,7 @@ static int mesh_separate_loose(Main *bmain, Scene *scene, Base *editbase, wmOper
        for (i = 0; i < max_iter; i++) {
                /* Get a seed vertex to start the walk */
                v_seed = NULL;
-               BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        v_seed = v;
                        break;
                }
@@ -3664,8 +3664,7 @@ static void xsortvert_flag(bContext *UNUSED(C), int UNUSED(flag))
 
        amount = em->bm->totvert;
        sortblock = MEM_callocN(sizeof(xvertsort) * amount, "xsort");
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
-       {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(eve, BM_ELEM_SELECT))
                        sortblock[i].v1 = eve;
        }
@@ -4012,7 +4011,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op)
        if (tex->type == TEX_STUCCI) {
                float b2, vec[3];
                float ofs = tex->turbul / 200.0;
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                b2 = BLI_hnoise(tex->noisesize, eve->co[0], eve->co[1], eve->co[2]);
                                if (tex->stype) ofs *= (b2 * b2);
@@ -4025,7 +4024,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op)
                }
        }
        else {
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                float tin, dum;
                                externtex(ma->mtex[0], eve->co, &tin, &dum, &dum, &dum, &dum, 0);
@@ -4076,7 +4075,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
        BM_data_layer_add(em->bm, &em->bm->edata, CD_PROP_FLT);
        li = CustomData_number_of_layers(&em->bm->edata, CD_PROP_FLT) - 1;
        
-       BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
+       BM_ITER (eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
                float d = len_v3v3(eed->v1->co, eed->v2->co);
                float *dv = CustomData_bmesh_get_n(&em->bm->edata, eed->head.data, CD_PROP_FLT, li);
                
index 6511cc7..d48f177 100644 (file)
@@ -614,7 +614,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx
        totuv = 0;
 
        /* generate UvMapVert array */
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (!selected || ((!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) && BM_elem_flag_test(efa, BM_ELEM_SELECT)))
                        totuv += efa->len;
        }
@@ -642,10 +642,10 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx
        }
        
        a = 0;
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (!selected || ((!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) && BM_elem_flag_test(efa, BM_ELEM_SELECT))) {
                        i = 0;
-                       BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
+                       BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                buf->tfindex = i;
                                buf->f = a;
                                buf->separate = 0;
@@ -663,7 +663,7 @@ UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx
        
        /* sort individual uvs for each vert */
        a = 0;
-       BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
                UvMapVert *iterv, *v, *lastv, *next;
                float *uv, *uv2, uvdiff[2];
@@ -762,7 +762,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_is
        }
 
        /* generate UvElement array */
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                if (!selected || ((!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) && BM_elem_flag_test(efa, BM_ELEM_SELECT)))
                        totuv += efa->len;
        }
@@ -787,10 +787,10 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_is
        }
 
        j = 0;
-       BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                island_number[j++] = INVALID_ISLAND;
                if (!selected || ((!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) && BM_elem_flag_test(efa, BM_ELEM_SELECT))) {
-                       BM_ITER_INDEX(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa, i) {
+                       BM_ITER_INDEX (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa, i) {
                                buf->l = l;
                                buf->face = efa;
                                buf->separate = 0;
@@ -807,7 +807,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_is
 
        /* sort individual uvs for each vert */
        i = 0;
-       BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                UvElement *newvlist = NULL, *vlist = element_map->vert[i];
                UvElement *iterv, *v, *lastv, *next;
                float *uv, *uv2, uvdiff[2];
@@ -871,7 +871,7 @@ UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_is
                                while (stacksize > 0) {
                                        efa = stack[--stacksize];
 
-                                       BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
+                                       BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                                UvElement *element, *initelement = element_map->vert[BM_elem_index_get(l->v)];
 
                                                for (element = initelement; element; element = element->next) {
@@ -1019,7 +1019,7 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index)
  *  EDBM_verts_mirror_cache_begin(em);
  *  ...
  *  ...
- *  BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ *  BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
  *     mirrorv = EDBM_verts_mirror_get(em, v);
  *  }
  *  ...
@@ -1071,7 +1071,7 @@ void EDBM_verts_mirror_cache_begin(BMEditMesh *em, const short use_select)
                tree = BMBVH_NewBVH(em, 0, NULL, NULL);
        }
 
-       BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
 
                /* temporary for testing, check for selection */
                if (use_select && !BM_elem_flag_test(v, BM_ELEM_SELECT)) {
@@ -1159,7 +1159,7 @@ void EDBM_verts_mirror_apply(BMEditMesh *em, const int sel_from, const int sel_t
 
        BLI_assert(em->vert_index != NULL);
 
-       BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(v, BM_ELEM_SELECT) == sel_from) {
                        BMVert *mirr = EDBM_verts_mirror_get(em, v);
                        if (mirr) {
@@ -1189,7 +1189,7 @@ void EDBM_mesh_hide(BMEditMesh *em, int swap)
        else
                itermode = BM_FACES_OF_MESH;
 
-       BM_ITER(ele, &iter, em->bm, itermode, NULL) {
+       BM_ITER (ele, &iter, em->bm, itermode, NULL) {
                if (BM_elem_flag_test(ele, BM_ELEM_SELECT) ^ swap)
                        BM_elem_hide_set(em->bm, ele, TRUE);
        }
@@ -1223,7 +1223,7 @@ void EDBM_mesh_reveal(BMEditMesh *em)
        /* Use tag flag to remember what was hidden before all is revealed.
         * BM_ELEM_HIDDEN --> BM_ELEM_TAG */
        for (i = 0; i < 3; i++) {
-               BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
+               BM_ITER (ele, &iter, em->bm, iter_types[i], NULL) {
                        BM_elem_flag_set(ele, BM_ELEM_TAG, BM_elem_flag_test(ele, BM_ELEM_HIDDEN));
                }
        }
@@ -1237,7 +1237,7 @@ void EDBM_mesh_reveal(BMEditMesh *em)
                        continue;
                }
 
-               BM_ITER(ele, &iter, em->bm, iter_types[i], NULL) {
+               BM_ITER (ele, &iter, em->bm, iter_types[i], NULL) {
                        if (BM_elem_flag_test(ele, BM_ELEM_TAG)) {
                                BM_elem_select_set(em->bm, ele, TRUE);
                        }
index b2d37e8..d3c0a12 100644 (file)
@@ -199,7 +199,7 @@ static void editmesh_face_copy_customdata(BMEditMesh *em, int type, int index)
        const int n = CustomData_get_active_layer(pdata, type);
 
        /* ensure all current elements follow new customdata layout */
-       BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
                void *data = CustomData_bmesh_get_n(pdata, efa->head.data, type, n);
                CustomData_bmesh_set_n(pdata, efa->head.data, type, index, data);
        }
@@ -217,8 +217,8 @@ static void editmesh_loop_copy_customdata(BMEditMesh *em, int type, int index)
        const int n = CustomData_get_active_layer(ldata, type);
 
        /* ensure all current elements follow new customdata layout */
-       BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
-               BM_ITER(loop, &liter, bm, BM_LOOPS_OF_FACE, efa) {
+       BM_ITER (efa, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (loop, &liter, bm, BM_LOOPS_OF_FACE, efa) {
                        void *data = CustomData_bmesh_get_n(ldata, loop->head.data, type, n);
                        CustomData_bmesh_set_n(ldata, loop->head.data, type, index, data);
                }
@@ -245,12 +245,12 @@ int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int laye
 
                BLI_assert(CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV));
 
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        if (!BM_elem_flag_test(efa, BM_ELEM_SELECT))
                                continue;
 
                        i = 0;
-                       BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
+                       BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                luv = CustomData_bmesh_get_n(&em->bm->ldata, l->head.data, CD_MLOOPUV, layernum);
                                BLI_array_append(uvs, luv->uv);
                                i++;
index 7d78a52..3d57c51 100644 (file)
@@ -500,7 +500,7 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
 
                        if (targetPolyIdx > 0) {
                                /* set target poly idx to other selected faces */
-                               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+                               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                                        if (BM_elem_flag_test(efa, BM_ELEM_SELECT) && efa != efa_act) {
                                                int *recastDataBlock = (int *)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST);
                                                *recastDataBlock = targetPolyIdx;
@@ -549,7 +549,7 @@ static int findFreeNavPolyIndex(BMEditMesh *em)
        int i, idx = em->bm->totface - 1, freeIdx = 1;
 
        /*XXX this originally went last to first, but that isn't possible anymore*/
-       BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+       BM_ITER (ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                int polyIdx = *(int *)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
                indices[idx] = polyIdx;
                idx--;
@@ -585,7 +585,7 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
                        /* set target poly idx to selected faces */
                        /*XXX this originally went last to first, but that isn't possible anymore*/
                        
-                       BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                                if (BM_elem_flag_test(ef, BM_ELEM_SELECT)) {
                                        int *recastDataBlock = (int *)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST);
                                        *recastDataBlock = targetPolyIdx;
index 87640c9..c10173e 100644 (file)
@@ -803,8 +803,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
                        BMIter iter;
                        BMVert *eve;
                        
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
-                       {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                DO_MINMAX(eve->co, min, max);
                        }
                }
@@ -841,8 +840,7 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode)
                        BMVert *eve;
                        BMIter iter;
 
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
-                       {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                mesh_octree_add_nodes(MeshOctree.table, eve->co, MeshOctree.offs, MeshOctree.div, (intptr_t)(eve));
                        }
                }
@@ -955,8 +953,7 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e
                BMVert *v;
                
                index = 0;
-               BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL)
-               {
+               BM_ITER (v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (v == eve)
                                break;
                        index++;
@@ -1018,16 +1015,14 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float
                BMIter iter;
                BMFace *efa;
                
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL)
-               {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        poly_uv_center(em, efa, cent);
                        
                        if ( (fabs(cent[0] - cent_vec[0]) < 0.001) && (fabs(cent[1] - cent_vec[1]) < 0.001) ) {
                                BMIter liter;
                                BMLoop *l;
                                
-                               BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa)
-                               {
+                               BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                        MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
                                        if ( (fabs(luv->uv[0] - vec[0]) < 0.001) && (fabs(luv->uv[1] - vec[1]) < 0.001) ) {
                                                return luv->uv;
index 4e967b6..e2b77d6 100644 (file)
@@ -78,7 +78,7 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa
        BMIter iter;
        int *index, nr, totvert=0;
        
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) totvert++;
        }
        if (totvert==0) return 0;
@@ -88,7 +88,7 @@ static int return_editmesh_indexar(BMEditMesh *em, int *tot, int **indexar, floa
        nr= 0;
        zero_v3(cent);
        
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                        *index= nr; index++;
                        add_v3_v3(cent, eve->co);
@@ -114,7 +114,7 @@ static int return_editmesh_vgroup(Object *obedit, BMEditMesh *em, char *name, fl
                BMIter iter;
 
                /* find the vertices */
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
 
                        if (dvert) {
@@ -146,7 +146,7 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd)
        if (hmd->indexar == NULL)
                return;
        
-       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (nr==hmd->indexar[index]) {
                        BM_elem_select_set(em->bm, eve, TRUE);
                        if (index < hmd->totindex-1) index++;
index 57d0de5..b720789 100644 (file)
@@ -137,7 +137,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
                 * so re-create it here */
                makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH, 0);
 
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                if (v1==0) v1= nr;
                                else if (v2==0) v2= nr;
index 474d10f..84861e9 100644 (file)
@@ -687,7 +687,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                mul_m4_v3(obedit->imat, cent);
                        }
                        else {
-                               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                        if (around==V3D_CENTROID) {
                                                total++;
                                                add_v3_v3(cent, eve->co);
@@ -700,7 +700,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                }
                        }
                        
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                sub_v3_v3(eve->co, cent);
                        }
 
index e4b8e21..9b00dd9 100644 (file)
@@ -206,14 +206,14 @@ static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_to
 
                                        i = 0;
                                        if (use_vert_sel) {
-                                               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                                               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                                        (*dvert_arr)[i] = BM_elem_flag_test(eve, BM_ELEM_SELECT) ?
                                                                          CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT) : NULL;
                                                        i++;
                                                }
                                        }
                                        else {
-                                               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                                               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                                        (*dvert_arr)[i] = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
                                                        i++;
                                                }
@@ -593,7 +593,7 @@ static void vgroup_select_verts(Object *ob, int select)
                        BMIter iter;
                        BMVert *eve;
 
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
                                        dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
                                        if (defvert_find_index(dv, def_nr)) {
@@ -1296,7 +1296,7 @@ static void vgroup_blend(Object *ob, const float fac)
                vg_users = MEM_callocN(sizeof(int) * dvert_tot, "vgroup_blend_i");
 
                if (bm) {
-                       BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                       BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                sel1 = BM_elem_flag_test(eed->v1, BM_ELEM_SELECT);
                                sel2 = BM_elem_flag_test(eed->v2, BM_ELEM_SELECT);
 
@@ -1322,7 +1322,7 @@ static void vgroup_blend(Object *ob, const float fac)
                                }
                        }
 
-                       BM_ITER_INDEX(eve, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
+                       BM_ITER_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, NULL, i) {
                                if (BM_elem_flag_test(eve, BM_ELEM_SELECT) && vg_users[i] > 0) {
                                        dv = CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_MDEFORMVERT);
 
@@ -1571,7 +1571,7 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
                        EDBM_verts_mirror_cache_begin(em, FALSE);
 
                        /* Go through the list of editverts and assign them */
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                if ((eve_mirr= EDBM_verts_mirror_get(em, eve))) {
                                        sel= BM_elem_flag_test(eve, BM_ELEM_SELECT);
                                        sel_mirr= BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT);
@@ -1796,7 +1796,7 @@ static void vgroup_active_remove_verts(Object *ob, const int allverts, bDeformGr
                        BMVert *eve;
                        BMIter iter;
 
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
 
                                if (dv && dv->dw && (allverts || BM_elem_flag_test(eve, BM_ELEM_SELECT))) {
@@ -1866,7 +1866,7 @@ static void vgroup_delete_edit_mode(Object *ob, bDeformGroup *dg)
                BMVert *eve;
                MDeformVert *dvert;
                
-               BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                        dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
 
                        if (dvert)
@@ -1998,7 +1998,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
                                BM_data_layer_add(em->bm, &em->bm->vdata, CD_MDEFORMVERT);
 
                        /* Go through the list of editverts and assign them */
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                        MDeformWeight *dw;
                                        dv= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT); /* can be NULL */
@@ -2855,7 +2855,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
                        BMIter iter;
                        BMVert *eve;
 
-                       BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+                       BM_ITER (eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                                dvert= CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
                                if (dvert && dvert->totweight) {
                                        defvert_remap(dvert, sort_map, defbase_tot);
index 14f7e33..87c225e 100644 (file)
@@ -170,8 +170,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
                        BMIter iter;
 
                        if (em) {
-                               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL)
-                               {
+                               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                                        if (BM_elem_flag_test(efa, BM_ELEM_SELECT))
                                                efa->mat_nr = ob->actcol - 1;
                                }
index 2a0118f..5fe043a 100644 (file)
@@ -594,8 +594,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
 
                /* Now, on to generate our uv connectivity data */
                counter = 0;
-               BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
-                       BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
+               BM_ITER (efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
+                       BM_ITER (l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                int offset1, itmp1 = uv_element_offset_from_face_get(data->elementMap, efa, l, island_index, do_island_optimization);
                                int offset2, itmp2 = uv_element_offset_from_face_get(data->elementMap, efa, l->next, island_index, do_island_optimization);
 
index bdc07cc..d520c98 100644 (file)
@@ -2957,7 +2957,7 @@ static void draw_em_indices(BMEditMesh *em)
        i = 0;
        if (em->selectmode & SCE_SELECT_VERTEX) {
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col);
-               BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
                                sprintf(numstr, "%d", i);
                                view3d_cached_text_draw_add(v->co, numstr, 0, txt_flag, col);
@@ -2969,7 +2969,7 @@ static void draw_em_indices(BMEditMesh *em)
        if (em->selectmode & SCE_SELECT_EDGE) {
                i = 0;
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col);
-               BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
                                sprintf(numstr, "%d", i);
                                mid_v3_v3v3(pos, e->v1->co, e->v2->co);
@@ -2982,7 +2982,7 @@ static void draw_em_indices(BMEditMesh *em)
        if (em->selectmode & SCE_SELECT_FACE) {
                i = 0;
                UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col);
-               BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
+               BM_ITER (f, &iter, bm, BM_FACES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(f, BM_ELEM_SELECT)) {
                                BM_face_center_mean_calc(bm, f, pos);
                                sprintf(numstr, "%d", i);
index b1cddf5..a3bf0d4 100644 (file)
@@ -157,7 +157,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                BMEdge *eed;
                BMIter iter;
 
-               BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+               BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                evedef = eve;
                                tot++;
@@ -165,7 +165,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                        }
                }
 
-               BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+               BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                        if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
                                float *f;
 
@@ -404,7 +404,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
 
                        if (len_v3(median) > 0.000001f) {
 
-                               BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
+                               BM_ITER (eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
                                        if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
                                                add_v3_v3(eve->co, median);
                                        }
@@ -418,7 +418,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                                const float sca = compute_scale_factor(ve_median[3], median[3]);
 
                                if (ELEM(sca, 0.0f, 1.0f)) {
-                                       BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
+                                       BM_ITER (eed, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                                               &