diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-20 01:08:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-20 01:08:02 +0300 |
commit | 6a3c3c77b3ebdbcd44559bf91ea7d5cf3c5e4953 (patch) | |
tree | 619854e36d34502c1f81f0fd1ec7b0454fecc5b3 /source/blender/modifiers/intern/MOD_array.c | |
parent | 9ec94c3882a414dc60dd17abfa12838f94f63c24 (diff) |
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.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 758858c8b1d..c44a4e0b438 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -789,13 +789,6 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd, MEM_freeN(full_doubles_map); } - /* In case org dm has dirty normals, or we made some merging, mark normals as dirty in new mesh! - * TODO: we may need to set other dirty flags as well? - */ - if (use_recalc_normals) { - BKE_mesh_normals_tag_dirty(result); - } - if (vgroup_start_cap_remap) { MEM_freeN(vgroup_start_cap_remap); } |