diff options
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 14 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.h | 6 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_hull.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 12 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_skin.c | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index 308fa98843b..f56cf76c41d 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -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; diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h index 9d598f865d0..5e6d4b5154b 100644 --- a/source/blender/bmesh/intern/bmesh_queries.h +++ b/source/blender/bmesh/intern/bmesh_queries.h @@ -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(); diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c index 26a4dbe1e1d..fb99c9777d0 100644 --- a/source/blender/bmesh/operators/bmo_hull.c +++ b/source/blender/bmesh/operators/bmo_hull.c @@ -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); diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 7b125186110..87311199f52 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -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); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 3aec3d5c975..b727b96c8cc 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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; } } diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 64f10e5036f..2bde963029a 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -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; |