Style Cleanup:
authorCampbell Barton <ideasman42@gmail.com>
Tue, 7 Feb 2012 17:42:46 +0000 (17:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 7 Feb 2012 17:42:46 +0000 (17:42 +0000)
replace 0/1 with TRUE/FALSE define.

20 files changed:
source/blender/blenkernel/intern/modifiers_bmesh.c
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_newcore.c
source/blender/bmesh/intern/editmesh_to_bmesh.c
source/blender/bmesh/operators/bevel.c
source/blender/bmesh/operators/bmesh_dupeops.c
source/blender/bmesh/operators/connectops.c
source/blender/bmesh/operators/createops.c
source/blender/bmesh/operators/edgesplitop.c
source/blender/bmesh/operators/extrudeops.c
source/blender/bmesh/operators/mesh_conv.c
source/blender/bmesh/operators/primitiveops.c
source/blender/bmesh/operators/removedoubles.c
source/blender/bmesh/operators/triangulateop.c
source/blender/bmesh/tools/BME_dupe_ops.c
source/blender/editors/mesh/knifetool.c
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/transform/transform.c

index c54a622be7e19faad507af635d0279b056eafb96..8fe400dcbe4b2fa31b4811ccb96e2a642e52f43d 100644 (file)
@@ -153,7 +153,7 @@ BMEditMesh *CDDM_To_BMesh(Object *ob, DerivedMesh *dm, BMEditMesh *existing, int
        /*do edges*/
        me = medge = dm->dupEdgeArray(dm);
        for (i=0; i<totedge; i++, me++) {
-               e = BM_Make_Edge(bm, vtable[me->v1], vtable[me->v2], NULL, 0);
+               e = BM_Make_Edge(bm, vtable[me->v1], vtable[me->v2], NULL, FALSE);
 
                e->head.hflag = BM_Edge_Flag_From_MEFlag(me->flag);
 
@@ -181,7 +181,7 @@ BMEditMesh *CDDM_To_BMesh(Object *ob, DerivedMesh *dm, BMEditMesh *existing, int
                        edges[j] = etable[ml->e];
                }
 
-               f = BM_Make_Ngon(bm, verts[0], verts[1], edges, mp->totloop, 0);
+               f = BM_Make_Ngon(bm, verts[0], verts[1], edges, mp->totloop, FALSE);
 
                if (!f)
                        continue;
index c6597f9165ce9f5fc6f4e4e1a0919991c4e8825e..ca3c5fc067a3e8a2d745bb09844b609a41f1fc8a 100644 (file)
@@ -174,17 +174,17 @@ BMFace *BM_Make_Face_QuadTri_v(BMesh *bm, BMVert **verts, int len, const BMFace
 
        /* make new face */
        if ((!f) && (!overlap)) {
-               if (!edar[0]) edar[0] = BM_Make_Edge(bm, verts[0], verts[1], NULL, 0);
-               if (!edar[1]) edar[1] = BM_Make_Edge(bm, verts[1], verts[2], NULL, 0);
+               if (!edar[0]) edar[0] = BM_Make_Edge(bm, verts[0], verts[1], NULL, FALSE);
+               if (!edar[1]) edar[1] = BM_Make_Edge(bm, verts[1], verts[2], NULL, FALSE);
                if (len == 4) {
-                       if (!edar[2]) edar[2] = BM_Make_Edge(bm, verts[2], verts[3], NULL, 0);
-                       if (!edar[3]) edar[3] = BM_Make_Edge(bm, verts[3], verts[0], NULL, 0);
+                       if (!edar[2]) edar[2] = BM_Make_Edge(bm, verts[2], verts[3], NULL, FALSE);
+                       if (!edar[3]) edar[3] = BM_Make_Edge(bm, verts[3], verts[0], NULL, FALSE);
                }
                else {
-                       if (!edar[2]) edar[2] = BM_Make_Edge(bm, verts[2], verts[0], NULL, 0);
+                       if (!edar[2]) edar[2] = BM_Make_Edge(bm, verts[2], verts[0], NULL, FALSE);
                }
        
-               f = BM_Make_Face(bm, verts, edar, len, 0);
+               f = BM_Make_Face(bm, verts, edar, len, FALSE);
        
                if (example && f) {
                        BM_Copy_Attributes(bm, bm, example, f);
@@ -704,8 +704,10 @@ BMesh *BM_Copy_Mesh(BMesh *bmold)
        
        e = BMIter_New(&iter, bmold, BM_EDGES_OF_MESH, NULL);
        for (i = 0; e; e = BMIter_Step(&iter), i++) {
-               e2 = BM_Make_Edge(bm, vtable[BM_GetIndex(e->v1)],
-                                 vtable[BM_GetIndex(e->v2)], e, 0);
+               e2 = BM_Make_Edge(bm,
+                                 vtable[BM_GetIndex(e->v1)],
+                                 vtable[BM_GetIndex(e->v2)],
+                                 e, FALSE);
 
                BM_Copy_Attributes(bmold, bm, e, e2);
                etable[i] = e2;
@@ -741,7 +743,7 @@ BMesh *BM_Copy_Mesh(BMesh *bmold)
                        v2 = vtable[BM_GetIndex(loops[0]->v)];
                }
 
-               f2 = BM_Make_Ngon(bm, v, v2, edges, f->len, 0);
+               f2 = BM_Make_Ngon(bm, v, v2, edges, f->len, FALSE);
                if (!f2)
                        continue;
                /* use totface incase adding some faces fails */
index cddc5d8d1f29d1a02790d8d184edd58808c39f86..a9ae9613fec42cc98c6cc5f3b1764db8cea5c6b2 100644 (file)
@@ -359,7 +359,7 @@ static void bmesh_rationalize_normals(BMesh *bm, int undo)
                return;
        }
        
-       BMO_InitOpf(bm, &bmop, "righthandfaces faces=%af doflip=%d", 0);
+       BMO_InitOpf(bm, &bmop, "righthandfaces faces=%af doflip=%d", FALSE);
        
        BMO_push(bm, &bmop);
        bmesh_righthandfaces_exec(bm, &bmop);
index df1e9714c757093f56287ccd1b0add4b474e674f..ce4e48daf763afa116ad4ebe5e5f517c4d8f42a3 100644 (file)
@@ -370,12 +370,12 @@ BMFace *BM_Split_Face(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **nl,
 
                        l_iter = l_first = BM_FACE_FIRST_LOOP(f);
                        do {
-                               BM_loop_interp_from_face(bm, l_iter, of, 0, 1);
+                               BM_loop_interp_from_face(bm, l_iter, of, FALSE, TRUE);
                        } while ((l_iter = l_iter->next) != l_first);
 
                        l_iter = l_first = BM_FACE_FIRST_LOOP(nf);
                        do {
-                               BM_loop_interp_from_face(bm, l_iter, of, 0, 1);
+                               BM_loop_interp_from_face(bm, l_iter, of, FALSE, TRUE);
                        } while ((l_iter = l_iter->next) != l_first);
 
                        BM_Kill_Face(bm, of);
index 8076cc4b69c1b169179fcdd8d400f93ab40fb410..46b33a93662b44cca0f498cb7eb680c6f7a6d1a2 100644 (file)
@@ -236,7 +236,7 @@ BMFace *BM_Copy_Face(BMesh *bm, BMFace *f, int copyedges, int copyverts)
                                v1 = verts[(i + 1) % f->len];
                        }
                        
-                       e = BM_Make_Edge(bm,  v1, v2, l_iter->e, 0);
+                       e = BM_Make_Edge(bm,  v1, v2, l_iter->e, FALSE);
                        BLI_array_append(edges, e);
                }
                else {
@@ -246,7 +246,7 @@ BMFace *BM_Copy_Face(BMesh *bm, BMFace *f, int copyedges, int copyverts)
                i++;
        } while ((l_iter = l_iter->next) != l_first);
        
-       f2 = BM_Make_Face(bm, verts, edges, f->len, 0);
+       f2 = BM_Make_Face(bm, verts, edges, f->len, FALSE);
        
        BM_Copy_Attributes(bm, bm, f, f2);
        
@@ -911,7 +911,7 @@ BMFace *BM_Join_Faces(BMesh *bm, BMFace **faces, int totface)
        }
 
        /* create region fac */
-       newf = BM_Make_Ngon(bm, v1, v2, edges, tote, 0);
+       newf = BM_Make_Ngon(bm, v1, v2, edges, tote, FALSE);
        if (!newf || BMO_HasError(bm)) {
                if (!BMO_HasError(bm))
                        err = "Invalid boundary region to join faces";
@@ -1084,7 +1084,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
        }
 
        /* allocate new edge between v1 and v2 */
-       e = BM_Make_Edge(bm, v1, v2, NULL, 0);
+       e = BM_Make_Edge(bm, v1, v2, NULL, FALSE);
 
        f2 = bmesh_addpolylist(bm, f);
        f1loop = bmesh_create_loop(bm, v2, e, f, v2loop);
@@ -1189,7 +1189,7 @@ BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re)
        valence2 = bmesh_disk_count(tv);
 
        nv = BM_Make_Vert(bm, tv->co, tv);
-       ne = BM_Make_Edge(bm, nv, tv, e, 0);
+       ne = BM_Make_Edge(bm, nv, tv, e, FALSE);
 
        bmesh_disk_remove_edge(ne, tv);
        bmesh_disk_remove_edge(ne, nv);
@@ -1835,7 +1835,7 @@ static int bmesh_cutedge(BMesh *bm, BMEdge *e, BMLoop *cutl)
                e->l = cutl->radial_next;
        }
 
-       ne = BM_Make_Edge(bm, e->v1, e->v2, e, 0);
+       ne = BM_Make_Edge(bm, e->v1, e->v2, e, FALSE);
        bmesh_radial_remove_loop(cutl, e);
        bmesh_radial_append(ne, cutl);
        cutl->e = ne;
index f5d5f443502cae7eff59f3ed3e28e697a84d81ae..641e051d048e5ea5260a9365b44e9f270d5fc07f 100644 (file)
@@ -170,7 +170,7 @@ static BMEdge *editedge_to_BMEdge(BMesh *bm, BMOperator *op, EditMesh *em, EditE
                v1 = eed->v1->tmp.p;
                v2 = eed->v2->tmp.p;
        
-               e = BM_Make_Edge(bm, v1, v2,NULL, 0); 
+               e = BM_Make_Edge(bm, v1, v2,NULL, FALSE);
 
                editedge_to_BMEdge_internal(bm, op, em, e, eed);
 
index 76610c520ed61f70826f89a58ab6af33d1e83587..d80c7a49fe820f6be98ae947c023c83d99aa7f9f 100644 (file)
@@ -206,7 +206,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                        BMEdge *edges[2] = {e, BM_Make_Edge(bm, e->v1, e->v2, e, 0)};
                        
                        BMO_SetFlag(bm, edges[1], BEVEL_FLAG);
-                       BM_Make_Face(bm, verts, edges, 2, 0);
+                       BM_Make_Face(bm, verts, edges, 2, FALSE);
                }
 #endif
        }
@@ -431,7 +431,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                                firstv = tag->newv;
                        
                        if (lastv) {
-                               e = BM_Make_Edge(bm, lastv, tag->newv, l->e, 1);
+                               e = BM_Make_Edge(bm, lastv, tag->newv, l->e, TRUE);
                                BM_Copy_Attributes(bm, bm, l->prev->e, e);
                                BLI_array_append(edges, e);
                        }
@@ -443,7 +443,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                        if (!BMO_TestFlag(bm, l->e, BEVEL_FLAG) && v2 && v2 != tag->newv) {
                                BLI_array_append(verts, v2);
                                
-                               e = BM_Make_Edge(bm, lastv, v2, l->e, 1);
+                               e = BM_Make_Edge(bm, lastv, v2, l->e, TRUE);
                                BM_Copy_Attributes(bm, bm, l->e, e);
                                
                                BLI_array_append(edges, e);
@@ -451,13 +451,13 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                        }
                }
                
-               e = BM_Make_Edge(bm, firstv, lastv, BM_FACE_FIRST_LOOP(faces[i])->e, 1);
+               e = BM_Make_Edge(bm, firstv, lastv, BM_FACE_FIRST_LOOP(faces[i])->e, TRUE);
                if (BM_FACE_FIRST_LOOP(faces[i])->prev->e != e) {
                        BM_Copy_Attributes(bm, bm, BM_FACE_FIRST_LOOP(faces[i])->prev->e, e);
                }
                BLI_array_append(edges, e);
                
-               f = BM_Make_Ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), 0);
+               f = BM_Make_Ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), FALSE);
                if (!f) {
                        printf("%s: could not make face!\n", __func__);
                        continue;
@@ -529,7 +529,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                                BMEdge *e1, *e2;
                                float d1, d2, *d3;
                                
-                               f = BM_Make_Face_QuadTri(bm, v4, v3, v2, v1, l->f, 1);
+                               f = BM_Make_Face_QuadTri(bm, v4, v3, v2, v1, l->f, TRUE);
 
                                e1 = BM_Edge_Exist(v4, v3);
                                e2 = BM_Edge_Exist(v2, v1);
@@ -737,7 +737,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                        } while (vv != vstart);
                        
                        if (!err) {
-                               e = BM_Make_Edge(bm, vv, vstart, NULL, 1);
+                               e = BM_Make_Edge(bm, vv, vstart, NULL, TRUE);
                                BLI_array_append(edges, e);
                        }
                }
@@ -751,7 +751,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                        if (BM_Face_Exists(bm, verts, BLI_array_count(verts), &f))
                                continue;
                        
-                       f = BM_Make_Ngon(bm, lastv, vstart, edges, BLI_array_count(edges), 0);
+                       f = BM_Make_Ngon(bm, lastv, vstart, edges, BLI_array_count(edges), FALSE);
                        if (!f) {
                                fprintf(stderr, "%s: in bevel vert fill! (bmesh internal error)\n", __func__);
                        }
@@ -782,7 +782,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
                                
                                if (tag->newv != l->v || HasMDisps) {
                                        BM_Copy_Attributes(bm, bm, l->f, l2->f);
-                                       BM_loop_interp_from_face(bm, l2, l->f, 1, 1);
+                                       BM_loop_interp_from_face(bm, l2, l->f, TRUE, TRUE);
                                }
                                else {
                                        BM_Copy_Attributes(bm, bm, l->f, l2->f);
index 2127800b7abdfb8a519b3c8788e7d2228c82bfad..abf989ed144c2f4f0ff4d3c6bf8af80472aeeb1e 100644 (file)
@@ -95,7 +95,7 @@ static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh,
        target_vert2 = BLI_ghash_lookup(vhash, source_edge->v2);
        
        /* Create a new edg */
-       target_edge = BM_Make_Edge(target_mesh, target_vert1, target_vert2, NULL, 0);
+       target_edge = BM_Make_Edge(target_mesh, target_vert1, target_vert2, NULL, FALSE);
        
        /* add to new/old edge map if necassar */
        if (rlen < 2) {
@@ -152,7 +152,7 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
        }
        
        /* create new fac */
-       target_face = BM_Make_Face(target_mesh, vtar, edar, source_face->len, 0);
+       target_face = BM_Make_Face(target_mesh, vtar, edar, source_face->len, FALSE);
        BMO_Insert_MapPointer(source_mesh, op,
                              "facemap", source_face, target_face);
        BMO_Insert_MapPointer(source_mesh, op,
index f33dfb01df72228a223cc9781d0fe311da5b6f62..49a3dc9e362af3d175c5ac0523a507068049b0eb 100644 (file)
@@ -404,7 +404,7 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
                                                 vv2[i2],
                                                 vv2[i2next],
                                                 vv1[i1next],
-                                                NULL, 1);
+                                                NULL, TRUE);
                        if (!f || f->len != 4) {
                                fprintf(stderr, "%s: in bridge! (bmesh internal error)\n", __func__);
                        }
index 2b497b624f13b0f773d3a7be315fc59cec49d252..f03f008e8945cea19ac366ed809ae0639bc5ece3 100644 (file)
@@ -278,7 +278,7 @@ static int UNUSED_FUNCTION(rotsys_fill_faces)(BMesh *bm, EdgeData *edata, VertDa
                        if (!ok || BLI_array_count(edges) < 3)
                                continue;
                        
-                       f = BM_Make_Ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), 1);
+                       f = BM_Make_Ngon(bm, verts[0], verts[1], edges, BLI_array_count(edges), TRUE);
                        if (!f)
                                continue;
                }
@@ -608,12 +608,11 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
                        
                        v2 = BM_Make_Vert(bm, co, NULL);
                        BM_SetIndex(v2, -1); /* set_dirty! */
-                       //BM_Make_Edge(bm, cv, v2, NULL, 0);
+                       //BM_Make_Edge(bm, cv, v2, NULL, FALSE);
                        
                        BM_Select(bm, v2, TRUE);
                        if (lastv) {
-                               e2 =
-                                BM_Make_Edge(bm, lastv, v2, NULL, 0);
+                               e2 = BM_Make_Edge(bm, lastv, v2, NULL, FALSE);
                                BM_Select(bm, e2, TRUE);
                        }
                        
@@ -1025,7 +1024,7 @@ void bmesh_edgenet_fill_exec(BMesh *bm, BMOperator *op)
                                v2 = verts[0];
                        }
 
-                       f = BM_Make_Ngon(bm, v1, v2, edges, i, 1);
+                       f = BM_Make_Ngon(bm, v1, v2, edges, i, TRUE);
                        if (f && !BMO_TestFlag(bm, f, ELE_ORIG)) {
                                BMO_SetFlag(bm, f, FACE_NEW);
                        }
@@ -1210,9 +1209,9 @@ void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op)
                        v4 = v;
                }
 
-               e = BM_Make_Edge(bm, v1, v3, NULL, 1);
+               e = BM_Make_Edge(bm, v1, v3, NULL, TRUE);
                BMO_SetFlag(bm, e, ELE_NEW);
-               e = BM_Make_Edge(bm, v2, v4, NULL, 1);
+               e = BM_Make_Edge(bm, v2, v4, NULL, TRUE);
                BMO_SetFlag(bm, e, ELE_NEW);
        }
        else if (edges1) {
@@ -1228,7 +1227,7 @@ void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op)
                                v2 = edges1[i]->v2;
                        else v2 = edges1[i]->v1;
 
-                       e = BM_Make_Edge(bm, v1, v2, NULL, 1);
+                       e = BM_Make_Edge(bm, v1, v2, NULL, TRUE);
                        BMO_SetFlag(bm, e, ELE_NEW);
                }
        }
@@ -1321,10 +1320,10 @@ void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op)
                }
 
                if (ok == TRUE && v_free && v_a && v_b) {
-                       e = BM_Make_Edge(bm, v_free, v_a, NULL, 1);
+                       e = BM_Make_Edge(bm, v_free, v_a, NULL, TRUE);
                        BMO_SetFlag(bm, &e->head, ELE_NEW);
 
-                       e = BM_Make_Edge(bm, v_free, v_b, NULL, 1);
+                       e = BM_Make_Edge(bm, v_free, v_b, NULL, TRUE);
                        BMO_SetFlag(bm, &e->head, ELE_NEW);
                }
        }
@@ -1377,34 +1376,34 @@ void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op)
 
        if (amount == 2) {
                /* create edg */
-               e = BM_Make_Edge(bm, verts[0], verts[1], NULL, 1);
+               e = BM_Make_Edge(bm, verts[0], verts[1], NULL, TRUE);
                BMO_SetFlag(bm, e, ELE_OUT);
        }
        else if (amount == 3) {
                /* create triangl */
-               BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[2], NULL, NULL, 1);
+               BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[2], NULL, NULL, TRUE);
        }
        else if (amount == 4) {
                f = NULL;
 
                /* the order of vertices can be anything, 6 cases to check */
                if (is_quad_convex_v3(verts[0]->co, verts[1]->co, verts[2]->co, verts[3]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[2], verts[3], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[2], verts[3], NULL, TRUE);
                }
                else if (is_quad_convex_v3(verts[0]->co, verts[2]->co, verts[3]->co, verts[1]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[2], verts[3], verts[1], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[2], verts[3], verts[1], NULL, TRUE);
                }
                else if (is_quad_convex_v3(verts[0]->co, verts[2]->co, verts[1]->co, verts[3]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[2], verts[1], verts[3], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[2], verts[1], verts[3], NULL, TRUE);
                }
                else if (is_quad_convex_v3(verts[0]->co, verts[1]->co, verts[3]->co, verts[2]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[3], verts[2], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[1], verts[3], verts[2], NULL, TRUE);
                }
                else if (is_quad_convex_v3(verts[0]->co, verts[3]->co, verts[2]->co, verts[1]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[3], verts[2], verts[1], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[3], verts[2], verts[1], NULL, TRUE);
                }
                else if (is_quad_convex_v3(verts[0]->co, verts[3]->co, verts[1]->co, verts[2]->co)) {
-                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[3], verts[1], verts[2], NULL, 1);
+                       f = BM_Make_Face_QuadTri(bm, verts[0], verts[3], verts[1], verts[2], NULL, TRUE);
                }
                else {
                        printf("cannot find nice quad from concave set of vertices\n");
index fbad2db363a3e3035bbebda8a4a7b90e1ec0828d..41e5d510730ef52ac8ee3db5ca829494a0c61c2c 100644 (file)
@@ -77,16 +77,16 @@ static BMFace *remake_face(BMesh *bm, EdgeTag *etags, BMFace *f, BMVert **verts,
        /* v1 = verts[0]; */ /* UNUSED */
        /* v2 = verts[1]; */ /* UNUSED */
        for (i = 0; i < f->len - 1; i++) {
-               e = BM_Make_Edge(bm, verts[i], verts[i + 1], NULL, 1);
+               e = BM_Make_Edge(bm, verts[i], verts[i + 1], NULL, TRUE);
                if (!e) {
                        return NULL;
                }
                edges_tmp[i] = e;
        }
 
-       edges_tmp[i] = BM_Make_Edge(bm, lastv1, lastv2, NULL, 1);
+       edges_tmp[i] = BM_Make_Edge(bm, lastv1, lastv2, NULL, TRUE);
 
-       f2 = BM_Make_Face(bm, verts, edges_tmp, f->len, 0);
+       f2 = BM_Make_Face(bm, verts, edges_tmp, f->len, FALSE);
        if (!f2) {
                return NULL;
        }
index 6fd987c98ba3bf89f7a444d3ed98c02c643e2ea4..95d970b345105b2f70c76317e741b641a10f8136 100644 (file)
@@ -69,7 +69,7 @@ void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
                        v = BM_Make_Vert(bm, l->v->co, l->v);
 
                        if (lastv) {
-                               e = BM_Make_Edge(bm, lastv, v, l->e, 0);
+                               e = BM_Make_Edge(bm, lastv, v, l->e, FALSE);
                                edges[i++] = e;
                        }
 
@@ -79,12 +79,12 @@ void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
                }
 
                BLI_array_growone(edges);
-               e = BM_Make_Edge(bm, v, firstv, laste, 0);
+               e = BM_Make_Edge(bm, v, firstv, laste, FALSE);
                edges[i++] = e;
 
                BMO_SetFlag(bm, f, EXT_DEL);
 
-               f2 = BM_Make_Ngon(bm, firstv, BM_OtherEdgeVert(edges[0], firstv), edges, f->len, 0);
+               f2 = BM_Make_Ngon(bm, firstv, BM_OtherEdgeVert(edges[0], firstv), edges, f->len, FALSE);
                if (!f2) {
                        BMO_RaiseError(bm, op, BMERR_MESH_ERROR, "Extrude failed; could not create face");
                        BLI_array_free(edges);
@@ -101,7 +101,7 @@ void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
                        l3 = l->next;
                        l4 = l2->next;
 
-                       f3 = BM_Make_Face_QuadTri(bm, l3->v, l4->v, l2->v, l->v, f, 0);
+                       f3 = BM_Make_Face_QuadTri(bm, l3->v, l4->v, l2->v, l->v, f, FALSE);
                        
                        BM_Copy_Attributes(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3));
                        BM_Copy_Attributes(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3)->next);
@@ -153,7 +153,7 @@ void bmesh_extrude_onlyedge_exec(BMesh *bm, BMOperator *op)
                        v4 = e->v1;
                }
                        /* not sure what to do about example face, pass  NULL for now */
-               f = BM_Make_Face_QuadTri(bm, v1, v2, v3, v4, NULL, 0);
+               f = BM_Make_Face_QuadTri(bm, v1, v2, v3, v4, NULL, FALSE);
                
                if (BMO_TestFlag(bm, e, EXT_INPUT))
                        e = e2;
@@ -180,7 +180,7 @@ void extrude_vert_indiv_exec(BMesh *bm, BMOperator *op)
        for ( ; v; v = BMO_IterStep(&siter)) {
                dupev = BM_Make_Vert(bm, v->co, v);
 
-               e = BM_Make_Edge(bm, v, dupev, NULL, 0);
+               e = BM_Make_Edge(bm, v, dupev, NULL, FALSE);
 
                BMO_SetFlag(bm, e, EXT_KEEP);
                BMO_SetFlag(bm, dupev, EXT_KEEP);
@@ -308,7 +308,7 @@ void extrude_edge_context_exec(BMesh *bm, BMOperator *op)
                }
 
                /* not sure what to do about example face, pass NULL for now */
-               f = BM_Make_Face_QuadTri_v(bm, verts, 4, NULL, 0);
+               f = BM_Make_Face_QuadTri_v(bm, verts, 4, NULL, FALSE);
 
                /* copy attribute */
                l = BMIter_New(&iter, bm, BM_LOOPS_OF_FACE, f);
@@ -350,7 +350,7 @@ void extrude_edge_context_exec(BMesh *bm, BMOperator *op)
        v = BMO_IterNew(&siter, bm, &dupeop, "isovertmap", 0);
        for ( ; v; v = BMO_IterStep(&siter)) {
                v2 = *((void **)BMO_IterMapVal(&siter));
-               BM_Make_Edge(bm, v, v2, v->e, 1);
+               BM_Make_Edge(bm, v, v2, v->e, TRUE);
        }
 
        /* cleanu */
@@ -583,7 +583,7 @@ void bmesh_solidify_face_region_exec(BMesh *bm, BMOperator *op)
        BMO_Finish_Op(bm, &reverseop);
 
        /* Extrude the region */
-       BMO_InitOpf(bm, &extrudeop, "extrudefaceregion alwayskeeporig=%i", 1);
+       BMO_InitOpf(bm, &extrudeop, "extrudefaceregion alwayskeeporig=%i", TRUE);
        BMO_CopySlot(op, &extrudeop, "geom", "edgefacein");
        BMO_Exec_Op(bm, &extrudeop);
 
index 9bc63c7074bb0f4ef4a6bbd6bb3e48c88d581c5d..427cf9ae16c80105fc8181296588115d93875cd6 100644 (file)
@@ -202,7 +202,7 @@ void mesh_to_bmesh_exec(BMesh *bm, BMOperator *op)
 
        medge = me->medge;
        for (i = 0; i < me->totedge; i++, medge++) {
-               e = BM_Make_Edge(bm, vt[medge->v1], vt[medge->v2], NULL, 0);
+               e = BM_Make_Edge(bm, vt[medge->v1], vt[medge->v2], NULL, FALSE);
                BM_SetIndex(e, i); /* set_ok */
                et[i] = e;
 
@@ -264,7 +264,7 @@ void mesh_to_bmesh_exec(BMesh *bm, BMOperator *op)
                }
 #endif
 
-               f = BM_Make_Face(bm, verts, fedges, mpoly->totloop, 0);
+               f = BM_Make_Face(bm, verts, fedges, mpoly->totloop, FALSE);
 
                if (!f) {
                        printf("%s: Warning! Bad face in mesh"
index 0af36dbfb11b5a1a7b2c277d4722fdaaf719b675..660f7db574ceab1fa17c2c5c390e11d780edbb02 100644 (file)
@@ -262,7 +262,7 @@ void bmesh_create_grid_exec(BMesh *bm, BMOperator *op)
                BM_Select(bm, eve, TRUE);
 
                if (a) {
-                       e = BM_Make_Edge(bm, preveve, eve, NULL, 1);
+                       e = BM_Make_Edge(bm, preveve, eve, NULL, TRUE);
                        BMO_SetFlag(bm, e, EDGE_ORIG);
                }
 
@@ -326,7 +326,7 @@ void bmesh_create_uvsphere_exec(BMesh *bm, BMOperator *op)
                BMO_SetFlag(bm, eve, VERT_MARK);
 
                if (a != 0) {
-                       e = BM_Make_Edge(bm, preveve, eve, NULL, 0);
+                       e = BM_Make_Edge(bm, preveve, eve, NULL, FALSE);
                        BMO_SetFlag(bm, e, EDGE_ORIG);
                }
 
@@ -406,7 +406,7 @@ void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op)
                v2 = eva[icoface[a][1]];
                v3 = eva[icoface[a][2]];
 
-               eftemp = BM_Make_Face_QuadTri(bm, v1, v2, v3, NULL, NULL, 0);
+               eftemp = BM_Make_Face_QuadTri(bm, v1, v2, v3, NULL, NULL, FALSE);
                
                BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, eftemp) {
                        BMO_SetFlag(bm, l->e, EDGE_MARK);
@@ -461,16 +461,14 @@ void bmesh_create_monkey_exec(BMesh *bm, BMOperator *op)
                                     tv[monkeyf[i][1] + i - monkeyo],
                                     tv[monkeyf[i][2] + i - monkeyo],
                                     (monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeyf[i][3] + i - monkeyo] : NULL,
-                                    NULL,
-                                    0);
+                                    NULL, FALSE);
 
                BM_Make_Face_QuadTri(bm,
                                     tv[monkeynv + monkeyf[i][2] + i - monkeyo],
                                     tv[monkeynv + monkeyf[i][1] + i - monkeyo],
                                     tv[monkeynv + monkeyf[i][0] + i - monkeyo],
                                     (monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeynv + monkeyf[i][3] + i - monkeyo]: NULL,
-                                    NULL,
-                                    0);
+                                    NULL, FALSE);
        }
 
        MEM_freeN(tv);
@@ -515,12 +513,12 @@ void bmesh_create_circle_exec(BMesh *bm, BMOperator *op)
                BMO_SetFlag(bm, v1, VERT_MARK);
                
                if (lastv1)
-                       BM_Make_Edge(bm, v1, lastv1, NULL, 0);
+                       BM_Make_Edge(bm, v1, lastv1, NULL, FALSE);
                
                if (a && cap_ends) {
                        BMFace *f;
                        
-                       f = BM_Make_Face_QuadTri(bm, cent1, lastv1, v1, NULL, NULL, 0);
+                       f = BM_Make_Face_QuadTri(bm, cent1, lastv1, v1, NULL, NULL, FALSE);
                        BMO_SetFlag(bm, f, FACE_NEW);
                }
                
@@ -533,12 +531,12 @@ void bmesh_create_circle_exec(BMesh *bm, BMOperator *op)
        if (!a)
                return;
 
-       BM_Make_Edge(bm, lastv1, firstv1, NULL, 0);
+       BM_Make_Edge(bm, lastv1, firstv1, NULL, FALSE);
 
        if (cap_ends) {
                BMFace *f;
                
-               f = BM_Make_Face_QuadTri(bm, cent1, v1, firstv1, NULL, NULL, 0);
+               f = BM_Make_Face_QuadTri(bm, cent1, v1, firstv1, NULL, NULL, FALSE);
                BMO_SetFlag(bm, f, FACE_NEW);
        }
        
@@ -606,12 +604,12 @@ void bmesh_create_cone_exec(BMesh *bm, BMOperator *op)
                        if (cap_ends) {
                                BMFace *f;
                                
-                               f = BM_Make_Face_QuadTri(bm, cent1, lastv1, v1, NULL, NULL, 0);
+                               f = BM_Make_Face_QuadTri(bm, cent1, lastv1, v1, NULL, NULL, FALSE);
                                BMO_SetFlag(bm, f, FACE_NEW);
-                               f = BM_Make_Face_QuadTri(bm, cent2, v2, lastv2, NULL, NULL, 0);
+                               f = BM_Make_Face_QuadTri(bm, cent2, v2, lastv2, NULL, NULL, FALSE);
                                BMO_SetFlag(bm, f, FACE_NEW);
                        }
-                       BM_Make_Face_QuadTri(bm, lastv1, lastv2, v2, v1, NULL, 0);
+                       BM_Make_Face_QuadTri(bm, lastv1, lastv2, v2, v1, NULL, FALSE);
                }
                else {
                        firstv1 = v1;
@@ -628,9 +626,9 @@ void bmesh_create_cone_exec(BMesh *bm, BMOperator *op)
        if (cap_ends) {
                BMFace *f;
                
-               f = BM_Make_Face_QuadTri(bm, cent1, v1, firstv1, NULL, NULL, 0);
+               f = BM_Make_Face_QuadTri(bm, cent1, v1, firstv1, NULL, NULL, FALSE);
                BMO_SetFlag(bm, f, FACE_NEW);
-               f = BM_Make_Face_QuadTri(bm, cent2, firstv2, v2, NULL, NULL, 0);
+               f = BM_Make_Face_QuadTri(bm, cent2, firstv2, v2, NULL, NULL, FALSE);
                BMO_SetFlag(bm, f, FACE_NEW);
        }
        
@@ -638,7 +636,7 @@ void bmesh_create_cone_exec(BMesh *bm, BMOperator *op)
                BMO_CallOpf(bm, "dissolvefaces faces=%ff", FACE_NEW);
        }
        
-       BM_Make_Face_QuadTri(bm, v1, v2, firstv2, firstv1, NULL, 0);
+       BM_Make_Face_QuadTri(bm, v1, v2, firstv2, firstv1, NULL, FALSE);
 
        BMO_CallOpf(bm, "removedoubles verts=%fv dist=%f", VERT_MARK, 0.000001);
        BMO_Flag_To_Slot(bm, op, "vertout", VERT_MARK, BM_VERT);
@@ -710,14 +708,14 @@ void bmesh_create_cube_exec(BMesh *bm, BMOperator *op)
        BMO_SetFlag(bm, v8, VERT_MARK);
 
        /* the four sides */
-       BM_Make_Face_QuadTri(bm, v5, v6, v2, v1, NULL, 0);
-       BM_Make_Face_QuadTri(bm, v6, v7, v3, v2, NULL, 0);
-       BM_Make_Face_QuadTri(bm, v7, v8, v4, v3, NULL, 0);
-       BM_Make_Face_QuadTri(bm, v8, v5, v1, v4, NULL, 0);
+       BM_Make_Face_QuadTri(bm, v5, v6, v2, v1, NULL, FALSE);
+       BM_Make_Face_QuadTri(bm, v6, v7, v3, v2, NULL, FALSE);
+       BM_Make_Face_QuadTri(bm, v7, v8, v4, v3, NULL, FALSE);
+       BM_Make_Face_QuadTri(bm, v8, v5, v1, v4, NULL, FALSE);
        
        /* top/bottom */
-       BM_Make_Face_QuadTri(bm, v1, v2, v3, v4, NULL, 0);
-       BM_Make_Face_QuadTri(bm, v8, v7, v6, v5, NULL, 0);
+       BM_Make_Face_QuadTri(bm, v1, v2, v3, v4, NULL, FALSE);
+       BM_Make_Face_QuadTri(bm, v8, v7, v6, v5, NULL, FALSE);
 
        BMO_Flag_To_Slot(bm, op, "vertout", VERT_MARK, BM_VERT);
 }
index 0e0080d0a72cd46a82f9fdbc17e74d408063bec5..7b4ff416ef1c218cbd8d14b3aa7ce290c72f58f1 100644 (file)
@@ -134,7 +134,7 @@ void bmesh_weldverts_exec(BMesh *bm, BMOperator *op)
                        if (v == v2)
                                BMO_SetFlag(bm, e, EDGE_COL);
                        else if (!BM_Edge_Exist(v, v2))
-                               BM_Make_Edge(bm, v, v2, e, 1);
+                               BM_Make_Edge(bm, v, v2, e, TRUE);
 
                        BMO_SetFlag(bm, e, ELE_DEL);
                }
@@ -209,7 +209,7 @@ void bmesh_weldverts_exec(BMesh *bm, BMOperator *op)
                        v2 = BMO_Get_MapPointer(bm, op, "targetmap", v2);
                }
                
-               f2 = BM_Make_Ngon(bm, v, v2, edges, a, 1);
+               f2 = BM_Make_Ngon(bm, v, v2, edges, a, TRUE);
                if (f2 && (f2 != f)) {
                        BM_Copy_Attributes(bm, bm, f, f2);
 
index 42a7708f441af80ad2939f2652a522c9ab1f461e..42f1f57b13b7e0128c5cabb2ac53eda0a417fe64 100644 (file)
@@ -191,7 +191,9 @@ void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op)
        BLI_edgefill(0);
        
        for (efa = fillfacebase.first; efa; efa = efa->next) {
-               BMFace *f = BM_Make_Face_QuadTri(bm, efa->v1->tmp.p, efa->v2->tmp.p, efa->v3->tmp.p, NULL, NULL, 1);
+               BMFace *f = BM_Make_Face_QuadTri(bm,
+                                                efa->v1->tmp.p, efa->v2->tmp.p, efa->v3->tmp.p, NULL,
+                                                NULL, TRUE);
                BMLoop *l;
                BMIter liter;
                
index b9d04315310d393e9b1ce02330bbbd9bdc80fcbe..4e864c232fc1722bd497280cb7e9a638424b92f6 100644 (file)
@@ -54,7 +54,7 @@ static BMEdge *copy_edge(BMMesh *source_mesh, BMEdge *source_edge, BMMesh *targe
        target_vert2 = BLI_ghash_lookup(vhash, source_edge->v2);
        
        /*create a new edge*/
-       target_edge = BM_Make_Edge(target_mesh, target_vert1, target_vert2, NULL, 0);
+       target_edge = BM_Make_Edge(target_mesh, target_vert1, target_vert2, NULL, FALSE);
 
        /*insert new edge into the edge hash*/
        BLI_ghash_insert(ehash, source_edge, target_edge);      
index 687270ed20ebbd9f52e6b7a847cc0c3abb31b7c7..95bc1d006dc8372378fea93ba69703a39530807c 100755 (executable)
@@ -1788,7 +1788,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
                        kfe->e = NULL;
                }
                
-               kfe->e = BM_Make_Edge(bm, kfe->v1->v, kfe->v2->v, NULL, 1);
+               kfe->e = BM_Make_Edge(bm, kfe->v1->v, kfe->v2->v, NULL, TRUE);
                BMO_SetFlag(bm, kfe->e, BOUNDARY);
                
                for (ref=kfe->faces.first; ref; ref=ref->next) {
@@ -1899,7 +1899,10 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
                        if (BM_Face_Exists(bm, verts, 3, &f2))
                                continue;
                
-                       f2 = BM_Make_Face_QuadTri(bm, v1, v2, v3, NULL, NULL, 0);
+                       f2 = BM_Make_Face_QuadTri(bm,
+                                                 v1, v2, v3, NULL,
+                                                 NULL, FALSE);
+
                        BMO_SetFlag(bm, f2, FACE_NEW);
                        
                        l = BM_FACE_FIRST_LOOP(f2);
@@ -1939,7 +1942,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
                BM_Copy_Attributes(bm, bm, f2, f);
                
                BM_ITER(l1, &liter1, bm, BM_LOOPS_OF_FACE, f) {
-                       BM_loop_interp_from_face(bm, l1, f2, 1, 1);
+                       BM_loop_interp_from_face(bm, l1, f2, TRUE, TRUE);
                }
        }
 
index 5eb1fd234e4ed6dbcf1fbbb52741ee61b176ecba..870350e18aff01262dece9a886a2c31376e6be9d 100644 (file)
@@ -382,12 +382,15 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
 
                        for(k= 0; k<3; k++) {
                                if(tri[k]<nv)
-                                       face[k]= p[tri[k]]; /* shared vertex */
+                                       face[k] = p[tri[k]]; /* shared vertex */
                                else
-                                       face[k]= uniquevbase+tri[k]-nv; /* unique vertex */
+                                       face[k] = uniquevbase+tri[k]-nv; /* unique vertex */
                        }
-                       newFace= BM_Make_Face_QuadTri(em->bm, EDBM_get_vert_for_index(em, face[0]), EDBM_get_vert_for_index(em, face[2]),
-                                                                       EDBM_get_vert_for_index(em, face[1]), NULL, NULL, 0);
+                       newFace= BM_Make_Face_QuadTri(em->bm,
+                                                     EDBM_get_vert_for_index(em, face[0]),
+                                                     EDBM_get_vert_for_index(em, face[2]),
+                                                     EDBM_get_vert_for_index(em, face[1]), NULL,
+                                                     NULL, FALSE);
 
                        /* set navigation polygon idx to the custom layer */
                        polygonIdx= (int*)CustomData_bmesh_get(&em->bm->pdata, newFace->head.data, CD_RECAST);
index f20532c80bdcfe7034c32e127585033f276cd2ec..a09abd6d5aa6d405e0e12c997e04f19744025a31 100644 (file)
@@ -4720,7 +4720,7 @@ void projectSVData(TransInfo *t, int final)
                                                continue;  /* shouldn't happen, but protection */
                                }
                                
-                               BM_loop_interp_from_face(em->bm, l2, copyf, do_vdata, 0);
+                               BM_loop_interp_from_face(em->bm, l2, copyf, do_vdata, FALSE);
 
                                if (final) {
                                        BM_loop_interp_multires(em->bm, l2, copyf);