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 20:21:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-23 20:21:55 +0400
commitfec81d9b56075f46f6dde196ac85140872cff74e (patch)
tree6ee12fcc0b04ba3041f1b7e4d17281136375beb1 /source/blender/modifiers
parentc623ba5e4b2aa68a5717ba17500c14217bc417aa (diff)
use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index 75bea939107..8ac303f7bd5 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -106,6 +106,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
TIMEIT_START(decim);
#endif
+ /* set up front so we dont show invalid info in the UI */
+ dmd->face_count = dm->getNumPolys(dm);
+
switch (dmd->mode) {
case MOD_DECIM_MODE_COLLAPSE:
if (dmd->percent == 1.0f) {
@@ -124,7 +127,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
break;
}
- if (dm->getNumPolys(dm) <= 3) {
+ if (dmd->face_count <= 3) {
modifier_setError(md, "%s", TIP_("Modifier requires more than 3 input faces"));
return dm;
}