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/modifiers/intern/MOD_decimate.c
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/modifiers/intern/MOD_decimate.c')
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index a9bc9cbf83a..cf409c27b2f 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -103,13 +103,28 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
float *vweights = NULL;
#ifdef USE_TIMEIT
- TIMEIT_START(decim);
+ TIMEIT_START(decim);
#endif
- if (dmd->percent == 1.0f) {
- return dm;
+ switch (dmd->mode) {
+ case MOD_DECIM_MODE_COLLAPSE:
+ if (dmd->percent == 1.0f) {
+ return dm;
+ }
+ break;
+ case MOD_DECIM_MODE_UNSUBDIV:
+ if (dmd->iter == 0) {
+ return dm;
+ }
+ break;
+ case MOD_DECIM_MODE_DISSOLVE:
+ if (dmd->angle == 0.0f) {
+ return dm;
+ }
+ break;
}
- else if (dm->getNumPolys(dm) <= 3) {
+
+ if (dm->getNumPolys(dm) <= 3) {
modifier_setError(md, "%s", TIP_("Modifier requires more than 3 input faces"));
return dm;
}