Fix #119544: Cage modifier deformation ignored in next modifier #119718

Merged
Hans Goudey merged 1 commits from HooglyBoogly/blender:fix-cage-no-copy-deformed into blender-v4.1-release 2024-03-20 23:16:11 +01:00

1 Commits

Author SHA1 Message Date
Hans Goudey 95f66e021a Fix #119544: Cage modifier deformation ignored in next modifier
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
When the edit mesh modifier stack first deforms the original edit mesh,
it creates deformed positions in a separate array. That array is copied
to the mesh's vertex positions if a subsequent modifier requires an
actual mesh rather than a mesh wrapper.

However, if that last deform modifier is the last "on cage" modifier
and the next modifier requires a real Mesh, we hit a code path that
didn't copy the temporary position array, since it was contained in the
separate `EditMeshData` struct that must be handled manually.

This was a regression in 91b27ab637. In the future I hope to
make this simpler by expanding the use of implicit sharing and making
the conversion from original BMesh to a Mesh more lazy / const correct.
2024-03-20 17:06:55 -04:00