tornavis/source/blender/modifiers
Sergey Sharybin 5f8f436dca Allow surface deform when target mesh increases number of vertices
A studio request actually.

The goal is to cover rather typical situation: when the mesh was
bound to target when the target was on subdivision level 0 but
uses a higher subdivision level for rendering. Example of such
setup is a facial hair bound to the face.

The idea of this change is to use first N vertices from the target
where N is the number of vertices on target during binding process.
While this sounds a bit arbitrary it covers typical modifier setup
used for rigging. Arguably, it is not more arbitrary than using a
number of polygons (which is how the modifier was checking for
changes on target before this change).

Quite straightforward change. A bit tricky part was to not break
the behavior since before this change we did not track number of
vertices sued when binding. The naming I'm also not super happy
with and just followed the existing one. Ideally the variables in
DNA will be prefixed with `target_` but doing it for an existing
field would mean compatibility change, and only using prefix for
the new field will introduce weird semantic where the polygons
count will be even more easily confused with a count on the
deforming mesh.

Differential Revision: https://developer.blender.org/D14830
2022-05-04 10:56:33 +02:00
..
intern Allow surface deform when target mesh increases number of vertices 2022-05-04 10:56:33 +02:00
CMakeLists.txt Cleanup: move Mesh Sequence Cache modifier to C++ 2022-03-23 15:34:13 +01:00
MOD_modifiertypes.h File headers: SPDX License migration 2022-02-11 09:14:36 +11:00
MOD_nodes.h Geometry Nodes: Don't create node tree when adding nodes modifier 2022-03-29 22:30:51 +02:00