diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-22 14:54:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-22 14:54:06 +0300 |
commit | df045206021bdd448482f9d022f73029d28f7fc3 (patch) | |
tree | b2246d23a94c05967811a67a366671254736864b /source/blender/modifiers/intern/MOD_meshdeform.c | |
parent | 93072e44d11efe9528d2bb7a3a62784331bf0a08 (diff) |
Depsgraph: Wrap all arguments foe modifiers relations update into a struct
Makes it easier to add or remove fields needed to update relations.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_meshdeform.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 99f0c892a3f..c125495a234 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -122,33 +122,25 @@ 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) +static void updateDepgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) { MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; if (mmd->object) { - DagNode *curNode = dag_get_node(forest, mmd->object); + DagNode *curNode = dag_get_node(ctx->forest, mmd->object); - dag_add_relation(forest, curNode, obNode, + dag_add_relation(ctx->forest, curNode, ctx->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), - Object *UNUSED(ob), - struct DepsNodeHandle *node) +static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) { MeshDeformModifierData *mmd = (MeshDeformModifierData *)md; if (mmd->object != NULL) { /* TODO(sergey): Do we need transform component here? */ - DEG_add_object_relation(node, mmd->object, DEG_OB_COMP_GEOMETRY, "Mesh Deform Modifier"); + DEG_add_object_relation(ctx->node, mmd->object, DEG_OB_COMP_GEOMETRY, "Mesh Deform Modifier"); } } |