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:
authorCampbell Barton <ideasman42@gmail.com>2015-11-25 03:28:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-25 03:28:25 +0300
commit69cdddd4cf3ebe5987477399effabff892233608 (patch)
treea266433a580d0dd2938c88824c27319fbf00c58d /source/blender/bmesh/intern/bmesh_polygon.c
parente8b3a14dfb0113a7030dfb1a8d96f8b759947678 (diff)
Fix error in recent check for duplicate tris
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_polygon.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 1b1b1332b5d..af0331d7771 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -940,14 +940,10 @@ void BM_face_triangulate(
if (l_new->radial_next != l_new) {
BMLoop *l_iter = l_new->radial_next;
do {
- if (UNLIKELY(l_new->prev->v == l_iter->prev->v)) {
- if (UNLIKELY(i == last_tri)) {
- /* Because we swap last f_new with f at the end... */
- BLI_linklist_prepend(r_faces_double, f);
- }
- else {
- BLI_linklist_prepend(r_faces_double, f_new);
- }
+ if (UNLIKELY((l_iter->f->len == 3) && (l_new->prev->v == l_iter->prev->v))) {
+ /* Check the last tri because we swap last f_new with f at the end... */
+ BLI_linklist_prepend(r_faces_double, (i != last_tri) ? f_new : f);
+ break;
}
} while ((l_iter = l_iter->radial_next) != l_new);
}