Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 14:54:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 14:54:06 +0300
commitdf045206021bdd448482f9d022f73029d28f7fc3 (patch)
treeb2246d23a94c05967811a67a366671254736864b /source/blender/modifiers/intern/MOD_screw.c
parent93072e44d11efe9528d2bb7a3a62784331bf0a08 (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_screw.c')
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c18
1 files changed, 5 insertions, 13 deletions
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");
}
}