From df045206021bdd448482f9d022f73029d28f7fc3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 22 Feb 2018 12:54:06 +0100 Subject: Depsgraph: Wrap all arguments foe modifiers relations update into a struct Makes it easier to add or remove fields needed to update relations. --- source/blender/modifiers/intern/MOD_screw.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_screw.c') diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 7896ea0a948..047b1d5c47d 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -1119,32 +1119,24 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } -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) { ScrewModifierData *ltmd = (ScrewModifierData *) md; if (ltmd->ob_axis) { - DagNode *curNode = dag_get_node(forest, ltmd->ob_axis); + DagNode *curNode = dag_get_node(ctx->forest, ltmd->ob_axis); - dag_add_relation(forest, curNode, obNode, + dag_add_relation(ctx->forest, curNode, ctx->obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Screw 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) { ScrewModifierData *ltmd = (ScrewModifierData *)md; if (ltmd->ob_axis != NULL) { - DEG_add_object_relation(node, ltmd->ob_axis, DEG_OB_COMP_TRANSFORM, "Screw Modifier"); + DEG_add_object_relation(ctx->node, ltmd->ob_axis, DEG_OB_COMP_TRANSFORM, "Screw Modifier"); } } -- cgit v1.2.3