From 7d02f986b6ca3cc3ebd7148ade74ebefcda9ebe2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jan 2012 12:50:23 +0000 Subject: [PATCH] remove re-tesselation after constrictive modifiers, this way we can avoid calculating tessfaces between multiple constructive modifiers to speedup the modifier stack. --- source/blender/modifiers/intern/MOD_mask.c | 4 +--- source/blender/modifiers/intern/MOD_mirror.c | 3 --- source/blender/modifiers/intern/MOD_screw.c | 5 +---- source/blender/modifiers/intern/MOD_solidify.c | 3 --- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index d7b43a60cd3..edef19fd032 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -399,10 +399,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, BLI_ghashIterator_free(hashIter); MEM_freeN(loop_mapping); - - /* BMESH_TODO - remove this and make modifiers create their own tessfaces on demand */ - CDDM_recalc_tesselation(result); + /* why is this needed? - campbell */ /* recalculate normals */ CDDM_calc_normals(result); diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 70c17e5d843..37800d3cce5 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -283,9 +283,6 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, MEM_freeN(vtargetmap); } - /* BMESH_TODO - remove this and make modifiers create their own tessfaces on demand */ - CDDM_recalc_tesselation(result); - return result; } diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index a8b6da67d19..8ff4080b99b 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -904,11 +904,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } #endif - - /* BMESH_TODO - remove this and make modifiers create their own tessfaces on demand */ - CDDM_recalc_tesselation(result); - if((ltmd->flag & MOD_SCREW_NORMAL_CALC) == 0) { + /* BMESH_TODO, we only need to get vertex normals here, this is way overkill */ CDDM_calc_normals(result); } diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 02fb2f81476..0248bf6682a 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -728,9 +728,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, /* BMESH_TODO, we only need to get vertex normals here, this is way overkill */ CDDM_calc_normals(result); } - else { - CDDM_recalc_tesselation(result); - } if (dm != odm) { dm->needsFree = 1;