Commit: 218b06eb83a0107bfd23546c135fd492609d7b8b
Author: Sergey Sharybin
Date:   Tue Jan 24 12:49:23 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB218b06eb83a0107bfd23546c135fd492609d7b8b

Depsgraph: Remove legacy updateDepgraph callbacks from modifiers

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

M       source/blender/blenkernel/BKE_modifier.h
M       source/blender/modifiers/CMakeLists.txt
M       source/blender/modifiers/intern/MOD_armature.c
M       source/blender/modifiers/intern/MOD_array.c
M       source/blender/modifiers/intern/MOD_bevel.c
M       source/blender/modifiers/intern/MOD_boolean.c
M       source/blender/modifiers/intern/MOD_build.c
M       source/blender/modifiers/intern/MOD_cast.c
M       source/blender/modifiers/intern/MOD_cloth.c
M       source/blender/modifiers/intern/MOD_collision.c
M       source/blender/modifiers/intern/MOD_correctivesmooth.c
M       source/blender/modifiers/intern/MOD_curve.c
M       source/blender/modifiers/intern/MOD_datatransfer.c
M       source/blender/modifiers/intern/MOD_decimate.c
M       source/blender/modifiers/intern/MOD_displace.c
M       source/blender/modifiers/intern/MOD_dynamicpaint.c
M       source/blender/modifiers/intern/MOD_edgesplit.c
M       source/blender/modifiers/intern/MOD_explode.c
M       source/blender/modifiers/intern/MOD_fluidsim.c
M       source/blender/modifiers/intern/MOD_hook.c
M       source/blender/modifiers/intern/MOD_laplaciandeform.c
M       source/blender/modifiers/intern/MOD_laplaciansmooth.c
M       source/blender/modifiers/intern/MOD_lattice.c
M       source/blender/modifiers/intern/MOD_mask.c
M       source/blender/modifiers/intern/MOD_meshcache.c
M       source/blender/modifiers/intern/MOD_meshdeform.c
M       source/blender/modifiers/intern/MOD_meshsequencecache.c
M       source/blender/modifiers/intern/MOD_mirror.c
M       source/blender/modifiers/intern/MOD_multires.c
M       source/blender/modifiers/intern/MOD_none.c
M       source/blender/modifiers/intern/MOD_normal_edit.c
M       source/blender/modifiers/intern/MOD_ocean.c
M       source/blender/modifiers/intern/MOD_particleinstance.c
M       source/blender/modifiers/intern/MOD_particlesystem.c
M       source/blender/modifiers/intern/MOD_remesh.c
M       source/blender/modifiers/intern/MOD_screw.c
M       source/blender/modifiers/intern/MOD_shapekey.c
M       source/blender/modifiers/intern/MOD_shrinkwrap.c
M       source/blender/modifiers/intern/MOD_simpledeform.c
M       source/blender/modifiers/intern/MOD_skin.c
M       source/blender/modifiers/intern/MOD_smoke.c
M       source/blender/modifiers/intern/MOD_smooth.c
M       source/blender/modifiers/intern/MOD_softbody.c
M       source/blender/modifiers/intern/MOD_solidify.c
M       source/blender/modifiers/intern/MOD_subsurf.c
M       source/blender/modifiers/intern/MOD_surface.c
M       source/blender/modifiers/intern/MOD_triangulate.c
M       source/blender/modifiers/intern/MOD_uvproject.c
M       source/blender/modifiers/intern/MOD_uvwarp.c
M       source/blender/modifiers/intern/MOD_warp.c
M       source/blender/modifiers/intern/MOD_wave.c
M       source/blender/modifiers/intern/MOD_weightvgedit.c
M       source/blender/modifiers/intern/MOD_weightvgmix.c
M       source/blender/modifiers/intern/MOD_weightvgproximity.c
M       source/blender/modifiers/intern/MOD_wireframe.c

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

diff --git a/source/blender/blenkernel/BKE_modifier.h 
b/source/blender/blenkernel/BKE_modifier.h
index f6c08909d2..06321700dc 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -260,15 +260,6 @@ typedef struct ModifierTypeInfo {
         */
        bool (*isDisabled)(struct ModifierData *md, int userRenderParams);
 
-       /* Add the appropriate relations to the DEP graph depending on the
-        * modifier data. 
-        *
-        * This function is optional.
-        */
-       void (*updateDepgraph)(struct ModifierData *md, struct DagForest 
*forest,
-                              struct Main *bmain, struct Scene *scene,
-                              struct Object *ob, struct DagNode *obNode);
-
        /* Add the appropriate relations to the dependency graph.
         *
         * This function is optional.
diff --git a/source/blender/modifiers/CMakeLists.txt 
b/source/blender/modifiers/CMakeLists.txt
index bacfc17743..b8ebb375a4 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -113,10 +113,6 @@ set(SRC
        intern/MOD_weightvg_util.h
 )
 
-if(WITH_LEGACY_DEPSGRAPH)
-       add_definitions(-DWITH_LEGACY_DEPSGRAPH)
-endif()
-
 if(WITH_ALEMBIC)
        add_definitions(-DWITH_ALEMBIC)
        list(APPEND INC
diff --git a/source/blender/modifiers/intern/MOD_armature.c 
b/source/blender/modifiers/intern/MOD_armature.c
index 567505ea45..8efa4d6367 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -99,22 +99,6 @@ static void foreachObjectLink(
        walk(userData, ob, &amd->object, IDWALK_NOP);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest,
-                           struct Main *UNUSED(bmain),
-                           struct Scene *UNUSED(scene),
-                           Object *UNUSED(ob),
-                           DagNode *obNode)
-{
-       ArmatureModifierData *amd = (ArmatureModifierData *) md;
-
-       if (amd->object) {
-               DagNode *curNode = dag_get_node(forest, amd->object);
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Armature 
Modifier");
-       }
-}
-
 static void updateDepsgraph(ModifierData *md,
                             struct Main *UNUSED(bmain),
                             struct Scene *UNUSED(scene),
@@ -221,7 +205,6 @@ ModifierTypeInfo modifierType_Armature = {
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    updateDepgraph,
        /* updateDepsgraph */   updateDepsgraph,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_array.c 
b/source/blender/modifiers/intern/MOD_array.c
index b049457e64..6017f964c2 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -101,40 +101,6 @@ static void foreachObjectLink(
        walk(userData, ob, &amd->offset_ob, IDWALK_NOP);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest,
-                           struct Main *UNUSED(bmain),
-                           struct Scene *UNUSED(scene),
-                           Object *UNUSED(ob), DagNode *obNode)
-{
-       ArrayModifierData *amd = (ArrayModifierData *) md;
-
-       if (amd->start_cap) {
-               DagNode *curNode = dag_get_node(forest, amd->start_cap);
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array 
Modifier");
-       }
-       if (amd->end_cap) {
-               DagNode *curNode = dag_get_node(forest, amd->end_cap);
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array 
Modifier");
-       }
-       if (amd->curve_ob) {
-               DagNode *curNode = dag_get_node(forest, amd->curve_ob);
-               curNode->eval_flags |= DAG_EVAL_NEED_CURVE_PATH;
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array 
Modifier");
-       }
-       if (amd->offset_ob) {
-               DagNode *curNode = dag_get_node(forest, amd->offset_ob);
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array 
Modifier");
-       }
-}
-
 static void updateDepsgraph(ModifierData *md,
                             struct Main *UNUSED(bmain),
                             struct Scene *scene,
@@ -797,7 +763,6 @@ ModifierTypeInfo modifierType_Array = {
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
        /* isDisabled */        NULL,
-       /* updateDepgraph */    updateDepgraph,
        /* updateDepsgraph */   updateDepsgraph,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_bevel.c 
b/source/blender/modifiers/intern/MOD_bevel.c
index 5874029ae0..17b0cd4d7f 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -213,7 +213,6 @@ ModifierTypeInfo modifierType_Bevel = {
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
        /* isDisabled */        NULL,
-       /* updateDepgraph */    NULL,
        /* updateDepsgraph */   NULL,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  dependsOnNormals,
diff --git a/source/blender/modifiers/intern/MOD_boolean.c 
b/source/blender/modifiers/intern/MOD_boolean.c
index da0f5aa392..d2f19b78b5 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -104,22 +104,6 @@ static void foreachObjectLink(
        walk(userData, ob, &bmd->object, IDWALK_NOP);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest,
-                           struct Main *UNUSED(bmain),
-                           struct Scene *UNUSED(scene),
-                           Object *UNUSED(ob),
-                           DagNode *obNode)
-{
-       BooleanModifierData *bmd = (BooleanModifierData *) md;
-
-       if (bmd->object) {
-               DagNode *curNode = dag_get_node(forest, bmd->object);
-
-               dag_add_relation(forest, curNode, obNode,
-                                DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Boolean 
Modifier");
-       }
-}
-
 static void updateDepsgraph(ModifierData *md,
                             struct Main *UNUSED(bmain),
                             struct Scene *UNUSED(scene),
@@ -459,7 +443,6 @@ ModifierTypeInfo modifierType_Boolean = {
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    updateDepgraph,
        /* updateDepsgraph */   updateDepsgraph,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_build.c 
b/source/blender/modifiers/intern/MOD_build.c
index a364eef297..d2467a8fc4 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -322,7 +322,6 @@ ModifierTypeInfo modifierType_Build = {
        /* requiredDataMask */  NULL,
        /* freeData */          NULL,
        /* isDisabled */        NULL,
-       /* updateDepgraph */    NULL,
        /* updateDepsgraph */   NULL,
        /* dependsOnTime */     dependsOnTime,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_cast.c 
b/source/blender/modifiers/intern/MOD_cast.c
index 2fe2773037..16c5de45c4 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -105,22 +105,6 @@ static void foreachObjectLink(
        walk(userData, ob, &cmd->object, IDWALK_NOP);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest,
-                           struct Main *UNUSED(bmain),
-                           struct Scene *UNUSED(scene),
-                           Object *UNUSED(ob),
-                           DagNode *obNode)
-{
-       CastModifierData *cmd = (CastModifierData *) md;
-
-       if (cmd->object) {
-               DagNode *curNode = dag_get_node(forest, cmd->object);
-
-               dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA,
-                                "Cast Modifier");
-       }
-}
-
 static void updateDepsgraph(ModifierData *md,
                             struct Main *UNUSED(bmain),
                             struct Scene *UNUSED(scene),
@@ -513,7 +497,6 @@ ModifierTypeInfo modifierType_Cast = {
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          NULL,
        /* isDisabled */        isDisabled,
-       /* updateDepgraph */    updateDepgraph,
        /* updateDepsgraph */   updateDepsgraph,
        /* dependsOnTime */     NULL,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_cloth.c 
b/source/blender/modifiers/intern/MOD_cloth.c
index ac75b4dbee..b6a7b5b57e 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -117,26 +117,6 @@ static void deformVerts(ModifierData *md, Object *ob, 
DerivedMesh *derivedData,
        dm->release(dm);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest,
-                           struct Main *UNUSED(bmain),
-                           Scene *scene, Object *ob, DagNode *obNode)
-{
-       ClothModifierData *clmd = (ClothModifierData *) md;
-       
-       if (clmd) {
-               /* Actual code uses get_collisionobjects */
-#ifdef WITH_LEGACY_DEPSGRAPH
-               dag_add_collision_relations(forest, scene, ob, obNode, 
clmd->coll_parms->group, ob->lay|scene->lay, eModifierType_Collision, NULL, 
true, "Cloth Collision");
-               dag_add_forcefield_relations(forest, scene, ob, obNode, 
clmd->sim_parms->effector_weights, true, 0, "Cloth Field");
-#else
-       (void)forest;
-       (void)scene;
-       (void)ob;
-       (void)obNode;
-#endif
-       }
-}
-
 static void updateDepsgraph(ModifierData *md,
                             struct Main *UNUSED(bmain),
                             struct Scene *scene,
@@ -262,7 +242,6 @@ ModifierTypeInfo modifierType_Cloth = {
        /* requiredDataMask */  requiredDataMask,
        /* freeData */          freeData,
        /* isDisabled */        NULL,
-       /* updateDepgraph */    updateDepgraph,
        /* updateDepsgraph */   updateDepsgraph,
        /* dependsOnTime */     dependsOnTime,
        /* dependsOnNormals */  NULL,
diff --git a/source/blender/modifiers/intern/MOD_collision.c 
b/source/blender/modifiers/intern/MOD_collision.c
index e7ff0a90fb..a2a4b2e127 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -265,7 +265,

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to