diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-30 00:49:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-30 00:49:40 +0400 |
commit | f02f491ed04b3427840c375de3fd62c9de59cd84 (patch) | |
tree | ea04d196ecfb44ca6ab38f21d658b0b896de9c46 /source/blender/bmesh/tools/bmesh_triangulate.c | |
parent | e9678e74b071b5edd1fac233ac6dac5df821242f (diff) |
correction to r54188, also don't attempt to triangulate triangles.
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_triangulate.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_triangulate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c index 9948a15ea56..4ab5383f0b6 100644 --- a/source/blender/bmesh/tools/bmesh_triangulate.c +++ b/source/blender/bmesh/tools/bmesh_triangulate.c @@ -42,13 +42,17 @@ void BM_mesh_triangulate(BMesh *bm, const bool use_beauty, const bool tag_only) if (tag_only == false) { BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) { - BM_face_triangulate(bm, face, NULL, use_beauty, false); + if (face->len > 3) { + BM_face_triangulate(bm, face, NULL, use_beauty, false); + } } } else { BM_ITER_MESH (face, &iter, bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(face, BM_ELEM_TAG)) { - BM_face_triangulate(bm, face, NULL, use_beauty, true); + if (face->len > 3) { + BM_face_triangulate(bm, face, NULL, use_beauty, true); + } } } } |