Merge branch 'master' into blender2.8
[blender.git] / source / blender / modifiers / intern / MOD_ocean.c
index d001917fce806263f0c6614f65431a98f309f193..728802882a9818eecaa78dd08b0848c7eaeb2700 100644 (file)
@@ -389,7 +389,6 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
        /* add uvs */
        if (CustomData_number_of_layers(&result->loopData, CD_MLOOPUV) < MAX_MTFACE) {
                gogd.mloopuvs = CustomData_add_layer(&result->loopData, CD_MLOOPUV, CD_CALLOC, NULL, num_polys * 4);
-               CustomData_add_layer(&result->polyData, CD_MTEXPOLY, CD_CALLOC, NULL, num_polys);
 
                if (gogd.mloopuvs) { /* unlikely to fail */
                        gogd.ix = 1.0 / gogd.rx;
@@ -557,13 +556,12 @@ static DerivedMesh *doOcean(
 #endif /* WITH_OCEANSIM */
 
 static DerivedMesh *applyModifier(
-        ModifierData *md, Object *ob,
-        DerivedMesh *derivedData,
-        ModifierApplyFlag UNUSED(flag))
+        ModifierData *md, const ModifierEvalContext *ctx,
+        DerivedMesh *derivedData)
 {
        DerivedMesh *result;
 
-       result = doOcean(md, ob, derivedData, 0);
+       result = doOcean(md, ctx->object, derivedData, 0);
 
        if (result != derivedData)
                result->dirty |= DM_DIRTY_NORMALS;
@@ -582,17 +580,25 @@ 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,
        /* isDisabled */        NULL,
-       /* updateDepgraph */    NULL,
        /* updateDepsgraph */   NULL,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  dependsOnNormals,