Modifiers: Add wrapper functions with Mesh / DerivedMesh conversion
Makes the follow changes: - Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers. - Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary - Update the rest of Blender to be aware and make use of these new functions The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed. Reviewers: campbellbarton, sergey, mont29 Subscribers: sybren Tags: #bf_blender_2.8 Differential Revision: https://developer.blender.org/D3155
This commit is contained in:
@@ -137,12 +137,21 @@ ModifierTypeInfo modifierType_Lattice = {
|
||||
eModifierTypeFlag_AcceptsLattice |
|
||||
eModifierTypeFlag_SupportsEditmode,
|
||||
/* copyData */ copyData,
|
||||
/* deformVerts */ deformVerts,
|
||||
|
||||
/* deformVerts_DM */ deformVerts,
|
||||
/* deformMatrices_DM */ NULL,
|
||||
/* deformVertsEM_DM */ deformVertsEM,
|
||||
/* deformMatricesEM_DM*/NULL,
|
||||
/* applyModifier_DM */ NULL,
|
||||
/* applyModifierEM_DM */NULL,
|
||||
|
||||
/* deformVerts */ NULL,
|
||||
/* deformMatrices */ NULL,
|
||||
/* deformVertsEM */ deformVertsEM,
|
||||
/* deformVertsEM */ NULL,
|
||||
/* deformMatricesEM */ NULL,
|
||||
/* applyModifier */ NULL,
|
||||
/* applyModifierEM */ NULL,
|
||||
|
||||
/* initData */ initData,
|
||||
/* requiredDataMask */ requiredDataMask,
|
||||
/* freeData */ NULL,
|
||||
|
Reference in New Issue
Block a user