diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_softbody.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_softbody.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index a0bbe5da04a..020dd3da6a5 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -40,21 +40,22 @@ #include "BLI_utildefines.h" #include "BKE_cdderivedmesh.h" +#include "BKE_layer.h" #include "BKE_particle.h" #include "BKE_softbody.h" -#include "depsgraph_private.h" +#include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "MOD_modifiertypes.h" -static void deformVerts(ModifierData *md, Object *ob, +static void deformVerts(ModifierData *md, const EvaluationContext *eval_ctx, Object *ob, DerivedMesh *UNUSED(derivedData), float (*vertexCos)[3], int numVerts, ModifierApplyFlag UNUSED(flag)) { - sbObjectStep(md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts); + sbObjectStep(eval_ctx, md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts); } static bool dependsOnTime(ModifierData *UNUSED(md)) @@ -62,25 +63,6 @@ static bool dependsOnTime(ModifierData *UNUSED(md)) return true; } -static void updateDepgraph(ModifierData *UNUSED(md), DagForest *forest, - struct Main *UNUSED(bmain), - Scene *scene, Object *ob, DagNode *obNode) -{ - if (ob->soft) { -#ifdef WITH_LEGACY_DEPSGRAPH - /* Actual code uses ccd_build_deflector_hash */ - dag_add_collision_relations(forest, scene, ob, obNode, ob->soft->collision_group, ob->lay, eModifierType_Collision, NULL, false, "Softbody Collision"); - - dag_add_forcefield_relations(forest, scene, ob, obNode, ob->soft->effector_weights, true, 0, "Softbody Field"); -#else - (void)forest; - (void)scene; - (void)ob; - (void)obNode; -#endif - } -} - static void updateDepsgraph(ModifierData *UNUSED(md), struct Main *UNUSED(bmain), struct Scene *scene, @@ -89,7 +71,7 @@ static void updateDepsgraph(ModifierData *UNUSED(md), { if (ob->soft) { /* Actual code uses ccd_build_deflector_hash */ - DEG_add_collision_relations(node, scene, ob, ob->soft->collision_group, ob->lay, eModifierType_Collision, NULL, false, "Softbody Collision"); + DEG_add_collision_relations(node, scene, ob, ob->soft->collision_group, eModifierType_Collision, NULL, false, "Softbody Collision"); DEG_add_forcefield_relations(node, scene, ob, ob->soft->effector_weights, true, 0, "Softbody Field"); } @@ -116,7 +98,6 @@ ModifierTypeInfo modifierType_Softbody = { /* requiredDataMask */ NULL, /* freeData */ NULL, /* isDisabled */ NULL, - /* updateDepgraph */ updateDepgraph, /* updateDepsgraph */ updateDepsgraph, /* dependsOnTime */ dependsOnTime, /* dependsOnNormals */ NULL, |