modifier stack: lazy initialize normals

many modifiers were calculating normals, when those normals were ignored by the next modifier.
now flag normals as dirty and recalculate for modifiers that set use `dependsOnNormals()` callback.

Quick test on mesh with 12 modifiers (mostly build type), calculated normals 6 times, now it only runs once - so this will give some speedup too.
This commit is contained in:
2013-05-30 17:36:43 +00:00
parent 1be2936298
commit 09e11ad6ef
23 changed files with 149 additions and 77 deletions

View File

@@ -485,7 +485,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
DM_ensure_tessface(result);
#endif
CDDM_calc_normals(result);
result->dirty |= DM_DIRTY_NORMALS;
return result;
}