Modifiers: Add wrapper functions with Mesh / DerivedMesh conversion
authorMai Lavelle <mai.lavelle@gmail.com>
Wed, 18 Apr 2018 13:45:54 +0000 (15:45 +0200)
committerSybren A. Stüvel <sybren@stuvel.eu>
Tue, 1 May 2018 16:02:17 +0000 (18:02 +0200)
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

62 files changed:
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/crazyspace.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/multires.c
source/blender/editors/object/object_modifier.c
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_correctivesmooth.c
source/blender/modifiers/intern/MOD_curve.c
source/blender/modifiers/intern/MOD_datatransfer.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_laplaciandeform.c
source/blender/modifiers/intern/MOD_laplaciansmooth.c
source/blender/modifiers/intern/MOD_lattice.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshcache.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_meshsequencecache.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_multires.c
source/blender/modifiers/intern/MOD_none.c
source/blender/modifiers/intern/MOD_normal_edit.c
source/blender/modifiers/intern/MOD_ocean.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/modifiers/intern/MOD_remesh.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_shapekey.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_softbody.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_subsurf.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/modifiers/intern/MOD_surfacedeform.c
source/blender/modifiers/intern/MOD_triangulate.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_uvwarp.c
source/blender/modifiers/intern/MOD_warp.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/modifiers/intern/MOD_weightvgedit.c
source/blender/modifiers/intern/MOD_weightvgmix.c
source/blender/modifiers/intern/MOD_weightvgproximity.c
source/blender/modifiers/intern/MOD_wireframe.c

index c81c0f7c4c0f236c68c8a1cd2b0c996e4b441d6c..09614a8e63f26fefb21d263048fcb47c4f481e98 100644 (file)
@@ -35,6 +35,7 @@
 struct ID;
 struct Depsgraph;
 struct DerivedMesh;
+struct Mesh;
 struct Object;
 struct Scene;
 struct ViewLayer;
@@ -156,37 +157,38 @@ typedef struct ModifierTypeInfo {
         */
        void (*copyData)(struct ModifierData *md, struct ModifierData *target);
 
-       /********************* Deform modifier functions *********************/
+
+       /********************* Deform modifier functions *********************/ /* DEPRECATED */
 
        /* Only for deform types, should apply the deformation
         * to the given vertex array. If the deformer requires information from
         * the object it can obtain it from the derivedData argument if non-NULL,
         * and otherwise the ob argument.
         */
-       void (*deformVerts)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       void (*deformVerts_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                            struct Object *ob, struct DerivedMesh *derivedData,
                            float (*vertexCos)[3], int numVerts,
                            ModifierApplyFlag flag);
 
        /* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
-       void (*deformMatrices)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       void (*deformMatrices_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                               struct Object *ob, struct DerivedMesh *derivedData,
                               float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 
        /* Like deformVerts but called during editmode (for supporting modifiers)
         */
-       void (*deformVertsEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       void (*deformVertsEM_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                              struct Object *ob, struct BMEditMesh *editData,
                              struct DerivedMesh *derivedData,
                              float (*vertexCos)[3], int numVerts);
 
        /* Set deform matrix per vertex for crazyspace correction */
-       void (*deformMatricesEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       void (*deformMatricesEM_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                                 struct Object *ob, struct BMEditMesh *editData,
                                 struct DerivedMesh *derivedData,
                                 float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
 
-       /********************* Non-deform modifier functions *********************/
+       /********************* Non-deform modifier functions *********************/ /* DEPRECATED */
 
        /* For non-deform types: apply the modifier and return a derived
         * data object (type is dependent on object type).
@@ -207,7 +209,7 @@ typedef struct ModifierTypeInfo {
         * The modifier may reuse the derivedData argument (i.e. return it in
         * modified form), but must not release it.
         */
-       struct DerivedMesh *(*applyModifier)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct DerivedMesh *(*applyModifier_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                                             struct Object *ob, struct DerivedMesh *derivedData,
                                             ModifierApplyFlag flag);
 
@@ -218,11 +220,77 @@ typedef struct ModifierTypeInfo {
         * are expected from editmode objects. The same qualifications regarding
         * derivedData apply as for applyModifier.
         */
-       struct DerivedMesh *(*applyModifierEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct DerivedMesh *(*applyModifierEM_DM)(struct ModifierData *md, struct Depsgraph *depsgraph,
                                               struct Object *ob, struct BMEditMesh *editData,
                                               struct DerivedMesh *derivedData, ModifierApplyFlag flag);
 
 
+       /********************* Deform modifier functions *********************/
+
+       /* Only for deform types, should apply the deformation
+        * to the given vertex array. If the deformer requires information from
+        * the object it can obtain it from the mesh argument if non-NULL,
+        * and otherwise the ob argument.
+        */
+       void (*deformVerts)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                           struct Object *ob, struct Mesh *mesh,
+                           float (*vertexCos)[3], int numVerts,
+                           ModifierApplyFlag flag);
+
+       /* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
+       void (*deformMatrices)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                              struct Object *ob, struct Mesh *mesh,
+                              float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+       /* Like deformVerts but called during editmode (for supporting modifiers)
+        */
+       void (*deformVertsEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                             struct Object *ob, struct BMEditMesh *editData,
+                             struct Mesh *mesh,
+                             float (*vertexCos)[3], int numVerts);
+
+       /* Set deform matrix per vertex for crazyspace correction */
+       void (*deformMatricesEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                                struct Object *ob, struct BMEditMesh *editData,
+                                struct Mesh *mesh,
+                                float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+       /********************* Non-deform modifier functions *********************/
+
+       /* For non-deform types: apply the modifier and return a mesh object.
+        *
+        * The mesh argument should always be non-NULL; the modifier
+        * should read the object data from the mesh object instead of the
+        * actual object data. 
+        *
+        * The useRenderParams argument indicates if the modifier is being
+        * applied in the service of the renderer which may alter quality
+        * settings.
+        *
+        * The isFinalCalc parameter indicates if the modifier is being
+        * calculated for a final result or for something temporary
+        * (like orcos). This is a hack at the moment, it is meant so subsurf
+        * can know if it is safe to reuse its internal cache.
+        *
+        * The modifier may reuse the mesh argument (i.e. return it in
+        * modified form), but must not release it.
+        */
+       struct Mesh *(*applyModifier)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                                            struct Object *ob, struct Mesh *mesh,
+                                            ModifierApplyFlag flag);
+
+       /* Like applyModifier but called during editmode (for supporting
+        * modifiers).
+        * 
+        * The mesh object that is returned must support the operations that
+        * are expected from editmode objects. The same qualifications regarding
+        * mesh apply as for applyModifier.
+        */
+       struct Mesh *(*applyModifierEM)(struct ModifierData *md, struct Depsgraph *depsgraph,
+                                              struct Object *ob, struct BMEditMesh *editData,
+                                              struct Mesh *mesh, ModifierApplyFlag flag);
+
+
        /********************* Optional functions *********************/
 
        /* Initialize new instance data for this modifier type, this function
@@ -419,7 +487,7 @@ void        modifier_path_init(char *path, int path_maxlen, const char *name);
 const char *modifier_path_relbase(struct Object *ob);
 
 
-/* wrappers for modifier callbacks */
+/* wrappers for modifier callbacks that ensure valid normals */
 
 struct DerivedMesh *modwrap_applyModifier(
         ModifierData *md, struct Depsgraph *depsgraph,
@@ -443,5 +511,59 @@ void modwrap_deformVertsEM(
         struct BMEditMesh *em, struct DerivedMesh *dm,
         float (*vertexCos)[3], int numVerts);
 
+/* wrappers for modifier callbacks that accept Mesh and select the proper implementation
+ * depending on if the modifier has been ported to Mesh or is still using DerivedMesh
+ */
+
+void modifier_deformVerts(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh,
+       float (*vertexCos)[3], int numVerts,
+       ModifierApplyFlag flag);
+
+void modifier_deformMatrices(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+void modifier_deformVertsEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct Mesh *mesh,
+       float (*vertexCos)[3], int numVerts);
+
+void modifier_deformMatricesEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct Mesh *mesh,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+struct Mesh *modifier_applyModifier(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh, ModifierApplyFlag flag);
+
+struct Mesh *modifier_applyModifierEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData,
+       struct Mesh *mesh, ModifierApplyFlag flag);
+
+/* depricated variants of above that accept DerivedMesh */
+
+void modifier_deformVerts_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm,
+       float (*vertexCos)[3], int numVerts,
+       ModifierApplyFlag flag);
+
+void modifier_deformMatrices_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+void modifier_deformVertsEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct DerivedMesh *dm,
+       float (*vertexCos)[3], int numVerts);
+
+void modifier_deformMatricesEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct DerivedMesh *dm,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
+
+struct DerivedMesh *modifier_applyModifier_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm, ModifierApplyFlag flag);
+
+struct DerivedMesh *modifier_applyModifierEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData,
+       struct DerivedMesh *dm, ModifierApplyFlag flag);
+
 #endif
 
index 959c05d4a912a54f3afffc54a3f18ea09666f955..c2e9213663277418ceb7763b2949ee7e1ea52d9d 100644 (file)
@@ -2356,7 +2356,7 @@ static void editbmesh_calc_modifiers(
                                }
                        }
 
-                       if (mti->deformVertsEM)
+                       if (mti->deformVertsEM || mti->deformVertsEM_DM)
                                modwrap_deformVertsEM(md, depsgraph, ob, em, dm, deformedVerts, numVerts);
                        else
                                modwrap_deformVerts(md, depsgraph, ob, dm, deformedVerts, numVerts, 0);
@@ -2403,7 +2403,7 @@ static void editbmesh_calc_modifiers(
                                mask &= ~CD_MASK_ORCO;
                                DM_set_only_copy(orcodm, mask | CD_MASK_ORIGINDEX);
 
-                               if (mti->applyModifierEM) {
+                               if (mti->applyModifierEM || mti->applyModifierEM_DM) {
                                        ndm = modwrap_applyModifierEM(md, depsgraph, ob, em, orcodm, MOD_APPLY_ORCO);
                                }
                                else {
@@ -2431,7 +2431,7 @@ static void editbmesh_calc_modifiers(
                                }
                        }
 
-                       if (mti->applyModifierEM)
+                       if (mti->applyModifierEM || mti->applyModifierEM_DM)
                                ndm = modwrap_applyModifierEM(md, depsgraph, ob, em, dm, MOD_APPLY_USECACHE | MOD_APPLY_ALLOW_GPU);
                        else
                                ndm = modwrap_applyModifier(md, depsgraph, ob, dm, MOD_APPLY_USECACHE | MOD_APPLY_ALLOW_GPU);
index f5795444b7df6e608ebad037e04866906d5cfbc0..ad3322200325bd6ec7e9d17cd4da870daefc02a1 100644 (file)
@@ -276,7 +276,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(
                if (!editbmesh_modifier_is_enabled(scene, md, dm))
                        continue;
 
-               if (mti->type == eModifierTypeType_OnlyDeform && mti->deformMatricesEM) {
+               if (mti->type == eModifierTypeType_OnlyDeform && (mti->deformMatricesEM || mti->deformMatricesEM_DM)) {
                        if (!defmats) {
                                const int required_mode = eModifierMode_Realtime | eModifierMode_Editmode;
                                CustomDataMask data_mask = CD_MASK_BAREMESH;
@@ -292,8 +292,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(
                                        unit_m3(defmats[a]);
                        }
 
-                       mti->deformMatricesEM(md, depsgraph, ob, em, dm, deformedVerts, defmats,
-                                             numVerts);
+                       modifier_deformMatricesEM_DM_deprecated(md, depsgraph, ob, em, dm, deformedVerts, defmats, numVerts);
                }
                else
                        break;
@@ -350,7 +349,9 @@ int BKE_sculpt_get_first_deform_matrices(
                                        unit_m3(defmats[a]);
                        }
 
-                       if (mti->deformMatrices) mti->deformMatrices(md, depsgraph, ob, dm, deformedVerts, defmats, numVerts);
+                       if (mti->deformMatrices || mti->deformMatrices_DM) {
+                               modifier_deformMatrices_DM_deprecated(md, depsgraph, ob, dm, deformedVerts, defmats, numVerts);
+                       }
                        else break;
                }
        }
@@ -397,10 +398,10 @@ void BKE_crazyspace_build_sculpt(struct Depsgraph *depsgraph, Scene *scene, Obje
                        if (mti->type == eModifierTypeType_OnlyDeform) {
                                /* skip leading modifiers which have been already
                                 * handled in sculpt_get_first_deform_matrices */
-                               if (mti->deformMatrices && !deformed)
+                               if ((mti->deformMatrices || mti->deformMatrices_DM) && !deformed)
                                        continue;
 
-                               mti->deformVerts(md, depsgraph, ob, NULL, deformedVerts, me->totvert, 0);
+                               modifier_deformVerts_DM_deprecated(md, depsgraph, ob, NULL, deformedVerts, me->totvert, 0);
                                deformed = 1;
                        }
                }
index e74e540fab9fba3d1312a1dad6d3309d26dec34c..74825130b03cd9acc10567ab31022066da564c44 100644 (file)
@@ -860,7 +860,7 @@ static void curve_calc_modifiers_pre(
                                deformedVerts = BKE_curve_nurbs_vertexCos_get(nurb, &numVerts);
                        }
 
-                       mti->deformVerts(md, depsgraph, ob, NULL, deformedVerts, numVerts, app_flag);
+                       modifier_deformVerts_DM_deprecated(md, depsgraph, ob, NULL, deformedVerts, numVerts, app_flag);
 
                        if (md == pretessellatePoint)
                                break;
@@ -969,14 +969,14 @@ static void curve_calc_modifiers_post(
                                        dm->getVertCos(dm, vertCos);
                                }
 
-                               mti->deformVerts(md, depsgraph, ob, dm, vertCos, totvert, appf);
+                               modifier_deformVerts_DM_deprecated(md, depsgraph, ob, dm, vertCos, totvert, appf);
                        }
                        else {
                                if (!vertCos) {
                                        vertCos = displist_get_allverts(dispbase, &totvert);
                                }
 
-                               mti->deformVerts(md, depsgraph, ob, NULL, vertCos, totvert, appf);
+                               modifier_deformVerts_DM_deprecated(md, depsgraph, ob, NULL, vertCos, totvert, appf);
                        }
                }
                else {
index b9e6e0e8fa969ee22e62b7409d6717701436bd6d..570ad9c8980e5ec67cddabb70194179ca5d69366 100644 (file)
@@ -1053,7 +1053,7 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec
                if (mti->type != eModifierTypeType_OnlyDeform) continue;
 
                if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob, &numVerts);
-               mti->deformVerts(md, depsgraph, ob, NULL, vertexCos, numVerts, 0);
+               modifier_deformVerts_DM_deprecated(md, depsgraph, ob, NULL, vertexCos, numVerts, 0);
        }
 
        /* always displist to make this work like derivedmesh */
index c15ae9e4a7c0493f8cda2699c03f12f47b138052..8f372a8fa937a8fd293f0ac35377a846d3ce5c7b 100644 (file)
@@ -46,6 +46,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "DNA_armature_types.h"
+#include "DNA_mesh_types.h"
 #include "DNA_object_types.h"
 
 #include "BLI_utildefines.h"
 #include "BLT_translation.h"
 
 #include "BKE_appdir.h"
+#include "BKE_cdderivedmesh.h"
 #include "BKE_key.h"
 #include "BKE_library.h"
 #include "BKE_library_query.h"
+#include "BKE_mesh.h"
 #include "BKE_multires.h"
 #include "BKE_DerivedMesh.h"
 
@@ -681,7 +684,7 @@ bool modifiers_usesArmature(Object *ob, bArmature *arm)
 bool modifier_isCorrectableDeformed(ModifierData *md)
 {
        const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-       return (mti->deformMatricesEM != NULL);
+       return (mti->deformMatricesEM != NULL) || (mti->deformMatricesEM_DM != NULL);
 }
 
 bool modifiers_isCorrectableDeformed(struct Scene *scene, Object *ob)
@@ -796,7 +799,7 @@ struct DerivedMesh *modwrap_applyModifier(
        if (mti->dependsOnNormals && mti->dependsOnNormals(md)) {
                DM_ensure_normals(dm);
        }
-       return mti->applyModifier(md, depsgraph, ob, dm, flag);
+       return modifier_applyModifier_DM_deprecated(md, depsgraph, ob, dm, flag);
 }
 
 struct DerivedMesh *modwrap_applyModifierEM(
@@ -811,7 +814,7 @@ struct DerivedMesh *modwrap_applyModifierEM(
        if (mti->dependsOnNormals && mti->dependsOnNormals(md)) {
                DM_ensure_normals(dm);
        }
-       return mti->applyModifierEM(md, depsgraph, ob, em, dm, flag);
+       return modifier_applyModifierEM_DM_deprecated(md, depsgraph, ob, em, dm, flag);
 }
 
 void modwrap_deformVerts(
@@ -826,7 +829,7 @@ void modwrap_deformVerts(
        if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
                DM_ensure_normals(dm);
        }
-       mti->deformVerts(md, depsgraph, ob, dm, vertexCos, numVerts, flag);
+       modifier_deformVerts_DM_deprecated(md, depsgraph, ob, dm, vertexCos, numVerts, flag);
 }
 
 void modwrap_deformVertsEM(
@@ -840,6 +843,277 @@ void modwrap_deformVertsEM(
        if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
                DM_ensure_normals(dm);
        }
-       mti->deformVertsEM(md, depsgraph, ob, em, dm, vertexCos, numVerts);
+       modifier_deformVertsEM_DM_deprecated(md, depsgraph, ob, em, dm, vertexCos, numVerts);
 }
 /* end modifier callback wrappers */
+
+
+/* wrappers for modifier callbacks that accept Mesh and select the proper implementation
+ * depending on if the modifier has been ported to Mesh or is still using DerivedMesh
+ */
+
+void modifier_deformVerts(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh,
+       float (*vertexCos)[3], int numVerts,
+       ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformVerts) {
+               mti->deformVerts(md, depsgraph, ob, mesh, vertexCos, numVerts, flag);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               mti->deformVerts_DM(md, depsgraph, ob, dm, vertexCos, numVerts, flag);
+
+               dm->release(dm);
+       }
+}
+
+void modifier_deformMatrices(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformMatrices) {
+               mti->deformMatrices(md, depsgraph, ob, mesh, vertexCos, defMats, numVerts);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               mti->deformMatrices_DM(md, depsgraph, ob, dm, vertexCos, defMats, numVerts);
+
+               dm->release(dm);
+       }
+}
+
+void modifier_deformVertsEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct Mesh *mesh,
+       float (*vertexCos)[3], int numVerts)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformVertsEM) {
+               mti->deformVertsEM(md, depsgraph, ob, editData, mesh, vertexCos, numVerts);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               mti->deformVertsEM_DM(md, depsgraph, ob, editData, dm, vertexCos, numVerts);
+
+               dm->release(dm);
+       }
+}
+
+void modifier_deformMatricesEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct Mesh *mesh,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformMatricesEM) {
+               mti->deformMatricesEM(md, depsgraph, ob, editData, mesh, vertexCos, defMats, numVerts);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               mti->deformMatricesEM_DM(md, depsgraph, ob, editData, dm, vertexCos, defMats, numVerts);
+
+               dm->release(dm);
+       }
+}
+
+struct Mesh *modifier_applyModifier(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct Mesh *mesh, ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->applyModifier) {
+               return mti->applyModifier(md, depsgraph, ob, mesh, flag);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               DerivedMesh *ndm = mti->applyModifier_DM(md, depsgraph, ob, dm, flag);
+
+               if(ndm != dm) {
+                       dm->release(dm);
+               }
+
+               DM_to_mesh(ndm, mesh, ob, CD_MASK_EVERYTHING, true);
+
+               return mesh;
+       }
+}
+
+struct Mesh *modifier_applyModifierEM(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData,
+       struct Mesh *mesh, ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->applyModifierEM) {
+               return mti->applyModifierEM(md, depsgraph, ob, editData, mesh, flag);
+       }
+       else {
+               DerivedMesh *dm = CDDM_from_mesh(mesh);
+
+               DerivedMesh *ndm = mti->applyModifierEM_DM(md, depsgraph, ob, editData, dm, flag);
+
+               if(ndm != dm) {
+                       dm->release(dm);
+               }
+
+               DM_to_mesh(ndm, mesh, ob, CD_MASK_EVERYTHING, true);
+
+               return mesh;
+       }
+}
+
+/* depricated variants of above that accept DerivedMesh */
+
+void modifier_deformVerts_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm,
+       float (*vertexCos)[3], int numVerts,
+       ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformVerts_DM) {
+               mti->deformVerts_DM(md, depsgraph, ob, dm, vertexCos, numVerts, flag);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               mti->deformVerts(md, depsgraph, ob, &mesh, vertexCos, numVerts, flag);
+
+               BKE_mesh_free(&mesh);
+       }
+}
+
+void modifier_deformMatrices_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+{
+
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformMatrices_DM) {
+               mti->deformMatrices_DM(md, depsgraph, ob, dm, vertexCos, defMats, numVerts);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               mti->deformMatrices(md, depsgraph, ob, &mesh, vertexCos, defMats, numVerts);
+
+               BKE_mesh_free(&mesh);
+       }
+}
+
+void modifier_deformVertsEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct DerivedMesh *dm,
+       float (*vertexCos)[3], int numVerts)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformVertsEM_DM) {
+               mti->deformVertsEM_DM(md, depsgraph, ob, editData, dm, vertexCos, numVerts);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               mti->deformVertsEM(md, depsgraph, ob, editData, &mesh, vertexCos, numVerts);
+
+               BKE_mesh_free(&mesh);
+       }
+}
+
+void modifier_deformMatricesEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData, struct DerivedMesh *dm,
+       float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->deformMatricesEM_DM) {
+               mti->deformMatricesEM_DM(md, depsgraph, ob, editData, dm, vertexCos, defMats, numVerts);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               mti->deformMatricesEM(md, depsgraph, ob, editData, &mesh, vertexCos, defMats, numVerts);
+
+               BKE_mesh_free(&mesh);
+       }
+}
+
+struct DerivedMesh *modifier_applyModifier_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct DerivedMesh *dm, ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->applyModifier_DM) {
+               return mti->applyModifier_DM(md, depsgraph, ob, dm, flag);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               struct Mesh *new_mesh = mti->applyModifier(md, depsgraph, ob, &mesh, flag);
+
+               DerivedMesh *ndm = CDDM_from_mesh(new_mesh);
+
+               if(new_mesh != &mesh) {
+                       BKE_mesh_free(&mesh);
+
+                       /* XXX free new_mesh? */
+               }
+
+               return ndm;
+       }
+}
+
+struct DerivedMesh *modifier_applyModifierEM_DM_deprecated(struct ModifierData *md, struct Depsgraph *depsgraph,
+       struct Object *ob, struct BMEditMesh *editData,
+       struct DerivedMesh *dm, ModifierApplyFlag flag)
+{
+       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
+
+       if (mti->applyModifierEM) {
+               return mti->applyModifierEM_DM(md, depsgraph, ob, editData, dm, flag);
+       }
+       else {
+               struct Mesh mesh;
+               BKE_mesh_init(&mesh);
+
+               DM_to_mesh(dm, &mesh, ob, CD_MASK_EVERYTHING, false);
+
+               struct Mesh *new_mesh = mti->applyModifierEM(md, depsgraph, ob, editData, &mesh, flag);
+
+               DerivedMesh *ndm = CDDM_from_mesh(new_mesh);
+
+               if(new_mesh != &mesh) {
+                       BKE_mesh_free(&mesh);
+
+                       /* XXX free new_mesh? */
+               }
+
+               return ndm;
+       }
+}
+
index edba03dd707de8510d6a7bdd135ec2858bf92877..0dcb4a46b3f2fe186840cb2e03e2d9bb6be72650 100644 (file)
@@ -280,11 +280,10 @@ static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level)
 DerivedMesh *get_multires_dm(struct Depsgraph *depsgraph, Scene *scene, MultiresModifierData *mmd, Object *ob)
 {
        ModifierData *md = (ModifierData *)mmd;
-       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
        DerivedMesh *tdm = mesh_get_derived_deform(depsgraph, scene, ob, CD_MASK_BAREMESH);
        DerivedMesh *dm;
 
-       dm = mti->applyModifier(md, depsgraph, ob, tdm, MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY);
+       dm = modifier_applyModifier_DM_deprecated(md, depsgraph, ob, tdm, MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY);
        if (dm == tdm) {
                dm = CDDM_copy(tdm);
        }
@@ -429,7 +428,6 @@ int multiresModifier_reshape(struct Depsgraph *depsgraph, Scene *scene, Multires
 int multiresModifier_reshapeFromDeformMod(struct Depsgraph *depsgraph, Scene *scene, MultiresModifierData *mmd,
                                           Object *ob, ModifierData *md)
 {
-       const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
        DerivedMesh *dm, *ndm;
        int numVerts, result;
        float (*deformedVerts)[3];
@@ -443,7 +441,7 @@ int multiresModifier_reshapeFromDeformMod(struct Depsgraph *depsgraph, Scene *sc
        deformedVerts = MEM_malloc_arrayN(numVerts, sizeof(float[3]), "multiresReshape_deformVerts");
 
        dm->getVertCos(dm, deformedVerts);
-       mti->deformVerts(md, depsgraph, ob, dm, deformedVerts, numVerts, 0);
+       modifier_deformVerts_DM_deprecated(md, depsgraph, ob, dm, deformedVerts, numVerts, 0);
 
        ndm = CDDM_copy(dm);
        CDDM_apply_vert_coords(ndm, deformedVerts);
index 5e12a15b49f716b96a07a82e2d322b44ec4f7a35..a02e68e8a6058600c9d5226ca1d628fc792a4975 100644 (file)
@@ -641,7 +641,7 @@ static int modifier_apply_obdata(ReportList *reports, Depsgraph *depsgraph, Scen
                BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
 
                vertexCos = BKE_curve_nurbs_vertexCos_get(&cu->nurb, &numVerts);
-               mti->deformVerts(md, depsgraph, ob, NULL, vertexCos, numVerts, 0);
+               modifier_deformVerts_DM_deprecated(md, depsgraph, ob, NULL, vertexCos, numVerts, 0);
                BK_curve_nurbs_vertexCos_apply(&cu->nurb, vertexCos);
 
                MEM_freeN(vertexCos);
index 37578664c4e3002cde33e49061cb12628498acda..c448ebdf11f932387b0ec635d2a8b66d741c37c0 100644 (file)
@@ -189,12 +189,21 @@ ModifierTypeInfo modifierType_Armature = {
                                eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          copyData,
-       /* deformVerts */       deformVerts,
-       /* deformMatrices */    deformMatrices,
-       /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  deformMatricesEM,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ deformMatrices,
+       /* deformVertsEM_DM */  deformVertsEM,
+       /* deformMatricesEM_DM*/deformMatricesEM,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 68a0f31ae131c709fcd26fffcee32b36afd817d6..dc2c534b973480f7da546ad220fc0dccece1726a 100644 (file)
@@ -777,12 +777,21 @@ ModifierTypeInfo modifierType_Array = {
                                eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 48de3507cfd5e081a91d410263342c7895e0474e..f12bad5c3e8f10ac655862b0abf540c440ff61d5 100644 (file)
@@ -195,12 +195,21 @@ ModifierTypeInfo modifierType_Bevel = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 16d456d13146ebd4ad6b802debfeb20b3e2efc43..e15c68c6e3469fb57d88e561dc567ee81b4503ba 100644 (file)
@@ -353,12 +353,21 @@ ModifierTypeInfo modifierType_Boolean = {
                                eModifierTypeFlag_UsesPointCache,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index f99fef130f8fa837893d177603f2a79c1f557df0..16b40f29cc15879499e5b8fd94e0c986e3264312 100644 (file)
@@ -314,12 +314,21 @@ ModifierTypeInfo modifierType_Build = {
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_AcceptsCVs,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 9037e5b6d5466dd7ade0829c8f68506bedd9d32c..3f0497716825afd4b799a18486a50f90ed7ffd38 100644 (file)
@@ -481,12 +481,21 @@ ModifierTypeInfo modifierType_Cast = {
                                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,
index fd5bf1af3120d62c16c468cccf40d4e7b0b0e6d2..84cad91b32e8c7131f728ea630e90b921069ab59 100644 (file)
@@ -225,12 +225,21 @@ ModifierTypeInfo modifierType_Cloth = {
                                eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
-       /* deformVerts */       deformVerts,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index cc14e6a052816a1ea48be0b702127b36dda41eae..4b4324c61fbc351b1ae0c230a7eb9d09bf4df46d 100644 (file)
@@ -254,12 +254,21 @@ ModifierTypeInfo modifierType_Collision = {
                                eModifierTypeFlag_Single,
 
        /* copyData */          NULL,
-       /* deformVerts */       deformVerts,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          freeData,
index 23a783128718b676edb7569f7df62aed1daec6ce..23a36c312534d018445e07d46aedf149ba487be5 100644 (file)
@@ -749,12 +749,21 @@ ModifierTypeInfo modifierType_CorrectiveSmooth = {
                                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 */          freeData,
index 2152717319fdd70c6d92b17ef0cc774b6645e5ea..2493e4f6860238d0cce5fd325608774fffa6b302 100644 (file)
@@ -149,12 +149,21 @@ ModifierTypeInfo modifierType_Curve = {
                                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,
index 5b98c84422b2ccdec2eaa08806243f5d231fb945..b2c4f707e3e9d88608f6a1c4578ac1025533aa81 100644 (file)
@@ -222,12 +222,21 @@ ModifierTypeInfo modifierType_DataTransfer = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index ff124ef607d3f5524dbaba7a77630d45f8ddd74b..515be3f76c8c64cf83c0452e5415a537151a3693 100644 (file)
@@ -217,12 +217,21 @@ ModifierTypeInfo modifierType_Decimate = {
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_AcceptsCVs,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index a28c0fb83799d19fb360379a69f035d81e5658e4..10365aae607f31ad886c512f4a540491397a6fc8 100644 (file)
@@ -406,12 +406,21 @@ ModifierTypeInfo modifierType_Displace = {
                                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,
index 97e2bf42d66becee6765471f52b710a2b6706717..645c6e43077ce6d7cba926ff69deca556ecf5383 100644 (file)
@@ -180,12 +180,21 @@ ModifierTypeInfo modifierType_DynamicPaint = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index 655284930b76cd2b69bd85ba6e0c5b07c3cf06bd..96699ddb9f68c6f851bccd500079ba92ccf28ba0 100644 (file)
@@ -149,12 +149,21 @@ ModifierTypeInfo modifierType_EdgeSplit = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 4c04eadb2658890ef5bf3f1196d4b4fe38935b09..a6a698bc22daa5dc1ee3d3ebf62f7086f89d1286 100644 (file)
@@ -1051,12 +1051,21 @@ ModifierTypeInfo modifierType_Explode = {
        /* type */              eModifierTypeType_Constructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index 4b84fa004152a2bd31ea93608f7fae7e65d009e1..4f6f7bef24dce59fd124c0f110abe32e1293ec98 100644 (file)
@@ -142,12 +142,21 @@ ModifierTypeInfo modifierType_Fluidsim = {
                                eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          freeData,
index c7c1f92edb1ea8d7b0a91e052aefb9f264ac8e57..195eb066a9b68c005274af7b77b81ce7227f3526 100644 (file)
@@ -393,12 +393,21 @@ ModifierTypeInfo modifierType_Hook = {
                                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 */          freeData,
index c3a7e63173c2db0791e9221a60b095764391e674..2463344f7bd100f5f4e48d62d96882f50e4ec478 100644 (file)
@@ -765,12 +765,21 @@ ModifierTypeInfo modifierType_LaplacianDeform = {
        /* type */              eModifierTypeType_OnlyDeform,
        /* flags */             eModifierTypeFlag_AcceptsMesh | 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 */          freeData,
index 5d3cfd830a0391aaa2f211372d3c6c988cdcb3fe..1017b3ca7d56611c46f9e5f26296a231445a6615 100644 (file)
@@ -551,12 +551,21 @@ ModifierTypeInfo modifierType_LaplacianSmooth = {
                                eModifierTypeFlag_SupportsEditmode,
 
        /* copy_data */         copy_data,
-       /* 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 */          init_data,
        /* requiredDataMask */  required_data_mask,
        /* freeData */          NULL,
index cff07dd15843ba660d961e5091b6373f09861a11..ecaaa5781a83e8844a1907755bc29134f4128b64 100644 (file)
@@ -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,
index eb9f1f39f5661bff96dc3ca9efca8fc6ec6ba087..9a375cecbb0c0a5881e1414704fdb7364524e027 100644 (file)
@@ -370,12 +370,21 @@ ModifierTypeInfo modifierType_Mask = {
                                eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          NULL,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 43c7a044434b4fcc290dbf002eb5516b3e78783c..ffd3dfb1abcadbf2f7e902c3cef5c6c5af7308ba 100644 (file)
@@ -303,12 +303,21 @@ ModifierTypeInfo modifierType_MeshCache = {
                                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 */  NULL,
        /* freeData */          NULL,
index 27a2f94255b164d94fdce54d0cd8faeb6a31cb68..d17aeafff4f5b142fdb7792ca9fac41b16276762 100644 (file)
@@ -512,12 +512,21 @@ ModifierTypeInfo modifierType_MeshDeform = {
                                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 */          freeData,
index a1ab20a661271135f078073b7a33b7a3ee9ed92e..e95148eb6b2026881a7baa17e3b4611083145252 100644 (file)
@@ -179,27 +179,37 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 }
 
 ModifierTypeInfo modifierType_MeshSequenceCache = {
-    /* name */              "Mesh Sequence Cache",
-    /* structName */        "MeshSeqCacheModifierData",
-    /* structSize */        sizeof(MeshSeqCacheModifierData),
-    /* type */              eModifierTypeType_Constructive,
-    /* flags */             eModifierTypeFlag_AcceptsMesh |
-                            eModifierTypeFlag_AcceptsCVs,
-    /* copyData */          copyData,
-    /* deformVerts */       NULL,
-    /* deformMatrices */    NULL,
-    /* deformVertsEM */     NULL,
-    /* deformMatricesEM */  NULL,
-    /* applyModifier */     applyModifier,
-    /* applyModifierEM */   NULL,
-    /* initData */          initData,
-    /* requiredDataMask */  NULL,
-    /* freeData */          freeData,
-    /* isDisabled */        isDisabled,
-    /* updateDepsgraph */   updateDepsgraph,
-    /* dependsOnTime */     dependsOnTime,
-    /* dependsOnNormals */  NULL,
-    /* foreachObjectLink */ NULL,
-    /* foreachIDLink */     foreachIDLink,
-    /* foreachTexLink */    NULL,
+       /* name */              "Mesh Sequence Cache",
+       /* structName */        "MeshSeqCacheModifierData",
+       /* structSize */        sizeof(MeshSeqCacheModifierData),
+       /* type */              eModifierTypeType_Constructive,
+       /* flags */             eModifierTypeFlag_AcceptsMesh |
+                               eModifierTypeFlag_AcceptsCVs,
+
+       /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
+
+       /* initData */          initData,
+       /* requiredDataMask */  NULL,
+       /* freeData */          freeData,
+       /* isDisabled */        isDisabled,
+       /* updateDepsgraph */   updateDepsgraph,
+       /* dependsOnTime */     dependsOnTime,
+       /* dependsOnNormals */  NULL,
+       /* foreachObjectLink */ NULL,
+       /* foreachIDLink */     foreachIDLink,
+       /* foreachTexLink */    NULL,
 };
index 84667e278fc15c1d185410f9efafec45edc352f7..881786d8cac72f74215da561f283b3246a7e3050 100644 (file)
@@ -349,12 +349,21 @@ ModifierTypeInfo modifierType_Mirror = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 3145bef5ac0af09a03cff49f3fc57167a75b6e35..392a2606b93dd3679b0cd0ab129308a52b1f1f50 100644 (file)
@@ -153,12 +153,21 @@ ModifierTypeInfo modifierType_Multires = {
                                eModifierTypeFlag_RequiresOriginalData,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 3fb780f566d7bb8e22898aa34ab0a9892f1ab116..b22b17685157e1b4e22665328937a3b58c1c7acd 100644 (file)
@@ -57,12 +57,21 @@ ModifierTypeInfo modifierType_None = {
                                eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          NULL,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          NULL,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 9be23dbade640b7bfe62eb8c0b2a83f9911f21b1..25151015b3b68a4c766d277bd71585f19981c5ce 100644 (file)
@@ -533,12 +533,21 @@ ModifierTypeInfo modifierType_NormalEdit = {
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index f495e96f6355eec3f5f3fdffe977c107229b7ee4..e8d58ccef44092d84467ee19df4c13727b119119 100644 (file)
@@ -580,12 +580,21 @@ ModifierTypeInfo modifierType_Ocean = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
-       /* deformMatrices */    NULL,
+       /* deformMatrices_DM */ NULL,
+
+       /* deformVerts_DM */    NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index d7cb7fd8d941fccf13ae80f84dde479c35c30d83..399a02bd69b0e56e89a9f2253ee5d873b44fbab2 100644 (file)
@@ -533,12 +533,21 @@ ModifierTypeInfo modifierType_ParticleInstance = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 4dbd7ef78496c2337f29b371e33287eb11b848b5..71dcd9f6677d2cf76613e83d9b7524ca4641fbf8 100644 (file)
@@ -221,12 +221,21 @@ ModifierTypeInfo modifierType_ParticleSystem = {
                                eModifierTypeFlag_EnableInEditmode */,
 
        /* copyData */          copyData,
-       /* deformVerts */       deformVerts,
-       /* deformVertsEM */     NULL,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index 67a4865f9db9253e9ae0e59a82ae66389f8a3824..6c3688f113c26aaa6cd220ee443bbe8d85108ff3 100644 (file)
@@ -224,12 +224,21 @@ ModifierTypeInfo modifierType_Remesh = {
                                eModifierTypeFlag_AcceptsCVs |
                                eModifierTypeFlag_SupportsEditmode,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 69ac3dbfefd3fbd0f29f2e27ab4758c534b02e96..e53d11d9b011de8fbf80919f14b46277c7b72f05 100644 (file)
@@ -1146,12 +1146,21 @@ ModifierTypeInfo modifierType_Screw = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index dc93474a4201ba8875313318ae286a4708d383aa..7908b42c1f9669bcc1766faa90c9ac64fd49b266 100644 (file)
@@ -128,12 +128,21 @@ ModifierTypeInfo modifierType_ShapeKey = {
                                eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          NULL,
-       /* deformVerts */       deformVerts,
-       /* deformMatrices */    deformMatrices,
-       /* deformVertsEM */     deformVertsEM,
-       /* deformMatricesEM */  deformMatricesEM,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ deformMatrices,
+       /* deformVertsEM_DM */  deformVertsEM,
+       /* deformMatricesEM_DM*/deformMatricesEM,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
+       /* deformMatrices */    NULL,
+       /* deformVertsEM */     NULL,
+       /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          NULL,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 877429c4a0ba7348f9a37ea4352de32596e24589..1ca8d573e8f4322610ea45e1dfbf739740bb69b9 100644 (file)
@@ -177,12 +177,21 @@ ModifierTypeInfo modifierType_Shrinkwrap = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* 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,
index 5cbb602113a1f8cea8f1e0b6823dbc4933e06291..e6fbf6fd1b2a4734a4eeb84077dea7c7a598e611 100644 (file)
@@ -437,12 +437,21 @@ ModifierTypeInfo modifierType_SimpleDeform = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* 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,
index ebf7fe9f6401ab69efcb01df762671f291732bc5..6415f64bd51ff9efb791c6065a7d219f0f97a558 100644 (file)
@@ -1943,12 +1943,21 @@ ModifierTypeInfo modifierType_Skin = {
        /* flags */             eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 330e0b05cdb50072854b371ab0197fb3afb56d63..e5875f6c637c0c4583ffa859c04eb4d67ef28674 100644 (file)
@@ -174,12 +174,21 @@ ModifierTypeInfo modifierType_Smoke = {
                                eModifierTypeFlag_Single,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index 346a973fa773afd008ada49bcc74c6a408731ebe..34b44353e1da465eb453f0dc5e0bfeadf05bed05 100644 (file)
@@ -251,12 +251,21 @@ ModifierTypeInfo modifierType_Smooth = {
                                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,
index 876f56f4192ee645519809c4d904fb01699a4fbe..5f545e27f964f6ced5b6f97c5c9428d3272d5f3f 100644 (file)
@@ -84,12 +84,21 @@ ModifierTypeInfo modifierType_Softbody = {
                                eModifierTypeFlag_Single,
 
        /* copyData */          NULL,
-       /* deformVerts */       deformVerts,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          NULL,
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
index 68cd34b348c171d917c5784b70a5ce27d95e9f6a..86a37dfbd2da1e4cea29ebfdf5a8ff45e26d8417 100644 (file)
@@ -963,12 +963,21 @@ ModifierTypeInfo modifierType_Solidify = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index d620fec8ede688759a7cf0ea0f1d747767b45f36..830c564b1e66c808308c4277dfacaff3004cd418 100644 (file)
@@ -209,12 +209,21 @@ ModifierTypeInfo modifierType_Subsurf = {
                                eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */applyModifierEM,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
-       /* applyModifierEM */   applyModifierEM,
+       /* applyModifier */     NULL,
+       /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          freeData,
index 5115572168b88e5e25688293f200786e627d6f65..8d6fafd5ab63bbf345a0b346e91af64473f664ac 100644 (file)
@@ -176,12 +176,21 @@ ModifierTypeInfo modifierType_Surface = {
                                eModifierTypeFlag_NoUserAdd,
 
        /* copyData */          NULL,
-       /* deformVerts */       deformVerts,
+
+       /* deformVerts_DM */    deformVerts,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  NULL,
+       /* applyModifierEM_DM */NULL,
+
+       /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
        /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL,
        /* freeData */          freeData,
index 0d50cb40937f63d6ce2f71f3e8495627ad277849..8616a8084cbce4af3ef71e50a741294ba537ca03 100644 (file)
@@ -1214,12 +1214,21 @@ ModifierTypeInfo modifierType_SurfaceDeform = {
                                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 */  NULL,
        /* freeData */          freeData,
index 69e6578a28035d109f9f7314496c1612664f6f6c..ed101a8874dbb0585756ca300f8f2d24092a240a 100644 (file)
@@ -111,12 +111,21 @@ ModifierTypeInfo modifierType_Triangulate = {
                                eModifierTypeFlag_AcceptsCVs,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  NULL, //requiredDataMask,
        /* freeData */          NULL,
index 1cffdeb0586d8aa5267488ee0d81f064ffb96369..9c7f8832d4cded65b1d83a022aee83188d10f0a4 100644 (file)
@@ -340,12 +340,21 @@ ModifierTypeInfo modifierType_UVProject = {
                                eModifierTypeFlag_EnableInEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 53e7d9f8e176636a089c13a3ee4ea76e81ee4b19..09e46748127a657307116e929d23a3463a94155b 100644 (file)
@@ -261,12 +261,21 @@ ModifierTypeInfo modifierType_UVWarp = {
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index 06167bea3ab555ec68401adbd0c6e254eb4d1d48..6350cb2b0493fcc1e298c0a67f239d413407b283 100644 (file)
@@ -354,12 +354,21 @@ ModifierTypeInfo modifierType_Warp = {
                                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 */          freeData,
index 3126ea0139ece808a684c0301547284c821f3931..e3bed6003493c6b39aa50e87de388442debb52c6 100644 (file)
@@ -351,12 +351,21 @@ ModifierTypeInfo modifierType_Wave = {
                                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,
index ba5422b929d835154135276a2a7121b7fbf0d964..e85ecb75cbdb3c19e0c4e7e81d52b653e5842916 100644 (file)
@@ -268,12 +268,21 @@ ModifierTypeInfo modifierType_WeightVGEdit = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
index 28f6be5d588539b423effd261e7712d1e6028067..f14aba2f80eda98401ad93b418e2e5d70daf2d0b 100644 (file)
@@ -393,12 +393,21 @@ ModifierTypeInfo modifierType_WeightVGMix = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index f0641365d3e0eb3aabeeea0d94f33c62ba5555a8..c3d19c38dee4f50b1ce3655991c3e0c7739e550a 100644 (file)
@@ -576,12 +576,21 @@ ModifierTypeInfo modifierType_WeightVGProximity = {
                                eModifierTypeFlag_UsesPreview,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
index e9b9a66cd7361714eb23968ef29f807a0b87c01c..d49411343eb75644cc6dfc8e34a3551248b6c44a 100644 (file)
@@ -118,12 +118,21 @@ ModifierTypeInfo modifierType_Wireframe = {
                                eModifierTypeFlag_SupportsEditmode,
 
        /* copyData */          copyData,
+
+       /* deformVerts_DM */    NULL,
+       /* deformMatrices_DM */ NULL,
+       /* deformVertsEM_DM */  NULL,
+       /* deformMatricesEM_DM*/NULL,
+       /* applyModifier_DM */  applyModifier,
+       /* applyModifierEM_DM */NULL,
+
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
        /* deformMatricesEM */  NULL,
-       /* applyModifier */     applyModifier,
+       /* applyModifier */     NULL,
        /* applyModifierEM */   NULL,
+
        /* initData */          initData,
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,