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

index 8f795bc753562bec541ae3da8431204cbbd8ae4f,5bf9dd8470277a428ca314976f61a8ef523ecd9c..a0814fc918380ce50204317bcaa81ad01ebda98f
@@@ -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);
index 02337110289bdd5e8442b36521f56d94c37a5e85,f5c5b74a2ae03f3786b516c88da1079fd00581c9..a3c6b84f26708d139430831f98d633e9a384c2e7
@@@ -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
index 01414a3dfad604dc99e4e32fdc3f73c6ddb95a6b,0be5049012d1e50b54451a86c6aff277b11a5776..45678947df5f459ed9fa518ff70e36fd7857aa2d
@@@ -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,
index 7999a79bb087dcd04a56105ed63a88131ccd4bea,bd37358011b9d872a62ae9d1819200765d113cae..81a4e94386fa0c8709e1222c128e05b59bd2ed70
@@@ -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,
index 5057f69bf231553e3b9ab09c9f6350ed0418cad6,1f683f521225be7ba7ccc1d49a8cea3a32f725f6..0da38979bdd913c4cb49416ae84ac1c288a2713e
@@@ -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,
index 048e9ce33c0afa294c2072331bd76ffebfebf25b,75afd7496a199dfc190d68a9dd4737a8fafbf3f3..f9cd57cc460a050a179a2d1caaf0d9f133341d80
@@@ -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,
index 11c8ba4a9cdad3ccadffb048239591ffb9d8303d,bac95e4c1c1960e4a2efeabc171484f2aec464be..18c64a24392414fa0d7380cd3f87cedd4f038b95
@@@ -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,
index e7f7bed20552e28a904573ee66c57a44b9009225,91772faa08bf2e3f728175e3330b17aca97c798e..805d27de2736549eab21cf4640ae7d6bcde5b438
@@@ -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,
index 863a6a3bb147b82b665cd067adab7325ca4a90ad,3a8887296f2a1c53de2bda44246d6dbeea79835d..21d1a6a865ddaf20699849509a088f08a7f42ec6
@@@ -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,
index dfa76e53f846c041a82193730a5960919dffee42,56aab400993972b7547c188f1f806d3146b12a35..3a7ccc44f745f4ea04c0faa8eb53ab5596bff1f0
@@@ -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,
index ecb4da7169975d21b1a95225e6e5833415923922,e63d015ac9acc70846d8012561a2b7ea59b560e4..c28bb41647fb3c3af6bfbcbecc9a604766e104e0
@@@ -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,
index 10e26a918be5d6ccef9aaff750dee8666f4d81d4,849cca530053bcbd3b021236d5249e07c7492829..d2e36c39816ef991072049bc7d6bb85cda656702
@@@ -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,
index 3b63a3ef5f8a6308e13750454f313e7e87ca7f8c,e9f62713cd1338732a66c46856ab9f5cfae006f4..b683003baad0fc335b743fa9a9b9c03548fe8d0f
@@@ -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,
index 69c814279be11f75d8fe7228ab3611f90abf822e,05abd6ebc9205d8fbaed09151d055e7172af2eb8..548480acdd8db1537b3121e1cf300202100297b6
@@@ -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,
index a94f0ecff0210b07e72099e0e83acb3411011cf9,9b5fceac037db14ebd951d9bb0bf4656815f2b44..fdce235368425a574251b1c3ad0bf50340c99f94
@@@ -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,
index 4eb37a4953caec7862b3966cf060f408b9cb4b30,b04929049e92de2f660385b92a8b5c027276525d..cc410f3cefb79302f946d323448ae438a2ad5729
@@@ -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,
index 4edfbd43d7a561312422736401979943a227ef93,72846a7f0e9de78b285fe46654963795a30b1424..53b6103de7f101ddff573ae9c566934895dae8bc
@@@ -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,
index 32b15f11116b0197757f6b76a7c14e97826da788,903ef0f3f0437e929d580216f6370b88dd21f738..17336c2a723f6fb2d9c0f5995e59c2167d360e0b
@@@ -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,
index 7f080a0bd20a155e4d1fb998800751d46797fe3c,894f60e869d9a3b4e2f6dceec504d2e0010f2d58..9d2a66e0a0654f764690399944a55e978f4e428e
@@@ -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,
index 651a5a96676b746ac5a9dde5e7405b7616ab7639,47236c0fc32ddb412e4961ced6f0821e6f425180..b87705adb6b219c6151501b3f94b1fe1dea859fb
@@@ -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,
index 254b82f39680a03e35ebcc51b999fda461445e82,b72c61cfc323ce3c80705f66c901035adf1a7605..3ee69deb8b24f023801781e8af68d897f9c371d0
@@@ -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,
index 6335c4539551dcc07bc93356ee7001ebde77436f,ec6e0d9a2f4d312beeb3d2a88c1bfd982af36b58..1eead48082da73eaaf1797f571818372b951f0c3
@@@ -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,
index 1e5f78bdbcead5a01f23fe1fcf02be8afe65dbce,5dac420cace3ac884ed86bad05ddfaa0ec76bb32..b2077f62bf4352f5af807b140dbf6f1f870215af
@@@ -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,
index c1dbf1989ea6c79d2733163fbca0a36e5a1c4d94,6c6518952d63085a8a63cb528812bdfa917656ef..4e9b5b208718a7d0586021145c0da9a8e1a2d58c
@@@ -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,
index 1e02ad40e12d7707d93b6f0595d69ebb3dcc5359,5335ad8aeaaee261133fcd33ba056245776f2406..ec7a995810985eb1e17e2a6fd3a2a199e7be3132
@@@ -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,
index b905e0f811814b8a139699ce1427523b7ed8dff5,aa477fd0da5510baf6e4f9f891ccf52cde5283e9..ace5a95cd22aa219b3d5f27ade54e6742f55bd26
@@@ -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,
index e37bcccacfde2fb37e44382cec50c9260c80e831,572898c1982ba3d7d7cef87b2bd2b35bf74f1072..6d830cabb27bebeed90753779ff73cb8f852d094
@@@ -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,
index 349897f2be61faa03cf8def972e36f2c0036a2b7,d4d94199db6d91c057d52eea7ad0471a5e19264b..575339be72c0346fbc66081da537e3f2670af33b
@@@ -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,
index 620d3c34584c6abfacfc02734b75f9c0a5eafc9e,c0e3b488c2e67dda05dd0c9b571d9a7a7be8c20a..d3090f2caf3d0fe8be25e1f6e4e86e49b8841005
@@@ -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))
index 7ea2d6ad3b343030902a9608062a8f061852f4af,6d44e31a1f4e2c796a08e418b9dcb60022263ce0..9ca117c4232b1130a28863e3c7831d319cbef799
@@@ -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,
index c5af7755578c1a34b1c58a93543aa9f472de9dcd,49dd4718c9c95e1fc206219684104e67a9d4210e..f558d3fc5bdca70f2b7ac81d7b802ac685aef5f2
@@@ -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,
index 0841bc9bfc0dc193d11f539ad55c80d33edeb7ed,fbd1b0b09764b4eff3edad9492c8e0a98bd7e607..be73ff96496a8da8a9b1c1ccc58f3d6fe49a6b81
@@@ -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,
index 1b5ef23884d5c13e7575e89421f5b356cd949c85,e625a63b9cd55fc8703cff1095ee616b47253c24..7985f4d7647400db5d7e518dd35856582651d8fe
@@@ -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,
index d3964b5c36fd03648f7c7eefe28efa4ed1511ec2,84a507cd35cf19d465b431fbc332d0b556ad28aa..9dfc23fbf5f071c324ef61ce70bf437a9e25daaf
@@@ -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,