diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cloth.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index e8c39770a14..b234cc63228 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -43,7 +43,6 @@ #include "BLI_utildefines.h" - #include "BKE_cloth.h" #include "BKE_cdderivedmesh.h" #include "BKE_effect.h" @@ -53,8 +52,6 @@ #include "BKE_modifier.h" #include "BKE_pointcache.h" -#include "depsgraph_private.h" - #include "MOD_util.h" static void initData(ModifierData *md) @@ -72,7 +69,7 @@ static void initData(ModifierData *md) cloth_init(clmd); } -static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], +static void deformVerts(ModifierData *md, const struct EvaluationContext *eval_ctx, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts, ModifierApplyFlag UNUSED(flag)) { DerivedMesh *dm; @@ -112,31 +109,11 @@ static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, CDDM_apply_vert_coords(dm, vertexCos); - clothModifier_do(clmd, md->scene, ob, dm, vertexCos); + clothModifier_do(clmd, eval_ctx, md->scene, ob, dm, vertexCos); dm->release(dm); } -static void updateDepgraph(ModifierData *md, DagForest *forest, - struct Main *UNUSED(bmain), - Scene *scene, Object *ob, DagNode *obNode) -{ - ClothModifierData *clmd = (ClothModifierData *) md; - - if (clmd) { - /* Actual code uses get_collisionobjects */ -#ifdef WITH_LEGACY_DEPSGRAPH - dag_add_collision_relations(forest, scene, ob, obNode, clmd->coll_parms->group, ob->lay|scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision"); - dag_add_forcefield_relations(forest, scene, ob, obNode, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); -#else - (void)forest; - (void)scene; - (void)ob; - (void)obNode; -#endif - } -} - static void updateDepsgraph(ModifierData *md, struct Main *UNUSED(bmain), struct Scene *scene, @@ -146,7 +123,7 @@ static void updateDepsgraph(ModifierData *md, ClothModifierData *clmd = (ClothModifierData *)md; if (clmd != NULL) { /* Actual code uses get_collisionobjects */ - DEG_add_collision_relations(node, scene, ob, clmd->coll_parms->group, ob->lay|scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision"); + DEG_add_collision_relations(node, scene, ob, clmd->coll_parms->group, eModifierType_Collision, NULL, true, "Cloth Collision"); DEG_add_forcefield_relations(node, scene, ob, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); } @@ -262,7 +239,6 @@ ModifierTypeInfo modifierType_Cloth = { /* requiredDataMask */ requiredDataMask, /* freeData */ freeData, /* isDisabled */ NULL, - /* updateDepgraph */ updateDepgraph, /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ dependsOnTime, /* dependsOnNormals */ NULL, |