diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_meshdeform.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index b1938395a7b..ab43204365d 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -47,8 +47,6 @@ #include "BKE_deform.h" #include "BKE_editmesh.h" -#include "depsgraph_private.h" - #include "MEM_guardedalloc.h" #include "MOD_util.h" @@ -122,23 +120,6 @@ static void foreachObjectLink( walk(userData, ob, &mmd->object, IDWALK_CB_NOP); } -static void updateDepgraph(ModifierData *md, DagForest *forest, - struct Main *UNUSED(bmain), - struct Scene *UNUSED(scene), - Object *UNUSED(ob), - DagNode *obNode) -{ - MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; - - if (mmd->object) { - DagNode *curNode = dag_get_node(forest, mmd->object); - - dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA | DAG_RL_DATA_OB | DAG_RL_OB_OB, - "Mesh Deform Modifier"); - } -} - static void updateDepsgraph(ModifierData *md, struct Main *UNUSED(bmain), struct Scene *UNUSED(scene), @@ -291,7 +272,7 @@ static void meshdeform_vert_task(void *userdata, const int iter) } static void meshdeformModifier_do( - ModifierData *md, Object *ob, DerivedMesh *dm, + ModifierData *md, const struct EvaluationContext *eval_ctx, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numVerts) { MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; @@ -318,7 +299,7 @@ static void meshdeformModifier_do( */ if (mmd->object == md->scene->obedit) { BMEditMesh *em = BKE_editmesh_from_object(mmd->object); - tmpdm = editbmesh_get_derived_cage_and_final(md->scene, mmd->object, em, 0, &cagedm); + tmpdm = editbmesh_get_derived_cage_and_final(eval_ctx, md->scene, mmd->object, em, 0, &cagedm); if (tmpdm) tmpdm->release(tmpdm); } @@ -421,7 +402,7 @@ static void meshdeformModifier_do( cagedm->release(cagedm); } -static void deformVerts(ModifierData *md, Object *ob, +static void deformVerts(ModifierData *md, const struct EvaluationContext *eval_ctx, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, @@ -431,13 +412,13 @@ static void deformVerts(ModifierData *md, Object *ob, modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */ - meshdeformModifier_do(md, ob, dm, vertexCos, numVerts); + meshdeformModifier_do(md, eval_ctx, ob, dm, vertexCos, numVerts); if (dm && dm != derivedData) dm->release(dm); } -static void deformVertsEM(ModifierData *md, Object *ob, +static void deformVertsEM(ModifierData *md, const struct EvaluationContext *eval_ctx, Object *ob, struct BMEditMesh *UNUSED(editData), DerivedMesh *derivedData, float (*vertexCos)[3], @@ -445,7 +426,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, { DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, false, false); - meshdeformModifier_do(md, ob, dm, vertexCos, numVerts); + meshdeformModifier_do(md, eval_ctx, ob, dm, vertexCos, numVerts); if (dm && dm != derivedData) dm->release(dm); @@ -534,7 +515,6 @@ ModifierTypeInfo modifierType_MeshDeform = { /* requiredDataMask */ requiredDataMask, /* freeData */ freeData, /* isDisabled */ isDisabled, - /* updateDepgraph */ updateDepgraph, /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ NULL, /* dependsOnNormals */ NULL, |