code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 19 Mar 2012 08:36:27 +0000 (08:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 19 Mar 2012 08:36:27 +0000 (08:36 +0000)
20 files changed:
source/blender/bmesh/bmesh_operator_api.h
source/blender/bmesh/intern/bmesh_operators.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_mirror.c
source/blender/bmesh/operators/bmo_primitive.c
source/blender/bmesh/operators/bmo_removedoubles.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/editors/mesh/bmesh_select.c
source/blender/editors/mesh/bmesh_tools.c
source/blender/editors/mesh/bmesh_utils.c
source/blender/editors/mesh/knifetool.c

index d45092e..c53a76a 100644 (file)
@@ -184,7 +184,7 @@ void BMO_op_finish(BMesh *bm, BMOperator *op);
 
 /* count the number of elements with a specific flag.
  * type can be a bitmask of BM_FACE, BM_EDGE, or BM_FACE. */
-int BMO_mesh_flag_count(BMesh *bm, const short oflag, const char htype);
+int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag);
 
 /*---------formatted operator initialization/execution-----------*/
 /*
@@ -292,27 +292,27 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, const char htype, cons
 /* puts every element of type type (which is a bitmask) with tool flag flag,
  * into a slot. */
 void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname,
-                               const short oflag, const char htype);
+                               const char htype, const short oflag);
 
 /* tool-flags all elements inside an element slot array with flag flag. */
 void BMO_slot_buffer_flag_enable(BMesh *bm, BMOperator *op, const char *slotname,
-                                 const short oflag, const char htype);
+                                 const char htype, const short oflag);
 /* clears tool-flag flag from all elements inside a slot array. */
 void BMO_slot_buffer_flag_disable(BMesh *bm, BMOperator *op, const char *slotname,
-                                  const short oflag, const char htype);
+                                  const char htype, const short oflag);
 
 /* tool-flags all elements inside an element slot array with flag flag. */
 void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotname,
-                                  const char hflag, const char htype, const char do_flush);
+                                  const char htype, const char hflag, const char do_flush);
 /* clears tool-flag flag from all elements inside a slot array. */
 void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOperator *op, const char *slotname,
-                                   const char hflag, const char htype, const char do_flush);
+                                   const char htype, const char hflag, const char do_flush);
 
 /* puts every element of type type (which is a bitmask) with header flag
  * flag, into a slot.  note: ignores hidden elements (e.g. elements with
  * header flag BM_ELEM_HIDDEN set).*/
 void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname,
-                                const char hflag, const char htype);
+                                const char htype, const char hflag);
 
 /* counts number of elements inside a slot array. */
 int BMO_slot_buffer_count(BMesh *bm, BMOperator *op, const char *slotname);
@@ -328,7 +328,7 @@ int BMO_vert_edge_flags_count(BMesh *bm, BMVert *v, const short oflag);
 /* flags all elements in a mapping.  note that the mapping must only have
  * bmesh elements in it.*/
 void BMO_slot_map_to_flag(BMesh *bm, BMOperator *op, const char *slotname,
-                          const short oflag, const char hflag);
+                          const char hflag, const short oflag);
 
 /* this part of the API is used to iterate over element buffer or
  * mapping slots.
index 0fa54a9..4c38cca 100644 (file)
@@ -455,7 +455,7 @@ void BMO_slot_vec_get(BMOperator *op, const char *slotname, float r_vec[3])
  *
  */
 
-int BMO_mesh_flag_count(BMesh *bm, const short oflag, const char htype)
+int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag)
 {
        BMIter elements;
        int count = 0;
@@ -596,7 +596,7 @@ void *bmo_slot_buffer_grow(BMesh *bm, BMOperator *op, int slotcode, int totadd)
 #endif
 
 void BMO_slot_map_to_flag(BMesh *bm, BMOperator *op, const char *slotname,
-                          const short oflag, const char htype)
+                          const char htype, const short oflag)
 {
        GHashIterator it;
        BMOpSlot *slot = BMO_slot_get(op, slotname);
@@ -679,7 +679,7 @@ static void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot
  * into a slot for an operator.
  */
 void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname,
-                                const char hflag, const char htype)
+                                const char htype, const char hflag)
 {
        BMIter elements;
        BMElem *ele;
@@ -730,11 +730,11 @@ void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname,
  * into an output slot for an operator.
  */
 void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname,
-                               const short oflag, const char htype)
+                               const char htype, const short oflag)
 {
        BMIter elements;
        BMOpSlot *slot = BMO_slot_get(op, slotname);
-       int totelement = BMO_mesh_flag_count(bm, oflag, htype), i = 0;
+       int totelement = BMO_mesh_flag_count(bm, htype, oflag), i = 0;
 
        BLI_assert(slot->slottype == BMO_OP_SLOT_ELEMENT_BUF);
 
@@ -785,7 +785,7 @@ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname,
  * using the selection API where appropriate.
  */
 void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotname,
-                                  const char hflag, const char htype, const char do_flush)
+                                  const char htype, const char hflag, const char do_flush)
 {
        BMOpSlot *slot = BMO_slot_get(op, slotname);
        BMElem **data =  slot->data.p;
@@ -818,7 +818,7 @@ void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotnam
  * using the selection API where appropriate.
  */
 void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOperator *op, const char *slotname,
-                                   const char hflag, const char htype, const char do_flush)
+                                   const char htype, const char hflag, const char do_flush)
 {
        BMOpSlot *slot = BMO_slot_get(op, slotname);
        BMElem **data =  slot->data.p;
@@ -869,7 +869,7 @@ int BMO_vert_edge_flags_count(BMesh *bm, BMVert *v, const short oflag)
  * Flags elements in a slots buffer
  */
 void BMO_slot_buffer_flag_enable(BMesh *bm, BMOperator *op, const char *slotname,
-                                 const short oflag, const char htype)
+                                 const char htype, const short oflag)
 {
        BMOpSlot *slot = BMO_slot_get(op, slotname);
        BMHeader **data =  slot->data.p;
@@ -891,7 +891,7 @@ void BMO_slot_buffer_flag_enable(BMesh *bm, BMOperator *op, const char *slotname
  * Removes flags from elements in a slots buffer
  */
 void BMO_slot_buffer_flag_disable(BMesh *bm, BMOperator *op, const char *slotname,
-                                  const short oflag, const char htype)
+                                  const char htype, const short oflag)
 {
        BMOpSlot *slot = BMO_slot_get(op, slotname);
        BMHeader **data =  slot->data.p;
@@ -1245,7 +1245,8 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist)
        BMOpDefine *def;
        char *opname, *ofmt, *fmt;
        char slotname[64] = {0};
-       int i /*, n = strlen(fmt) */, stop /*, slotcode = -1 */, ret, type, state;
+       int i /*, n = strlen(fmt) */, stop /*, slotcode = -1 */, type, state;
+       char htype;
        int noslot = 0;
 
 
@@ -1380,13 +1381,13 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist)
                                                BMO_slot_float_set(op, slotname, va_arg(vlist, double));
                                        }
                                        else {
-                                               ret = 0;
+                                               htype = 0;
                                                stop = 0;
                                                while (1) {
                                                        switch (NEXT_CHAR(fmt)) {
-                                                               case 'f': ret |= BM_FACE; break;
-                                                               case 'e': ret |= BM_EDGE; break;
-                                                               case 'v': ret |= BM_VERT; break;
+                                                               case 'f': htype |= BM_FACE; break;
+                                                               case 'e': htype |= BM_EDGE; break;
+                                                               case 'v': htype |= BM_VERT; break;
                                                                default:
                                                                        stop = 1;
                                                                        break;
@@ -1399,13 +1400,13 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist)
                                                }
 
                                                if (type == 'h') {
-                                                       BMO_slot_buffer_from_hflag(bm, op, slotname, va_arg(vlist, int), ret);
+                                                       BMO_slot_buffer_from_hflag(bm, op, slotname, htype, va_arg(vlist, int));
                                                }
                                                else if (type == 'a') {
-                                                       BMO_slot_buffer_from_all(bm, op, slotname, ret);
+                                                       BMO_slot_buffer_from_all(bm, op, slotname, htype);
                                                }
                                                else {
-                                                       BMO_slot_buffer_from_flag(bm, op, slotname, va_arg(vlist, int), ret);
+                                                       BMO_slot_buffer_from_flag(bm, op, slotname, htype, va_arg(vlist, int));
                                                }
                                        }
 
index 3462b4c..3be3000 100644 (file)
@@ -877,6 +877,6 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
        BLI_array_free(edges);
        BLI_array_free(faces);
        
-       BMO_slot_buffer_from_flag(bm, op, "face_spans", FACE_SPAN, BM_FACE);
-       BMO_slot_buffer_from_flag(bm, op, "face_holes", FACE_HOLE, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "face_spans", BM_FACE, FACE_SPAN);
+       BMO_slot_buffer_from_flag(bm, op, "face_holes", BM_FACE, FACE_HOLE);
 }
index af930d6..708fe2f 100644 (file)
@@ -45,7 +45,7 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
        BLI_array_declare(verts);
        int i;
        
-       BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_INPUT, BM_VERT);
+       BMO_slot_buffer_flag_enable(bm, op, "verts", BM_VERT, VERT_INPUT);
 
        for (f = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL); f; f = BM_iter_step(&iter)) {
                BLI_array_empty(loops);
@@ -116,7 +116,7 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", EDGE_OUT, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT);
 
        BLI_array_free(loops);
        BLI_array_free(verts);
@@ -208,7 +208,7 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
        BMEdge *e, *nexte;
        int c = 0, cl1 = 0, cl2 = 0;
 
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
 
        BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
                if (!BMO_elem_flag_test(bm, e, EDGE_DONE)) {
index 8b5ae5f..459b1cb 100644 (file)
@@ -904,8 +904,8 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
        edata = MEM_callocN(sizeof(EdgeData) * bm->totedge, "EdgeData");
        vdata = MEM_callocN(sizeof(VertData) * bm->totvert, "VertData");
        
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
-       BMO_slot_buffer_flag_enable(bm, op, "excludefaces", FACE_IGNORE, BM_FACE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
+       BMO_slot_buffer_flag_enable(bm, op, "excludefaces", BM_FACE, FACE_IGNORE);
        
        BM_mesh_elem_index_ensure(bm, BM_VERT);
 
@@ -1053,7 +1053,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
                edge_free_path(pathbase, path);
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "faceout", FACE_NEW, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_NEW);
 
        BLI_array_free(edges);
        BLI_array_free(verts);
@@ -1093,7 +1093,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
        int ok = 1;
        int i, count;
 
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
        
        /* validate that each edge has at most one other tagged edge in the
         * disk cycle around each of it's vertices */
@@ -1250,7 +1250,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
                }
        }
        
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", ELE_NEW, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, ELE_NEW);
 
        BLI_array_free(edges1);
        BLI_array_free(edges2);
@@ -1354,7 +1354,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
        /* call edgenet prepare op so additional face creation cases wore */
        BMO_op_initf(bm, &op2, "edgenet_prepare edges=%fe", ELE_NEW);
        BMO_op_exec(bm, &op2);
-       BMO_slot_buffer_flag_enable(bm, &op2, "edgeout", ELE_NEW, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, &op2, "edgeout", BM_EDGE, ELE_NEW);
        BMO_op_finish(bm, &op2);
 
        BMO_op_initf(bm, &op2, "edgenet_fill edges=%fe use_fill_check=%b", ELE_NEW, TRUE);
index 2fc1a0d..1db07fd 100644 (file)
@@ -92,7 +92,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_flag_enable(bm, op, "faces", FACE_MARK, BM_FACE);
+       BMO_slot_buffer_flag_enable(bm, op, "faces", BM_FACE, FACE_MARK);
        
        /* collect region */
        BMO_ITER(f, &oiter, bm, op, "faces", BM_FACE) {
@@ -178,7 +178,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
                goto cleanup;
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "regionout", FACE_NEW, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "regionout", BM_FACE, FACE_NEW);
 
 cleanup:
        /* free/cleanup */
@@ -327,7 +327,7 @@ void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op)
        BMFace *f;
        /* int i; */
 
-       BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_flag_enable(bm, op, "verts", BM_VERT, VERT_MARK);
        
        for (v = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); v; v = BM_iter_step(&iter)) {
                if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
index 48a9b13..bb5f090 100644 (file)
@@ -325,7 +325,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op)
                bm2 = bm;
 
        /* flag inpu */
-       BMO_slot_buffer_flag_enable(bm, dupeop, "geom", DUPE_INPUT, BM_ALL);
+       BMO_slot_buffer_flag_enable(bm, dupeop, "geom", BM_ALL, DUPE_INPUT);
 
        /* use the internal copy function */
        copy_mesh(dupeop, bm, bm2);
@@ -335,7 +335,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op)
        BMO_slot_copy(dupeop, dupeop, "geom", "origout");
 
        /* Now alloc the new output buffers */
-       BMO_slot_buffer_from_flag(bm, dupeop, "newout", DUPE_NEW, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, dupeop, "newout", BM_ALL, DUPE_NEW);
 }
 
 #if 0 /* UNUSED */
@@ -343,12 +343,12 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op)
  * type flag etypeflag and header flag flag to it.  note,
  * to get more useful information (such as the mapping from
  * original to new elements) you should run the dupe op manually */
-void BMO_dupe_from_flag(BMesh *bm, int etypeflag, const char hflag)
+void BMO_dupe_from_flag(BMesh *bm, int htype, const char hflag)
 {
        BMOperator dupeop;
 
        BMO_op_init(bm, &dupeop, "dupe");
-       BMO_slot_buffer_from_hflag(bm, &dupeop, "geom", hflag, etypeflag);
+       BMO_slot_buffer_from_hflag(bm, &dupeop, "geom", htype, hflag);
 
        BMO_op_exec(bm, &dupeop);
        BMO_op_finish(bm, &dupeop);
@@ -388,7 +388,7 @@ void bmo_split_exec(BMesh *bm, BMOperator *op)
        BMO_slot_copy(splitop, &dupeop, "geom", "geom");
        BMO_op_exec(bm, &dupeop);
        
-       BMO_slot_buffer_flag_enable(bm, splitop, "geom", SPLIT_INPUT, BM_ALL);
+       BMO_slot_buffer_flag_enable(bm, splitop, "geom", BM_ALL, SPLIT_INPUT);
 
        if (use_only_faces) {
                BMVert *v;
@@ -429,7 +429,7 @@ void bmo_split_exec(BMesh *bm, BMOperator *op)
 
        /* connect outputs of dupe to delete, exluding keep geometry */
        BMO_slot_int_set(&delop, "context", DEL_FACES);
-       BMO_slot_buffer_from_flag(bm, &delop, "geom", SPLIT_INPUT, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, &delop, "geom", BM_ALL, SPLIT_INPUT);
        
        BMO_op_exec(bm, &delop);
 
@@ -453,7 +453,7 @@ void bmo_del_exec(BMesh *bm, BMOperator *op)
        BMOperator *delop = op;
 
        /* Mark Buffer */
-       BMO_slot_buffer_flag_enable(bm, delop, "geom", DEL_INPUT, BM_ALL);
+       BMO_slot_buffer_flag_enable(bm, delop, "geom", BM_ALL, DEL_INPUT);
 
        BMO_remove_tagged_context(bm, DEL_INPUT, BMO_slot_int_get(op, "context"));
 
index 20dd632..b21082c 100644 (file)
@@ -91,7 +91,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
        BMOIter siter;
        BMEdge *e;
 
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_SEAM, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_SEAM);
 
        bm_edgesplit_validate_seams(bm, op);
 
@@ -119,5 +119,5 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_from_hflag(bm, op, "edgeout", BM_ELEM_INTERNAL_TAG, BM_EDGE);
+       BMO_slot_buffer_from_hflag(bm, op, "edgeout", BM_EDGE, BM_ELEM_INTERNAL_TAG);
 }
index 4199b56..8f86986 100644 (file)
@@ -110,7 +110,7 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
        BLI_array_free(edges);
 
        BMO_op_callf(bm, "del geom=%ff context=%i", EXT_DEL, DEL_ONLYFACES);
-       BMO_slot_buffer_from_flag(bm, op, "faceout", EXT_KEEP, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, EXT_KEEP);
 }
 
 void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
@@ -162,7 +162,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op)
 
        BMO_op_finish(bm, &dupeop);
 
-       BMO_slot_buffer_from_flag(bm, op, "geomout", EXT_KEEP, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, op, "geomout", BM_ALL, EXT_KEEP);
 }
 
 void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op)
@@ -181,8 +181,8 @@ void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op)
                BMO_elem_flag_enable(bm, dupev, EXT_KEEP);
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", EXT_KEEP, BM_VERT);
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", EXT_KEEP, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, EXT_KEEP);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EXT_KEEP);
 }
 
 void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
@@ -199,7 +199,7 @@ void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op)
        /* initialize our sub-operators */
        BMO_op_init(bm, &dupeop, "dupe");
        
-       BMO_slot_buffer_flag_enable(bm, op, "edgefacein", EXT_INPUT, BM_EDGE|BM_FACE);
+       BMO_slot_buffer_flag_enable(bm, op, "edgefacein", BM_EDGE|BM_FACE, EXT_INPUT);
        
        /* if one flagged face is bordered by an un-flagged face, then we delete
         * original geometry unless caller explicitly asked to keep it. */
@@ -614,7 +614,7 @@ void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op)
        BMO_op_exec(bm, &extrudeop);
 
        /* Push the verts of the extruded faces inward to create thickness */
-       BMO_slot_buffer_flag_enable(bm, &extrudeop, "geomout", FACE_MARK, BM_FACE);
+       BMO_slot_buffer_flag_enable(bm, &extrudeop, "geomout", BM_FACE, FACE_MARK);
        calc_solidify_normals(bm);
        solidify_add_thickness(bm, thickness);
 
index ee23dc8..bd226b0 100644 (file)
@@ -80,7 +80,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
        int i, j, k;
 
        BM_mesh_elem_flag_disable_all(bm, BM_FACE, BM_ELEM_TAG);
-       BMO_slot_buffer_hflag_enable(bm, op, "faces", BM_ELEM_TAG, BM_FACE, FALSE);
+       BMO_slot_buffer_hflag_enable(bm, op, "faces", BM_FACE, BM_ELEM_TAG, FALSE);
 
        /* first count all inset edges we will split */
        /* fill in array and initialize tagging */
@@ -343,5 +343,5 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op)
        MEM_freeN(edge_info);
 
        /* we could flag new edges/verts too, is it useful? */
-       BMO_slot_buffer_from_flag(bm, op, "faceout", ELE_NEW, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, ELE_NEW);
 }
index 761222f..e36a863 100644 (file)
@@ -61,7 +61,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
        BMO_op_initf(bm, &dupeop, "dupe geom=%s", op, "geom");
        BMO_op_exec(bm, &dupeop);
        
-       BMO_slot_buffer_flag_enable(bm, &dupeop, "newout", ELE_NEW, BM_ALL);
+       BMO_slot_buffer_flag_enable(bm, &dupeop, "newout", BM_ALL, ELE_NEW);
 
        /* create old -> new mappin */
        i = 0;
@@ -120,7 +120,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
        BMO_op_finish(bm, &weldop);
        BMO_op_finish(bm, &dupeop);
 
-       BMO_slot_buffer_from_flag(bm, op, "newout", ELE_NEW, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, op, "newout", BM_ALL, ELE_NEW);
 
        BLI_array_free(vmap);
        BLI_array_free(emap);
index e4ddbb7..5b46b25 100644 (file)
@@ -268,12 +268,12 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
                        BMO_op_exec(bm, &bmop);
                        BMO_op_finish(bm, &prevop);
 
-                       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
+                       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_VERT, VERT_MARK);
                }
                else {
                        BMO_op_initf(bm, &bmop, "extrude_edge_only edges=%fe", EDGE_ORIG);
                        BMO_op_exec(bm, &bmop);
-                       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
+                       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_VERT, VERT_MARK);
                }
 
                BMO_op_callf(bm, "translate vec=%v verts=%s", vec, &bmop, "geomout");
@@ -283,7 +283,7 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
        if (a)
                BMO_op_finish(bm, &bmop);
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
@@ -339,7 +339,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
                        BMO_op_exec(bm, &bmop);
                }
 
-               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
+               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_VERT, VERT_MARK);
                BMO_op_callf(bm, "rotate cent=%v mat=%m3 verts=%s", vec, cmat, &bmop, "geomout");
                
                prevop = bmop;
@@ -372,7 +372,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
@@ -427,8 +427,8 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
                             "esubd edges=%fe smooth=%f numcuts=%i gridfill=%b beauty=%i",
                             EDGE_MARK, dia, 1, TRUE, B_SPHERE);
                BMO_op_exec(bm, &bmop);
-               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
-               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", EDGE_MARK, BM_EDGE);
+               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_VERT, VERT_MARK);
+               BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_EDGE, EDGE_MARK);
                BMO_op_finish(bm, &bmop);
        }
 
@@ -439,7 +439,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 void bmo_create_monkey_exec(BMesh *bm, BMOperator *op)
@@ -486,7 +486,7 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op)
 
        MEM_freeN(tv);
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 
@@ -558,7 +558,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
                BMO_op_callf(bm, "dissolve_faces faces=%ff", FACE_NEW);
        }
        
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
@@ -654,7 +654,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
        BM_face_create_quad_tri(bm, v1, v2, firstv2, firstv1, NULL, FALSE);
 
        BMO_op_callf(bm, "removedoubles verts=%fv dist=%f", VERT_MARK, 0.000001);
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 void bmo_create_cube_exec(BMesh *bm, BMOperator *op)
@@ -732,5 +732,5 @@ void bmo_create_cube_exec(BMesh *bm, BMOperator *op)
        BM_face_create_quad_tri(bm, v1, v2, v3, v4, NULL, FALSE);
        BM_face_create_quad_tri(bm, v8, v7, v6, v5, NULL, FALSE);
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
index 8d657e7..a97ed6d 100644 (file)
@@ -368,7 +368,7 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op)
        BMO_op_callf(bm, "collapse_uvs edges=%s", op, "edges");
        BMO_op_init(bm, &weldop, "weldverts");
 
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
 
        BMW_init(&walker, bm, BMW_SHELL,
                 BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP,
@@ -427,7 +427,7 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer)
        /* clear all short flags */
        BMO_mesh_flag_disable_all(bm, op, BM_ALL, (1 << 16) - 1);
 
-       BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK);
 
        BMW_init(&walker, bm, BMW_LOOPDATA_ISLAND,
                 BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP,
@@ -504,7 +504,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c
 
        /* Flag keepverts */
        if (keepvert) {
-               BMO_slot_buffer_flag_enable(bm, op, "keepverts", VERT_KEEP, BM_VERT);
+               BMO_slot_buffer_flag_enable(bm, op, "keepverts", BM_VERT, VERT_KEEP);
        }
 
        len = BLI_array_count(verts);
@@ -571,7 +571,7 @@ void bmo_automerge_exec(BMesh *bm, BMOperator *op)
        /* The "verts" input sent to this op is the set of verts that
         * can be merged away into any other verts. Mark all other verts
         * as VERT_KEEP. */
-       BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_IN, BM_VERT);
+       BMO_slot_buffer_flag_enable(bm, op, "verts", BM_VERT, VERT_IN);
        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 24f9c1e..9b39ca8 100644 (file)
@@ -685,7 +685,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        int beauty, cornertype, singleedge, gridfill;
        int skey, seed, i, j, matched, a, b, numcuts, totesel;
        
-       BMO_slot_buffer_flag_enable(bmesh, op, "edges", SUBD_SPLIT, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bmesh, op, "edges", BM_EDGE, SUBD_SPLIT);
        
        numcuts = BMO_slot_int_get(op, "numcuts");
        seed = BMO_slot_int_get(op, "seed");
@@ -740,7 +740,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        }
 
        /* first go through and tag edge */
-       BMO_slot_buffer_from_flag(bmesh, op, "edges", SUBD_SPLIT, BM_EDGE);
+       BMO_slot_buffer_from_flag(bmesh, op, "edges", BM_EDGE, SUBD_SPLIT);
 
        params.numcuts = numcuts;
        params.op = op;
@@ -754,10 +754,10 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        params.off[2] = (float)BLI_drand() * 200.0f;
        
        BMO_slot_map_to_flag(bmesh, op, "custompatterns",
-                            FACE_CUSTOMFILL, BM_FACE);
+                            BM_FACE, FACE_CUSTOMFILL);
 
        BMO_slot_map_to_flag(bmesh, op, "edgepercents",
-                            EDGE_PERCENT, BM_EDGE);
+                            BM_EDGE, EDGE_PERCENT);
 
        for (face = BM_iter_new(&fiter, bmesh, BM_FACES_OF_MESH, NULL);
             face;
@@ -1005,10 +1005,10 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op)
        BLI_array_free(splits);
        BLI_array_free(loops);
 
-       BMO_slot_buffer_from_flag(bmesh, op, "outinner", ELE_INNER, BM_ALL);
-       BMO_slot_buffer_from_flag(bmesh, op, "outsplit", ELE_SPLIT, BM_ALL);
+       BMO_slot_buffer_from_flag(bmesh, op, "outinner", BM_ALL, ELE_INNER);
+       BMO_slot_buffer_from_flag(bmesh, op, "outsplit", BM_ALL, ELE_SPLIT);
        
-       BMO_slot_buffer_from_flag(bmesh, op, "geomout", ELE_INNER|ELE_SPLIT|SUBD_SPLIT, BM_ALL);
+       BMO_slot_buffer_from_flag(bmesh, op, "geomout", BM_ALL, ELE_INNER|ELE_SPLIT|SUBD_SPLIT);
 }
 
 /* editmesh-emulating functio */
@@ -1096,7 +1096,7 @@ void bmo_edgebisect_exec(BMesh *bm, BMOperator *op)
                bm_subdivide_multicut(bm, e, &params, e->v1, e->v2);
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "outsplit", ELE_SPLIT, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, op, "outsplit", BM_ALL, ELE_SPLIT);
 
        BM_data_layer_free_n(bm, &bm->vdata, CD_SHAPEKEY, skey);
 }
index 42e4349..679efdc 100644 (file)
@@ -72,8 +72,8 @@ void bmo_triangulate_exec(BMesh *bm, BMOperator *op)
                }
        }
        
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", EDGE_NEW, BM_EDGE);
-       BMO_slot_buffer_from_flag(bm, op, "faceout", FACE_NEW, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_NEW);
+       BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_NEW);
        
        BLI_array_free(projectverts);
        BLI_array_free(newfaces);
@@ -87,7 +87,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
        BMEdge *e;
        int stop = 0;
        
-       BMO_slot_buffer_flag_enable(bm, op, "constrain_edges", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, op, "constrain_edges", BM_EDGE, EDGE_MARK);
        
        BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
                if (f->len == 3) {
@@ -152,7 +152,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
                }
        }
        
-       BMO_slot_buffer_from_flag(bm, op, "geomout", ELE_NEW, BM_EDGE|BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW);
 }
 
 void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
@@ -213,8 +213,8 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
        /* clean up fill */
        BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", ELE_NEW, EDGE_MARK);
        BMO_op_exec(bm, &bmop);
-       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", ELE_NEW, BM_FACE|BM_EDGE);
+       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE|BM_EDGE, ELE_NEW);
        BMO_op_finish(bm, &bmop);
        
-       BMO_slot_buffer_from_flag(bm, op, "geomout", ELE_NEW, BM_EDGE|BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW);
 }
index 78b4714..9de78ff 100644 (file)
@@ -49,7 +49,7 @@ void bmo_makevert_exec(BMesh *bm, BMOperator *op)
        BMO_slot_vec_get(op, "co", vec);
 
        BMO_elem_flag_enable(bm, BM_vert_create(bm, vec, NULL), 1);
-       BMO_slot_buffer_from_flag(bm, op, "newvertout", 1, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "newvertout", BM_VERT, 1);
 }
 
 void bmo_transform_exec(BMesh *bm, BMOperator *op)
@@ -163,7 +163,7 @@ void bmo_edgerotate_exec(BMesh *bm, BMOperator *op)
                }
        }
 
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", EDGE_OUT, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT);
 
 #undef EDGE_OUT
 #undef FACE_TAINT
@@ -259,14 +259,14 @@ void bmo_regionextend_exec(BMesh *bm, BMOperator *op)
        int use_faces = BMO_slot_bool_get(op, "use_faces");
        int constrict = BMO_slot_bool_get(op, "constrict");
 
-       BMO_slot_buffer_flag_enable(bm, op, "geom", SEL_ORIG, BM_ALL);
+       BMO_slot_buffer_flag_enable(bm, op, "geom", BM_ALL, SEL_ORIG);
 
        if (constrict)
                bmo_regionextend_constrict(bm, op, use_faces);
        else
                bmo_regionextend_extend(bm, op, use_faces);
 
-       BMO_slot_buffer_from_flag(bm, op, "geomout", SEL_FLAG, BM_ALL);
+       BMO_slot_buffer_from_flag(bm, op, "geomout", BM_ALL, SEL_FLAG);
 }
 
 /********* righthand faces implementation ****** */
@@ -310,7 +310,7 @@ void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op)
        startf = NULL;
        maxx = -1.0e10;
        
-       BMO_slot_buffer_flag_enable(bm, op, "faces", FACE_FLAG, BM_FACE);
+       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) {
@@ -686,7 +686,7 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op)
        MEM_freeN(indices);
 
        /* transfer all marked faces to the output slot */
-       BMO_slot_buffer_from_flag(bm, op, "faceout", FACE_MARK, BM_FACE);
+       BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_MARK);
 }
 
 /**************************************************************************** *
@@ -883,7 +883,7 @@ void bmo_similaredges_exec(BMesh *bm, BMOperator *op)
        MEM_freeN(indices);
 
        /* transfer all marked edges to the output slot */
-       BMO_slot_buffer_from_flag(bm, op, "edgeout", EDGE_MARK, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_MARK);
 }
 
 /**************************************************************************** *
@@ -999,7 +999,7 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op)
        MEM_freeN(indices);
        MEM_freeN(v_ext);
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
 
 /**************************************************************************** *
@@ -1327,5 +1327,5 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op)
        BLI_heap_free(h, NULL);
        MEM_freeN(vert_list);
 
-       BMO_slot_buffer_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT);
+       BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK);
 }
index 5b72371..7a370cb 100644 (file)
@@ -712,7 +712,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        /* select the output */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -753,7 +753,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        /* select the output */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ALL, BM_ELEM_SELECT, TRUE);
        EDBM_selectmode_flush(em);
 
        /* finish the operator */
@@ -796,7 +796,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        /* select the output */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -1542,7 +1542,7 @@ static void EDBM_strip_selections(BMEditMesh *em)
        }
 }
 
-/* when switching select mode, makes sure selection is consistant for editing */
+/* when switching select mode, makes sure selection is consistent for editing */
 /* also for paranoia checks to make sure edge or face mode works */
 void EDBM_selectmode_set(BMEditMesh *em)
 {
index 57819fc..d00efdc 100644 (file)
@@ -209,7 +209,7 @@ static short EDBM_Extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        BMO_op_exec(em->bm, &bmop);
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_VERT|BM_EDGE, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT|BM_EDGE, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return 0;
@@ -226,10 +226,10 @@ static short EDBM_Extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char
        EDBM_InitOpf(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag);
 
        /* deselect original verts */
-       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_ELEM_SELECT, BM_VERT, TRUE);
+       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_VERT, BM_ELEM_SELECT, TRUE);
 
        BMO_op_exec(em->bm, &bmop);
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_VERT, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_VERT, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return 0;
@@ -250,7 +250,7 @@ static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag,
        BMElem *ele;
        
        BMO_op_init(bm, &extop, "extrude_face_region");
-       BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", hflag, BM_VERT|BM_EDGE|BM_FACE);
+       BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", BM_VERT|BM_EDGE|BM_FACE, hflag);
 
        /* If a mirror modifier with clipping is on, we need to adjust some 
         * of the cases above to handle edges on the line of symmetry.
@@ -1036,7 +1036,7 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        
        BMO_op_exec(em->bm, &bmop);
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ELEM_SELECT, BM_FACE, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
@@ -1267,7 +1267,7 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
        BMO_op_exec(em->bm, &bmop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
@@ -1382,12 +1382,12 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
 
        /* avoids leaving old verts selected which can be a problem running multiple times,
         * since this means the edges become selected around the face which then attempt to rotate */
-       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edges", BM_ELEM_SELECT, BM_EDGE, TRUE);
+       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edges", BM_EDGE, BM_ELEM_SELECT, TRUE);
 
        BMO_op_exec(em->bm, &bmop);
        /* edges may rotate into hidden vertices, if this does _not_ run we get an ilogical state */
-       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edgeout", BM_ELEM_HIDDEN, BM_EDGE, TRUE);
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_ELEM_SELECT, BM_EDGE, TRUE);
+       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_HIDDEN, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_SELECT, TRUE);
        EDBM_selectmode_flush(em);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -2271,7 +2271,7 @@ static int select_vertex_path_exec(bContext *C, wmOperator *op)
        /* EDBM_flag_disable_all(em, BM_ELEM_SELECT); */
 
        /* select the output */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
@@ -2848,13 +2848,13 @@ static int solidify_exec(bContext *C, wmOperator *op)
        /* deselect only the faces in the region to be solidified (leave wire
         * edges and loose verts selected, as there will be no corresponding
         * geometry selected below) */
-       BMO_slot_buffer_hflag_disable(bm, &bmop, "geom", BM_ELEM_SELECT, BM_FACE, TRUE);
+       BMO_slot_buffer_hflag_disable(bm, &bmop, "geom", BM_FACE, BM_ELEM_SELECT, TRUE);
 
        /* run the solidify operator */
        BMO_op_exec(bm, &bmop);
 
        /* select the newly generated faces */
-       BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_ELEM_SELECT, BM_FACE, TRUE);
+       BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
@@ -3165,7 +3165,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
                }
        }
        
-       BMO_slot_buffer_from_flag(bm, &bmop, "edges", 1, BM_EDGE);
+       BMO_slot_buffer_from_flag(bm, &bmop, "edges", BM_EDGE, 1);
 
        if (mode == KNIFE_MIDPOINT) numcuts = 1;
        BMO_slot_int_set(&bmop, "numcuts", numcuts);
@@ -3425,7 +3425,7 @@ static int fill_mesh_exec(bContext *C, wmOperator *op)
        BMO_op_exec(em->bm, &bmop);
        
        /* select new geometry */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_FACE|BM_EDGE, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE|BM_EDGE, BM_ELEM_SELECT, TRUE);
        
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
@@ -3612,7 +3612,7 @@ static int split_mesh_exec(bContext *C, wmOperator *op)
        EDBM_InitOpf(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE);
        BMO_op_exec(em->bm, &bmop);
        BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT);
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, TRUE);
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
@@ -3675,7 +3675,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
        }
        BMO_op_exec(bm, &spinop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
-       BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
        if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
@@ -3801,7 +3801,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
        }
        BMO_op_exec(bm, &spinop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
-       BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
        if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
@@ -4590,7 +4590,7 @@ static int mesh_inset_exec(bContext *C, wmOperator *op)
        /* deselect original verts */
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ELEM_SELECT, BM_FACE, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
        if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
index ced8786..256a6b4 100644 (file)
@@ -212,7 +212,7 @@ int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot
 
        BM_mesh_elem_flag_disable_all(em->bm, BM_VERT|BM_EDGE|BM_FACE, BM_ELEM_SELECT);
 
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ELEM_SELECT, BM_ALL, TRUE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ALL, BM_ELEM_SELECT, TRUE);
 
        va_end(list);
        return EDBM_FinishOp(em, &bmop, op, TRUE);
@@ -422,7 +422,7 @@ void EDBM_select_more(BMEditMesh *em)
                     BM_ELEM_SELECT, FALSE, use_faces);
        BMO_op_exec(em->bm, &bmop);
        /* don't flush selection in edge/vertex mode  */
-       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
+       BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, use_faces ? TRUE : FALSE);
        BMO_op_finish(em->bm, &bmop);
 
        EDBM_select_flush(em);
@@ -438,7 +438,7 @@ void EDBM_select_less(BMEditMesh *em)
                     BM_ELEM_SELECT, TRUE, use_faces);
        BMO_op_exec(em->bm, &bmop);
        /* don't flush selection in edge/vertex mode  */
-       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
+       BMO_slot_buffer_hflag_disable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, use_faces ? TRUE : FALSE);
        BMO_op_finish(em->bm, &bmop);
 
        EDBM_selectmode_flush(em);
index 1866b88..6bfd4d2 100644 (file)
@@ -1616,7 +1616,7 @@ static void remerge_faces(knifetool_opdata *kcd)
        BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", FACE_NEW, BOUNDARY);
 
        BMO_op_exec(bm, &bmop);
-       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", FACE_NEW, BM_FACE);
+       BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE, FACE_NEW);
 
        BMO_op_finish(bm, &bmop);