Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_polygon.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 7a625840891..a3aaea9e257 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -800,67 +800,67 @@ void BM_face_triangulate(BMesh *bm, BMFace *f,
BLI_assert((r_faces_new == NULL) == (r_faces_new_tot == NULL));
if (f->len == 4) {
- BMVert *v1, *v2;
+ BMLoop *l_v1, *l_v2;
l_first = BM_FACE_FIRST_LOOP(f);
switch (quad_method) {
case MOD_TRIANGULATE_QUAD_FIXED:
{
- v1 = l_first->v;
- v2 = l_first->next->next->v;
+ l_v1 = l_first;
+ l_v2 = l_first->next->next;
break;
}
case MOD_TRIANGULATE_QUAD_ALTERNATE:
{
- v1 = l_first->next->v;
- v2 = l_first->prev->v;
+ l_v1 = l_first->next;
+ l_v2 = l_first->prev;
break;
}
case MOD_TRIANGULATE_QUAD_SHORTEDGE:
{
- BMVert *v3, *v4;
+ BMLoop *l_v3, *l_v4;
float d1, d2;
- v1 = l_first->v;
- v2 = l_first->next->next->v;
- v3 = l_first->next->v;
- v4 = l_first->prev->v;
+ l_v1 = l_first;
+ l_v2 = l_first->next->next;
+ l_v3 = l_first->next;
+ l_v4 = l_first->prev;
- d1 = len_squared_v3v3(v1->co, v2->co);
- d2 = len_squared_v3v3(v3->co, v4->co);
+ d1 = len_squared_v3v3(l_v1->v->co, l_v2->v->co);
+ d2 = len_squared_v3v3(l_v3->v->co, l_v4->v->co);
if (d2 < d1) {
- v1 = v3;
- v2 = v4;
+ l_v1 = l_v3;
+ l_v2 = l_v4;
}
break;
}
case MOD_TRIANGULATE_QUAD_BEAUTY:
default:
{
- BMVert *v3, *v4;
+ BMLoop *l_v3, *l_v4;
float cost;
- v1 = l_first->next->v;
- v2 = l_first->next->next->v;
- v3 = l_first->prev->v;
- v4 = l_first->v;
+ l_v1 = l_first->next;
+ l_v2 = l_first->next->next;
+ l_v3 = l_first->prev;
+ l_v4 = l_first;
- cost = BM_verts_calc_rotate_beauty(v1, v2, v3, v4, 0, 0);
+ cost = BM_verts_calc_rotate_beauty(l_v1->v, l_v2->v, l_v3->v, l_v4->v, 0, 0);
if (cost < 0.0f) {
- v1 = v4;
- //v2 = v2;
+ l_v1 = l_v4;
+ //l_v2 = l_v2;
}
else {
- //v1 = v1;
- v2 = v3;
+ //l_v1 = l_v1;
+ l_v2 = l_v3;
}
break;
}
}
- f_new = BM_face_split(bm, f, v1, v2, &l_new, NULL, false);
+ f_new = BM_face_split(bm, f, l_v1, l_v2, &l_new, NULL, false);
copy_v3_v3(f_new->no, f->no);
if (use_tag) {