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>2012-10-23 10:37:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-23 10:37:58 +0400
commit13940cc78ece7b592a323123f31669034d73a833 (patch)
tree5572b9f14d9eb35b14dac9c8346115da07e44a36 /source/blender/bmesh
parenta82af0d220835970f83c63ade5e1b2309a993ec5 (diff)
fix for issues in new decimator
- when an edge exists across a quad, dont attempt to triangulate it. (such a case isn't so common anyway) - silly mistake when checking if anything needed to be done in the modifier, percent was being checked for 1.0 even when not used.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_decimate_collapse.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/bmesh/intern/bmesh_decimate_collapse.c b/source/blender/bmesh/intern/bmesh_decimate_collapse.c
index 8f275f6f3d3..5935a844988 100644
--- a/source/blender/bmesh/intern/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/intern/bmesh_decimate_collapse.c
@@ -231,12 +231,6 @@ static void bm_decim_build_edge_cost(BMesh *bm,
static int bm_decim_triangulate_begin(BMesh *bm)
{
-#ifdef USE_SAFETY_CHECKS
- const int check_double_edges = TRUE;
-#else
- const int check_double_edges = FALSE;
-#endif
-
BMIter iter;
BMFace *f;
// int has_quad; // could optimize this a little
@@ -285,6 +279,9 @@ static int bm_decim_triangulate_begin(BMesh *bm)
l_b = f_l[3];
}
+#ifdef USE_SAFETY_CHECKS
+ if (BM_edge_exists(l_a->v, l_b->v) == FALSE)
+#endif
{
BMFace *f_new;
BMLoop *l_new;
@@ -293,7 +290,7 @@ static int bm_decim_triangulate_begin(BMesh *bm)
* - if there is a quad that has a free standing edge joining it along
* where we want to split the face, there isnt a good way we can handle this.
* currently that edge will get removed when joining the tris back into a quad. */
- f_new = BM_face_split(bm, f, l_a->v, l_b->v, &l_new, NULL, check_double_edges);
+ f_new = BM_face_split(bm, f, l_a->v, l_b->v, &l_new, NULL, FALSE);
if (f_new) {
/* the value of this doesn't matter, only that the 2 loops match and have unique values */