Mesh: Avoid unnecessary normal calculation and dirty tags

This is mostly a cleanup to avoid hardcoding the eager calculation of
normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals`
and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh
is newly created and already has dirty normals anyway. This reduces
boilerplate code and makes the "dirty by default" state more clear.
Any regressions from this commit should be easy to fix, though the
lazy calculation is solid enough that none are expected.
This commit is contained in:
2022-04-19 17:08:02 -05:00
parent 9ec94c3882
commit 6a3c3c77b3
56 changed files with 28 additions and 120 deletions

View File

@@ -530,8 +530,6 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
MEM_SAFE_FREE(vert_part_index);
MEM_SAFE_FREE(vert_part_value);
BKE_mesh_normals_tag_dirty(result);
return result;
}