Merge branch 'master' into blender2.8
[blender.git] / source / blender / modifiers / intern / MOD_ocean.c
index c29e835797b825a40a2ba6c6342d919211ac031d..af5b537ca521ffa80d5f95741267d49c00d279f7 100644 (file)
@@ -391,7 +391,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;
@@ -559,13 +558,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;
@@ -584,17 +582,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,