diff options
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mods.c | 8 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 15 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.h | 4 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_walkers_impl.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_edgesplit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/bmesh_tools.c | 8 | ||||
-rw-r--r-- | source/blender/editors/mesh/loopcut.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 18 | ||||
-rw-r--r-- | source/blender/editors/util/crazyspace.c | 2 |
9 files changed, 39 insertions, 28 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 2558ac332df..3a4264575f0 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -720,8 +720,8 @@ int BM_edge_rotate_check(BMesh *UNUSED(bm), BMEdge *e) if (BM_edge_face_pair(e, &fa, &fb)) { BMLoop *la, *lb; - la = BM_face_other_vert_loop(e->v2, fa, e->v1); - lb = BM_face_other_vert_loop(e->v2, fb, e->v1); + la = BM_face_other_vert_loop(fa, e->v2, e->v1); + lb = BM_face_other_vert_loop(fb, e->v2, e->v1); /* check that the next vert in both faces isnt the same * (ie - the next edge doesnt share the same faces). @@ -731,8 +731,8 @@ int BM_edge_rotate_check(BMesh *UNUSED(bm), BMEdge *e) } /* mirror of the check above but in the opposite direction */ - la = BM_face_other_vert_loop(e->v1, fa, e->v2); - lb = BM_face_other_vert_loop(e->v1, fb, e->v2); + la = BM_face_other_vert_loop(fa, e->v1, e->v2); + lb = BM_face_other_vert_loop(fb, e->v1, e->v2); if (la->v == lb->v) { return FALSE; diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index ad7300e1c21..e78d577e067 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -67,7 +67,7 @@ int BM_vert_in_edge(BMEdge *e, BMVert *v) * * Finds the other loop that shares \a v with \a e loop in \a f. */ -BMLoop *BM_face_other_loop(BMEdge *e, BMFace *f, BMVert *v) +BMLoop *BM_face_other_loop(BMFace *f, BMEdge *e, BMVert *v) { BMLoop *l_iter; BMLoop *l_first; @@ -92,9 +92,20 @@ BMLoop *BM_face_other_loop(BMEdge *e, BMFace *f, BMVert *v) * The direction is defined by \a v_prev, where the return value is * the loop of what would be 'v_next' * + * + * +----------+ <-- return the face loop of this vertex. + * | | + * | f | + * | | + * +----------+ + * v_prev --> v + * ^^^^^^ ^ <-- These vert argumrnts define direction + * in the face to check. + * The faces loop direction is ignored. + * * \note \a v_prev and \a v _implicitly_ define an edge. */ -BMLoop *BM_face_other_vert_loop(BMVert *v_prev, BMFace *f, BMVert *v) +BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v) { BMIter liter; BMLoop *l_iter; diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h index 8c366d213d7..bf340e5c4ec 100644 --- a/source/blender/bmesh/intern/bmesh_queries.h +++ b/source/blender/bmesh/intern/bmesh_queries.h @@ -39,8 +39,8 @@ int BM_verts_in_edge(BMVert *v1, BMVert *v2, BMEdge *e); int BM_edge_face_pair(BMEdge *e, BMFace **r_fa, BMFace **r_fb); BMVert *BM_edge_other_vert(BMEdge *e, BMVert *v); -BMLoop *BM_face_other_loop(BMEdge *e, BMFace *f, BMVert *v); -BMLoop *BM_face_other_vert_loop(BMVert *v_prev, BMFace *f, BMVert *v); +BMLoop *BM_face_other_loop(BMFace *f, BMEdge *e, BMVert *v); +BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v); int BM_vert_edge_count(BMVert *v); int BM_edge_face_count(BMEdge *e); diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index ed029af13f0..4f2682a7da9 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -273,7 +273,7 @@ static void *bmw_IslandboundWalker_step(BMWalker *walker) f = l->f; while (1) { - l = BM_face_other_loop(e, f, v); + l = BM_face_other_loop(f, e, v); if (l != l->radial_next) { l = l->radial_next; f = l->f; @@ -474,7 +474,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker) while (1) { if (rlen != 1 && i == stopi) break; - l = BM_face_other_loop(l->e, l->f, v); + l = BM_face_other_loop(l->f, l->e, v); if (!l) break; diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index 5b5eb6b4cca..2b642a870cf 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -180,7 +180,7 @@ static void tag_out_edges(BMesh *bm, EdgeTag *etags, BMOperator *UNUSED(op)) startl = l; do { - l = BM_face_other_loop(l->e, l->f, v); + l = BM_face_other_loop(l->f, l->e, v); if (l == startl || BM_edge_face_count(l->e) != 2) { break; } @@ -317,7 +317,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) } l3 = l3->radial_next; - l3 = BM_face_other_loop(l3->e, l3->f, v); + l3 = BM_face_other_loop(l3->f, l3->e, v); } while (l3 != l2 && !BMO_elem_flag_test(bm, l3->e, EDGE_SEAM)); if (l3 == NULL || (BMO_elem_flag_test(bm, l3->e, EDGE_SEAM) && l3->e != l->e)) { @@ -333,7 +333,7 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) } l3 = l3->radial_next; - l3 = BM_face_other_loop(l3->e, l3->f, v); + l3 = BM_face_other_loop(l3->f, l3->e, v); et = &etags[BM_elem_index_get(l3->e)]; } while (l3 != l2 && !BMO_elem_flag_test(bm, l3->e, EDGE_SEAM)); diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index 487f954e4b3..037a64127d1 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -2398,12 +2398,12 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } else if (BM_edge_face_count(e2) == 2) { l = e2->l; - e = BM_face_other_loop(e2, l->f, v)->e; + e = BM_face_other_loop(l->f, e2, v)->e; BM_elem_flag_enable(e, BM_ELEM_TAG); BM_elem_select_set(bm, e, TRUE); l = e2->l->radial_next; - e = BM_face_other_loop(e2, l->f, v)->e; + e = BM_face_other_loop(l->f, e2, v)->e; BM_elem_flag_enable(e, BM_ELEM_TAG); BM_elem_select_set(bm, e, TRUE); } @@ -2423,9 +2423,9 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } if (i == 1 && e2->l) { - l = BM_face_other_loop(e2, e2->l->f, v); + l = BM_face_other_loop(e2->l->f, e2, v); l = l->radial_next; - l = BM_face_other_loop(l->e, l->f, v); + l = BM_face_other_loop(l->f, l->e, v); if (l) { BM_elem_select_set(bm, l->e, TRUE); diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 5f8c842f4f3..bbc495706ac 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -161,7 +161,7 @@ static void edgering_find_order(BMEditMesh *em, BMEdge *lasteed, BMEdge *eed, return; } - l2 = BM_face_other_loop(l->e, l->f, eed->v1); + l2 = BM_face_other_loop(l->f, l->e, eed->v1); rev = (l2 == l->prev); while (l2->v != lasteed->v1 && l2->v != lasteed->v2) { l2 = rev ? l2->prev : l2->next; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index a23a72262f5..8d2d4c462d2 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4310,7 +4310,7 @@ static BMLoop *get_next_loop(BMesh *UNUSED(bm), BMVert *v, BMLoop *l, firstl = l; do { - l = BM_face_other_loop(l->e, l->f, v); + l = BM_face_other_loop(l->f, l->e, v); if (l->radial_next == l) return NULL; @@ -4339,12 +4339,12 @@ static BMLoop *get_next_loop(BMesh *UNUSED(bm), BMVert *v, BMLoop *l, i += 1; } - if (BM_face_other_loop(l->e, l->f, v)->e == nexte) { + if (BM_face_other_loop(l->f, l->e, v)->e == nexte) { if (i) mul_v3_fl(a, 1.0f / (float)i); copy_v3_v3(vec, a); - return BM_face_other_loop(l->e, l->f, v); + return BM_face_other_loop(l->f, l->e, v); } l = l->radial_next; @@ -4477,11 +4477,11 @@ static int createSlideVerts(TransInfo *t) l1 = e->l; l2 = e->l->radial_next; - l = BM_face_other_loop(l1->e, l1->f, v); + l = BM_face_other_loop(l1->f, l1->e, v); sub_v3_v3v3(vec, BM_edge_other_vert(l->e, v)->co, v->co); if (l2 != l1) { - l = BM_face_other_loop(l2->e, l2->f, v); + l = BM_face_other_loop(l2->f, l2->e, v); sub_v3_v3v3(vec2, BM_edge_other_vert(l->e, v)->co, v->co); } else { l2 = NULL; @@ -4498,11 +4498,11 @@ static int createSlideVerts(TransInfo *t) if (l2) copy_v3_v3(sv->downvec, vec2); - l = BM_face_other_loop(l1->e, l1->f, v); + l = BM_face_other_loop(l1->f, l1->e, v); sv->up = BM_edge_other_vert(l->e, v); if (l2) { - l = BM_face_other_loop(l2->e, l2->f, v); + l = BM_face_other_loop(l2->f, l2->e, v); sv->down = BM_edge_other_vert(l->e, v); } @@ -4517,12 +4517,12 @@ static int createSlideVerts(TransInfo *t) sv->v = v; sv->origvert = *v; - l = BM_face_other_loop(l1->e, l1->f, v); + l = BM_face_other_loop(l1->f, l1->e, v); sv->up = BM_edge_other_vert(l->e, v); sub_v3_v3v3(sv->upvec, BM_edge_other_vert(l->e, v)->co, v->co); if (l2) { - l = BM_face_other_loop(l2->e, l2->f, v); + l = BM_face_other_loop(l2->f, l2->e, v); sv->down = BM_edge_other_vert(l->e, v); sub_v3_v3v3(sv->downvec, BM_edge_other_vert(l->e, v)->co, v->co); } diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index ee32c04a33c..8f9d32f0899 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -153,7 +153,7 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped continue; BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_VERT, v) { - BMLoop *l2 = BM_face_other_loop(l->e, l->f, v); + BMLoop *l2 = BM_face_other_loop(l->f, l->e, v); /* retrieve mapped coordinates */ v1= mappedcos + 3*BM_elem_index_get(l->v); |