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:
@@ -136,7 +136,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
|
||||
result = edgesplitModifier_do(emd, ob, derivedData);
|
||||
|
||||
if (result != derivedData)
|
||||
CDDM_calc_normals(result);
|
||||
result->dirty |= DM_DIRTY_NORMALS;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user