Cleanup: consistent arg order in bmesh
authorCampbell Barton <ideasman42@gmail.com>
Tue, 13 Jan 2015 13:16:36 +0000 (00:16 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 13 Jan 2015 14:36:03 +0000 (01:36 +1100)
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/intern/bmesh_queries.h
source/blender/bmesh/operators/bmo_hull.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/editors/transform/transform.c
source/blender/modifiers/intern/MOD_skin.c

index 308fa98843b21093f09ba03340fec7f6a5c07ef0..f56cf76c41de565d01ac1fa66e3c6e30db865d12 100644 (file)
@@ -193,7 +193,7 @@ bool BM_vert_pair_share_face_check(
                BMFace *f;
 
                BM_ITER_ELEM (f, &iter, v_a, BM_FACES_OF_VERT) {
-                       if (BM_vert_in_face(f, v_b)) {
+                       if (BM_vert_in_face(v_b, f)) {
                                return true;
                        }
                }
@@ -212,7 +212,7 @@ bool BM_vert_pair_share_face_check_cb(
 
                BM_ITER_ELEM (f, &iter, v_a, BM_FACES_OF_VERT) {
                        if (test_fn(f, user_data)) {
-                               if (BM_vert_in_face(f, v_b)) {
+                               if (BM_vert_in_face(v_b, f)) {
                                        return true;
                                }
                        }
@@ -375,7 +375,7 @@ BMLoop *BM_vert_find_first_loop(BMVert *v)
 /**
  * Returns true if the vertex is used in a given face.
  */
-bool BM_vert_in_face(BMFace *f, BMVert *v)
+bool BM_vert_in_face(BMVert *v, BMFace *f)
 {
        BMLoop *l_iter, *l_first;
 
@@ -403,7 +403,7 @@ bool BM_vert_in_face(BMFace *f, BMVert *v)
  * Compares the number of vertices in an array
  * that appear in a given face
  */
-int BM_verts_in_face_count(BMFace *f, BMVert **varr, int len)
+int BM_verts_in_face_count(BMVert **varr, int len, BMFace *f)
 {
        BMLoop *l_iter, *l_first;
 
@@ -447,7 +447,7 @@ int BM_verts_in_face_count(BMFace *f, BMVert **varr, int len)
 /**
  * Return true if all verts are in the face.
  */
-bool BM_verts_in_face(BMFace *f, BMVert **varr, int len)
+bool BM_verts_in_face(BMVert **varr, int len, BMFace *f)
 {
        BMLoop *l_iter, *l_first;
 
@@ -1602,7 +1602,7 @@ bool BM_face_exists(BMVert **varr, int len, BMFace **r_existface)
 #if 0
        BM_ITER_ELEM (f, &viter, v_search, BM_FACES_OF_VERT) {
                if (f->len == len) {
-                       if (BM_verts_in_face(f, varr, len)) {
+                       if (BM_verts_in_face(varr, len, f)) {
                                if (r_existface) {
                                        *r_existface = f;
                                }
@@ -1860,7 +1860,7 @@ bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap)
        for (i = 0; i < len; i++) {
                BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
                        if (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0) {
-                               if (len <= BM_verts_in_face_count(f, varr, len)) {
+                               if (len <= BM_verts_in_face_count(varr, len, f)) {
                                        if (r_f_overlap)
                                                *r_f_overlap = f;
 
index 9d598f865d04fe6a1b5997edde6abdd7c9aaf981..5e6d4b5154b34fab92bbfb066544eb105a0112a8 100644 (file)
@@ -27,9 +27,9 @@
  *  \ingroup bmesh
  */
 
-bool    BM_vert_in_face(BMFace *f, BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-int     BM_verts_in_face_count(BMFace *f, BMVert **varr, int len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-bool    BM_verts_in_face(BMFace *f, BMVert **varr, int len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+bool    BM_vert_in_face(BMVert *v, BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+int     BM_verts_in_face_count(BMVert **varr, int len, BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+bool    BM_verts_in_face(BMVert **varr, int len, BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 
 bool    BM_edge_in_face(BMEdge *e, BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 BLI_INLINE bool    BM_edge_in_loop(const BMEdge *e, const BMLoop *l) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
index 26a4dbe1e1debe09841f759ed33acdc05b834e40..fb99c9777d0f294387f081950e0c791994522567 100644 (file)
@@ -285,8 +285,8 @@ static void hull_remove_overlapping(BMesh *bm, GSet *hull_triangles,
                        
                        /* Note: can't change ghash while iterating, so mark
                         * with 'skip' flag rather than deleting triangles */
-                       if (BM_vert_in_face(f, t->v[1]) &&
-                           BM_vert_in_face(f, t->v[2]) && f_on_hull)
+                       if (BM_vert_in_face(t->v[1], f) &&
+                           BM_vert_in_face(t->v[2], f) && f_on_hull)
                        {
                                t->skip = true;
                                BMO_elem_flag_disable(bm, f, HULL_FLAG_INTERIOR_ELE);
index 7b125186110657fb098c0a536e8918fea7fefd54..87311199f52df93d37f2c723223782177aea5b7d 100644 (file)
@@ -1082,7 +1082,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op)
                                        BMIter other_fiter;
                                        BM_ITER_ELEM (other_loop, &other_fiter, loops[a]->v, BM_LOOPS_OF_VERT) {
                                                if (other_loop->f != face) {
-                                                       if (BM_vert_in_face(other_loop->f, loops[b]->v)) {
+                                                       if (BM_vert_in_face(loops[b]->v, other_loop->f)) {
                                                                /* we assume that these verts are not making an edge in the face */
                                                                BLI_assert(other_loop->prev->v != loops[a]->v);
                                                                BLI_assert(other_loop->next->v != loops[a]->v);
index 3aec3d5c9750a251c6aba53536810cc7f720f3d9..b727b96c8cce92425c5b107d77c172e6342d0bcd 100644 (file)
@@ -5857,12 +5857,12 @@ void projectEdgeSlideData(TransInfo *t, bool is_final)
                                        l_ed_sel = l_ed_sel->prev;
 
                                if (sld->perc < 0.0f) {
-                                       if (BM_vert_in_face(l_ed_sel->radial_next->f, sv->v_b)) {
+                                       if (BM_vert_in_face(sv->v_b, l_ed_sel->radial_next->f)) {
                                                f_copy_flip = BLI_ghash_lookup(sld->origfaces, l_ed_sel->radial_next->f);
                                        }
                                }
                                else if (sld->perc > 0.0f) {
-                                       if (BM_vert_in_face(l_ed_sel->radial_next->f, sv->v_a)) {
+                                       if (BM_vert_in_face(sv->v_a, l_ed_sel->radial_next->f)) {
                                                f_copy_flip = BLI_ghash_lookup(sld->origfaces, l_ed_sel->radial_next->f);
                                        }
                                }
@@ -5922,18 +5922,18 @@ void projectEdgeSlideData(TransInfo *t, bool is_final)
 
                                        BMLoop *l_adj = NULL;
                                        if (sld->perc < 0.0f) {
-                                               if (BM_vert_in_face(e_sel->l->f, sv->v_b)) {
+                                               if (BM_vert_in_face(sv->v_b, e_sel->l->f)) {
                                                        l_adj = e_sel->l;
                                                }
-                                               else if (BM_vert_in_face(e_sel->l->radial_next->f, sv->v_b)) {
+                                               else if (BM_vert_in_face(sv->v_b, e_sel->l->radial_next->f)) {
                                                        l_adj = e_sel->l->radial_next;
                                                }
                                        }
                                        else if (sld->perc > 0.0f) {
-                                               if (BM_vert_in_face(e_sel->l->f, sv->v_a)) {
+                                               if (BM_vert_in_face(sv->v_a, e_sel->l->f)) {
                                                        l_adj = e_sel->l;
                                                }
-                                               else if (BM_vert_in_face(e_sel->l->radial_next->f, sv->v_a)) {
+                                               else if (BM_vert_in_face(sv->v_a, e_sel->l->radial_next->f)) {
                                                        l_adj = e_sel->l->radial_next;
                                                }
                                        }
index 64f10e5036ff3561517657fede18000c7fb37e17..2bde963029a58562630ed03bee4bb2b897e5d4f1 100644 (file)
@@ -1114,7 +1114,7 @@ static BMFace *collapse_face_corners(BMesh *bm, BMFace *f, int n,
                                        orig_verts[i] = NULL;
                                }
                                else if (orig_verts[i] &&
-                                        !BM_vert_in_face(vf, orig_verts[i]))
+                                        !BM_vert_in_face(orig_verts[i], vf))
                                {
                                        wrong_face = true;
                                        break;