Blender Git Loki
Git Commits -> Revision 1ab6d5c
Revision 1ab6d5c by Alexander Gavrilov (master) July 16, 2021, 13:12 (GMT) |
Surface Deform: support sparse binding mode for improving performance. When a vertex group is used to limit the influence of the modifier to a subset of vertices, binding data for vertices with zero weight is not needed. This wastes memory, disk space and CPU cycles. If the vertex group contents is known to be final and constant, it is reasonable to optimize by only storing data group vertices. This has to be an option in case the group can change. Supporting this requires adding a vertex index field and spliting the vertex count into mesh and bind variants, but both happen to fit in available padding. The old numverts field is renamed to the new bound vertex count field to maintain the array length invariant. Versioning is used to initialize the other new fields. If a file with sparse binding is opened in an old blender version, it is corrupted into a non-sparse bind with vertex count mismatch, preventing the modifier from working until rebind. Differential Revision: https://developer.blender.org/D11924 |
Commit Details:
Full Hash: 1ab6d5c1dcbeebc0794999d358d483f0b6cac67f
Parent Commit: a770faa
Lines Changed: +121, -22
6 Modified Paths:
/source/blender/blenloader/intern/versioning_300.c (+19, -0) (Diff)
/source/blender/makesdna/DNA_modifier_defaults.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_modifier_types.h (+5, -7) (Diff)
/source/blender/makesdna/intern/dna_rename_defs.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_modifier.c (+9, -0) (Diff)
/source/blender/modifiers/intern/MOD_surfacedeform.c (+85, -14) (Diff)
/source/blender/makesdna/DNA_modifier_defaults.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_modifier_types.h (+5, -7) (Diff)
/source/blender/makesdna/intern/dna_rename_defs.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_modifier.c (+9, -0) (Diff)
/source/blender/modifiers/intern/MOD_surfacedeform.c (+85, -14) (Diff)