diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_decimate.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_decimate.c | 5 |
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; } |