Commit: 055123bd5841d1be8859f62f7a8617559200f521
Author: Antonio Vazquez
Date:   Thu Feb 22 16:03:34 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB055123bd5841d1be8859f62f7a8617559200f521

Depsgraph: Wrap all arguments for modifiers relations update into a struct

===================================================================

M       source/blender/modifiers/intern/MOD_gpencilhook.c
M       source/blender/modifiers/intern/MOD_gpencillattice.c
M       source/blender/modifiers/intern/MOD_gpencillight.c
M       source/blender/modifiers/intern/MOD_gpencilswirl.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_gpencilhook.c 
b/source/blender/modifiers/intern/MOD_gpencilhook.c
index 5c1319c9c5d..3f2c2efbad5 100644
--- a/source/blender/modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/modifiers/intern/MOD_gpencilhook.c
@@ -304,18 +304,14 @@ static bool isDisabled(ModifierData *md, int 
UNUSED(userRenderParams))
        return !mmd->object;
 }
 
-static void updateDepsgraph(ModifierData *md,
-                            struct Main *UNUSED(bmain),
-                            struct Scene *UNUSED(scene),
-                            Object *object,
-                            struct DepsNodeHandle *node)
+static void updateDepsgraph(ModifierData *md, const 
ModifierUpdateDepsgraphContext *ctx)
 {
        GpencilHookModifierData *lmd = (GpencilHookModifierData *)md;
        if (lmd->object != NULL) {
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Hook Modifier");
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Hook Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Hook Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Hook Modifier");
        }
-       DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, "Hook 
Modifier");
+       DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, 
"Hook Modifier");
 }
 
 static void foreachObjectLink(
diff --git a/source/blender/modifiers/intern/MOD_gpencillattice.c 
b/source/blender/modifiers/intern/MOD_gpencillattice.c
index 09b93888989..642d54ebb94 100644
--- a/source/blender/modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/modifiers/intern/MOD_gpencillattice.c
@@ -164,18 +164,14 @@ static bool isDisabled(ModifierData *md, int 
UNUSED(userRenderParams))
        return !mmd->object;
 }
 
-static void updateDepsgraph(ModifierData *md,
-                            struct Main *UNUSED(bmain),
-                            struct Scene *UNUSED(scene),
-                            Object *object,
-                            struct DepsNodeHandle *node)
+static void updateDepsgraph(ModifierData *md, const 
ModifierUpdateDepsgraphContext *ctx) 
 {
        GpencilLatticeModifierData *lmd = (GpencilLatticeModifierData *)md;
        if (lmd->object != NULL) {
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Lattice Modifier");
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Lattice Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Lattice Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Lattice Modifier");
        }
-       DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, "Lattice 
Modifier");
+       DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, 
"Lattice Modifier");
 }
 
 static void foreachObjectLink(
diff --git a/source/blender/modifiers/intern/MOD_gpencillight.c 
b/source/blender/modifiers/intern/MOD_gpencillight.c
index f6015a5fac8..f714ddc23cc 100644
--- a/source/blender/modifiers/intern/MOD_gpencillight.c
+++ b/source/blender/modifiers/intern/MOD_gpencillight.c
@@ -52,18 +52,14 @@ static void initData(ModifierData *md)
        gpmd->object = NULL;
 }
 
-static void updateDepsgraph(ModifierData *md,
-       struct Main *UNUSED(bmain),
-       struct Scene *UNUSED(scene),
-       Object *object,
-       struct DepsNodeHandle *node)
+static void updateDepsgraph(ModifierData *md, const 
ModifierUpdateDepsgraphContext *ctx)
 {
        GpencilLightModifierData *lmd = (GpencilLightModifierData *)md;
        if (lmd->object != NULL) {
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Light Modifier");
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Light Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Light Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Light Modifier");
        }
-       DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, "Light 
Modifier");
+       DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, 
"Light Modifier");
 }
 
 static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams))
diff --git a/source/blender/modifiers/intern/MOD_gpencilswirl.c 
b/source/blender/modifiers/intern/MOD_gpencilswirl.c
index 123b99e83a6..91ac0ed0a1e 100644
--- a/source/blender/modifiers/intern/MOD_gpencilswirl.c
+++ b/source/blender/modifiers/intern/MOD_gpencilswirl.c
@@ -51,18 +51,14 @@ static void initData(ModifierData *md)
        gpmd->angle = M_PI_2;
 }
 
-static void updateDepsgraph(ModifierData *md,
-       struct Main *UNUSED(bmain),
-       struct Scene *UNUSED(scene),
-       Object *object,
-       struct DepsNodeHandle *node)
+static void updateDepsgraph(ModifierData *md, const 
ModifierUpdateDepsgraphContext *ctx)
 {
        GpencilSwirlModifierData *lmd = (GpencilSwirlModifierData *)md;
        if (lmd->object != NULL) {
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Swirl Modifier");
-               DEG_add_object_relation(node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Swirl Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_GEOMETRY, "Swirl Modifier");
+               DEG_add_object_relation(ctx->node, lmd->object, 
DEG_OB_COMP_TRANSFORM, "Swirl Modifier");
        }
-       DEG_add_object_relation(node, object, DEG_OB_COMP_TRANSFORM, "Swirl 
Modifier");
+       DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, 
"Swirl Modifier");
 }
 
 static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams))

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to