Cleanup: Clarify modifier depends_on_normals handling
commitb195014e05b9d92ee1f37ab23d41c0a44d063f13
authorHans Goudey <hans@blender.org>
Thu, 4 Apr 2024 20:46:41 +0000 (4 22:46 +0200)
committerHans Goudey <hooglyboogly@noreply.localhost>
Thu, 4 Apr 2024 20:46:41 +0000 (4 22:46 +0200)
treee6ca9fb6465347d357136ed6b1b3375a60fe8905
parent23265a2b6d16709ba401ec0c2aea8c43c4ff9f64
Cleanup: Clarify modifier depends_on_normals handling

Because normals are calcualted lazily for all cases "depends_on_normals"
except for BMesh original normals, this is mostly unnecessary. It's actually
probably not necessary at all, because in practice there is always a separate
positions array stored in `EditMeshData` during mesh edit mode modifier
evaluation, bringing us back to the lazy calculation. But anyway, removing
the usage for topology-changing modifiers and modifiers  which don't
accept BMesh as input anyway simplifies things.

Pull Request: https://projects.blender.org/blender/blender/pulls/120274
15 files changed:
source/blender/blenkernel/BKE_modifier.hh
source/blender/blenkernel/intern/DerivedMesh.cc
source/blender/blenkernel/intern/modifier.cc
source/blender/modifiers/intern/MOD_bevel.cc
source/blender/modifiers/intern/MOD_datatransfer.cc
source/blender/modifiers/intern/MOD_displace.cc
source/blender/modifiers/intern/MOD_multires.cc
source/blender/modifiers/intern/MOD_normal_edit.cc
source/blender/modifiers/intern/MOD_ocean.cc
source/blender/modifiers/intern/MOD_shrinkwrap.cc
source/blender/modifiers/intern/MOD_solidify.cc
source/blender/modifiers/intern/MOD_subsurf.cc
source/blender/modifiers/intern/MOD_wave.cc
source/blender/modifiers/intern/MOD_weighted_normal.cc
source/blender/modifiers/intern/MOD_wireframe.cc