Fix #110021: Deform modifier binding can go wrong in certain stacks #110095

Merged
Philipp Oeser merged 5 commits from lichtwerk/blender:110021 into main 2023-07-17 09:31:54 +02:00

5 Commits

Author SHA1 Message Date
Philipp Oeser a808ae4363 simplify call 2023-07-15 14:27:07 +02:00
Philipp Oeser a80465e5bc dont use CD_MASK_DERIVEDMESH in BKE_object_handle_data_update()
would have a gig performance impact
2023-07-15 14:23:41 +02:00
Philipp Oeser ba17baf0f1 use `CD_MASK_DERIVEDMESH` for customdata masks
this is now used in both `BKE_object_handle_data_update` and
`object_force_modifier_update_for_bind`

>Retrieving the mesh for binding doesn't have to be that fast.

note again that in order to have this consistent, `CD_MASK_DERIVEDMESH`
is now used in `BKE_object_handle_data_update` (depsgraph update) as
well, not just in binding!
2023-07-15 14:07:24 +02:00
Philipp Oeser 3433961e05 Merge branch 'main' into 110021 2023-07-15 13:53:18 +02:00
Philipp Oeser f4fc03a07e Fix #110021: Deform modifier binding can go wrong in certain stacks.
This affected `Mesh Deform`, `Corrective Smooth` and `Laplacian Smooth`.

Exposed by 57ea827bfb (e5ec04d73c).

Evaluating the incoming mesh can be different in
`BKE_object_handle_data_update` as opposed to
`object_force_modifier_update_for_bind` due to different
`CustomData_MeshMasks` being used (the former uses the full set, the
later was still using `CD_MASK_BAREMESH`). But since moving many
relevant [to modifiers] data to attributes, this could lead to binding go
wrong (e.g. reporting a vertex count mismatch as reported in #110021
which was due to the fact that creases were not propagated and that
changed the output [also vertex count] of a subdivision modifier in the
stack).

Now use the same set of `CustomData_MeshMasks` in both places.

Also fixes #109626 afaict.

Should probably go into 3.6 LTS (maybe even 3.3 LTS).
2023-07-14 11:26:54 +02:00