Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 8 May 2018 13:20:18 +0000 (15:20 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 8 May 2018 13:20:18 +0000 (15:20 +0200)
55 files changed:
1  2 
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_smoke.h
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/smoke.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_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_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_solidify.c
source/blender/modifiers/intern/MOD_subsurf.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

@@@ -62,10 -60,9 +62,10 @@@ typedef struct PaintWavePoint 
        short state;
  } PaintWavePoint;
  
 -struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
 +struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Depsgraph *depsgraph, struct Scene *scene,
 +                                             struct Object *ob, struct DerivedMesh *dm);
  void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd);
- void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd);
+ void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd);
  
  bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
  struct DynamicPaintSurface *dynamicPaint_createNewSurface(struct DynamicPaintCanvasSettings *canvas, struct Scene *scene);
@@@ -163,10 -160,9 +163,10 @@@ typedef struct ModifierTypeInfo 
        /* Copy instance data for this modifier type. Should copy all user
         * level settings to the target modifier.
         */
-       void (*copyData)(struct ModifierData *md, struct ModifierData *target);
+       void (*copyData)(const 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
Simple merge
@@@ -770,15 -811,7 +761,15 @@@ ModifierTypeInfo modifierType_Array = 
                                eModifierTypeFlag_EnableInEditmode |
                                eModifierTypeFlag_AcceptsCVs,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -203,15 -185,7 +194,15 @@@ ModifierTypeInfo modifierType_Bevel = 
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -351,15 -357,7 +342,15 @@@ ModifierTypeInfo modifierType_Boolean 
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_UsesPointCache,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -313,15 -304,7 +304,16 @@@ ModifierTypeInfo modifierType_Build = 
        /* type */              eModifierTypeType_Nonconstructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_AcceptsCVs,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -479,18 -484,10 +469,18 @@@ ModifierTypeInfo modifierType_Cast = 
                                eModifierTypeFlag_AcceptsLattice |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 -      /* 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,
@@@ -168,15 -151,7 +159,15 @@@ ModifierTypeInfo modifierType_Curve = 
                                eModifierTypeFlag_AcceptsLattice |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
@@@ -220,15 -227,7 +211,15 @@@ ModifierTypeInfo modifierType_DataTrans
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_UsesPreview,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -215,15 -207,7 +206,16 @@@ ModifierTypeInfo modifierType_Decimate 
        /* type */              eModifierTypeType_Nonconstructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_AcceptsCVs,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -417,15 -417,7 +407,15 @@@ ModifierTypeInfo modifierType_Displace 
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
@@@ -124,20 -112,10 +124,11 @@@ static void initData(ModifierData *md
        emd->flags = MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
- {
- #if 0
-       EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
-       EdgeSplitModifierData *temd = (EdgeSplitModifierData *) target;
- #endif
-       modifier_copyData_generic(md, target);
- }
 -static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), DerivedMesh *dm,
 -                                  ModifierApplyFlag UNUSED(flag))
 +static Mesh *applyModifier(ModifierData *md,
 +                           const ModifierEvalContext *ctx,
 +                           Mesh *mesh)
  {
 -      DerivedMesh *result;
 +      Mesh *result;
        EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
  
        if (!(emd->flags & (MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG)))
@@@ -160,15 -138,7 +151,15 @@@ ModifierTypeInfo modifierType_EdgeSpli
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -550,18 -539,10 +539,18 @@@ ModifierTypeInfo modifierType_Laplacian
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copy_data */         copy_data,
 -      /* copy_data */         modifier_copyData_generic,
 -      /* deformVerts */       deformVerts,
++      /* copyData */          modifier_copyData_generic,
 +
 +      /* 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,
@@@ -143,15 -140,7 +133,16 @@@ ModifierTypeInfo modifierType_Lattice 
        /* flags */             eModifierTypeFlag_AcceptsCVs |
                                eModifierTypeFlag_AcceptsLattice |
                                eModifierTypeFlag_SupportsEditmode,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
@@@ -369,15 -375,7 +360,15 @@@ ModifierTypeInfo modifierType_Mask = 
                                eModifierTypeFlag_SupportsMapping |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -301,18 -293,10 +292,18 @@@ ModifierTypeInfo modifierType_MeshCach
                                eModifierTypeFlag_AcceptsLattice |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 -      /* 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,
@@@ -357,15 -351,7 +348,15 @@@ ModifierTypeInfo modifierType_Mirror = 
                                /* this is only the case when 'MOD_MIR_VGROUP' is used */
                                eModifierTypeFlag_UsesPreview,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -58,17 -58,8 +58,8 @@@ static void initData(ModifierData *md
        mmd->totlvl = 0;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
- {
- #if 0
-       MultiresModifierData *mmd = (MultiresModifierData *) md;
-       MultiresModifierData *tmmd = (MultiresModifierData *) target;
- #endif
-       modifier_copyData_generic(md, target);
- }
 -static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
 -                                  ModifierApplyFlag flag)
 +static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx,
 +                                  DerivedMesh *dm)
  {
        MultiresModifierData *mmd = (MultiresModifierData *)md;
        DerivedMesh *result;
@@@ -152,15 -143,7 +143,15 @@@ ModifierTypeInfo modifierType_Multires 
                                eModifierTypeFlag_SupportsMapping |
                                eModifierTypeFlag_RequiresOriginalData,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -550,15 -539,7 +545,16 @@@ ModifierTypeInfo modifierType_NormalEdi
                                eModifierTypeFlag_SupportsMapping |
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -539,15 -546,7 +531,15 @@@ ModifierTypeInfo modifierType_ParticleI
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -219,15 -211,7 +210,16 @@@ ModifierTypeInfo modifierType_Remesh = 
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_AcceptsCVs |
                                eModifierTypeFlag_SupportsEditmode,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -175,17 -176,9 +175,8 @@@ static void initData(ModifierData *md
        ltmd->merge_dist = 0.01f;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
- {
- #if 0
-       ScrewModifierData *sltmd = (ScrewModifierData *) md;
-       ScrewModifierData *tltmd = (ScrewModifierData *) target;
- #endif
-       modifier_copyData_generic(md, target);
- }
 -static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
 -                                  DerivedMesh *derivedData,
 -                                  ModifierApplyFlag flag)
 +static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx,
 +                                  DerivedMesh *derivedData)
  {
        DerivedMesh *dm = derivedData;
        DerivedMesh *result;
@@@ -1144,15 -1151,7 +1135,15 @@@ ModifierTypeInfo modifierType_Screw = 
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -175,18 -181,10 +166,18 @@@ ModifierTypeInfo modifierType_Shrinkwra
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 -      /* 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,
@@@ -422,15 -438,7 +413,15 @@@ ModifierTypeInfo modifierType_SimpleDef
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       deformVerts,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     deformVertsEM,
@@@ -1905,23 -1907,15 +1905,14 @@@ static void initData(ModifierData *md
        smd->symmetry_axes = MOD_SKIN_SYMM_X;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
- {
- #if 0
-       SkinModifierData *smd = (SkinModifierData *) md;
-       SkinModifierData *tsmd = (SkinModifierData *) target;
- #endif
-       modifier_copyData_generic(md, target);
- }
 -static DerivedMesh *applyModifier(ModifierData *md,
 -                                  Object *UNUSED(ob),
 -                                  DerivedMesh *dm,
 -                                  ModifierApplyFlag UNUSED(flag))
 +static Mesh *applyModifier(ModifierData *md,
 +                           const ModifierEvalContext *UNUSED(ctx),
 +                           Mesh *mesh)
  {
 -      DerivedMesh *result;
 +      Mesh *result;
  
 -      if (!(result = final_skin((SkinModifierData *)md, dm)))
 -              return dm;
 +      if (!(result = final_skin((SkinModifierData *)md, mesh)))
 +              return mesh;
        return result;
  }
  
@@@ -1938,15 -1932,7 +1929,15 @@@ ModifierTypeInfo modifierType_Skin = 
        /* type */              eModifierTypeType_Constructive,
        /* flags */             eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -250,18 -241,10 +241,18 @@@ ModifierTypeInfo modifierType_Smooth = 
                                eModifierTypeFlag_AcceptsCVs |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 -      /* 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,
@@@ -966,15 -954,7 +957,15 @@@ ModifierTypeInfo modifierType_Solidify 
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -74,19 -74,10 +74,9 @@@ static void initData(ModifierData *md
        tmd->ngon_method = MOD_TRIANGULATE_NGON_BEAUTY;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
- {
- #if 0
-       TriangulateModifierData *smd = (TriangulateModifierData *) md;
-       TriangulateModifierData *tsmd = (TriangulateModifierData *) target;
- #endif
-       modifier_copyData_generic(md, target);
- }
  static DerivedMesh *applyModifier(ModifierData *md,
 -                                  Object *UNUSED(ob),
 -                                  DerivedMesh *dm,
 -                                  ModifierApplyFlag UNUSED(flag))
 +                                  const ModifierEvalContext *UNUSED(ctx),
 +                                  DerivedMesh *dm)
  {
        TriangulateModifierData *tmd = (TriangulateModifierData *)md;
        DerivedMesh *result;
@@@ -108,15 -99,7 +98,15 @@@ ModifierTypeInfo modifierType_Triangula
                                eModifierTypeFlag_EnableInEditmode |
                                eModifierTypeFlag_AcceptsCVs,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -67,14 -67,16 +67,14 @@@ static void initData(ModifierData *md
        umd->scalex = umd->scaley = 1.0f;
  }
  
- static void copyData(ModifierData *md, ModifierData *target)
+ static void copyData(const ModifierData *md, ModifierData *target)
  {
  #if 0
-       UVProjectModifierData *umd = (UVProjectModifierData *) md;
+       const UVProjectModifierData *umd = (const UVProjectModifierData *) md;
 -#endif
        UVProjectModifierData *tumd = (UVProjectModifierData *) target;
 +#endif
  
        modifier_copyData_generic(md, target);
 -
 -      id_us_plus((ID *)tumd->image);
  }
  
  static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))
@@@ -259,15 -274,7 +250,16 @@@ ModifierTypeInfo modifierType_UVWarp = 
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_EnableInEditmode,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  applyModifier,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -349,18 -356,10 +339,19 @@@ ModifierTypeInfo modifierType_Wave = 
        /* flags */             eModifierTypeFlag_AcceptsCVs |
                                eModifierTypeFlag_AcceptsLattice |
                                eModifierTypeFlag_SupportsEditmode,
-       /* copyData */          copyData,
++
+       /* copyData */          modifier_copyData_generic,
 -      /* 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,
@@@ -414,15 -400,7 +404,15 @@@ ModifierTypeInfo modifierType_WeightVGM
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_UsesPreview,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -597,15 -589,7 +587,15 @@@ ModifierTypeInfo modifierType_WeightVGP
                                eModifierTypeFlag_SupportsEditmode |
                                eModifierTypeFlag_UsesPreview,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,
@@@ -129,15 -107,7 +120,15 @@@ ModifierTypeInfo modifierType_Wirefram
        /* flags */             eModifierTypeFlag_AcceptsMesh |
                                eModifierTypeFlag_SupportsEditmode,
  
-       /* copyData */          copyData,
+       /* copyData */          modifier_copyData_generic,
 +
 +      /* deformVerts_DM */    NULL,
 +      /* deformMatrices_DM */ NULL,
 +      /* deformVertsEM_DM */  NULL,
 +      /* deformMatricesEM_DM*/NULL,
 +      /* applyModifier_DM */  NULL,
 +      /* applyModifierEM_DM */NULL,
 +
        /* deformVerts */       NULL,
        /* deformMatrices */    NULL,
        /* deformVertsEM */     NULL,