Commit: 583e25c9d75b558af883e1f4ea44d86cd0374e3f
Author: Sergey Sharybin
Date:   Mon Mar 16 17:20:31 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB583e25c9d75b558af883e1f4ea44d86cd0374e3f

Depsgraph: Code cleanup, unused arguments

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

M       source/blender/blenkernel/intern/scene.c
M       source/blender/depsgraph/DEG_depsgraph.h
M       source/blender/depsgraph/intern/depsgraph_build.h
M       source/blender/depsgraph/intern/depsgraph_build_idusers.cpp
M       source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M       source/blender/depsgraph/intern/depsgraph_build_relations.cpp
M       source/blender/depsgraph/intern/depsgraph_debug.cpp
M       source/blender/depsgraph/intern/depsgraph_eval.cpp
M       source/blender/depsgraph/intern/depsgraph_query.cpp
M       source/blender/depsgraph/intern/depsgraph_tag.cpp
M       source/blender/depsgraph/intern/depsnode.cpp
M       source/blender/depsgraph/intern/depsnode.h
M       source/blender/depsgraph/intern/depsnode_component.cpp
M       source/blender/depsgraph/intern/depsnode_component.h

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

diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index 54c2695..5d976eb 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1714,7 +1714,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, 
Main *bmain, Scene *sc
         * only objects and scenes. - brecht */
 #ifdef WITH_LEGACY_DEPSGRAPH
        if (use_new_eval) {
-               DEG_evaluate_on_refresh(eval_ctx, bmain, scene->depsgraph, 
scene);
+               DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph, scene);
        }
        else {
                scene_update_tagged_recursive(eval_ctx, bmain, scene, scene);
diff --git a/source/blender/depsgraph/DEG_depsgraph.h 
b/source/blender/depsgraph/DEG_depsgraph.h
index 4e94af6..946899a 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -177,7 +177,6 @@ void DEG_evaluate_on_framechange(struct EvaluationContext 
*eval_ctx,
  * < layers: visible layers bitmask to update the graph for
  */
 void DEG_evaluate_on_refresh_ex(struct EvaluationContext *eval_ctx,
-                                struct Main *bmain,
                                 Depsgraph *graph,
                                 const int layers);
 
@@ -185,7 +184,6 @@ void DEG_evaluate_on_refresh_ex(struct EvaluationContext 
*eval_ctx,
  * < context_type: context to perform evaluation for
  */
 void DEG_evaluate_on_refresh(struct EvaluationContext *eval_ctx,
-                             struct Main *bmain,
                              Depsgraph *graph,
                              struct Scene *scene);
 
diff --git a/source/blender/depsgraph/intern/depsgraph_build.h 
b/source/blender/depsgraph/intern/depsgraph_build.h
index dbe2784..37309f0 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.h
+++ b/source/blender/depsgraph/intern/depsgraph_build.h
@@ -75,28 +75,26 @@ struct DepsgraphNodeBuilder {
                return add_operation_node(id, comp_type, "", optype, op, 
opcode, description);
        }
 
-       bool has_operation_node(ID *id, eDepsNode_Type comp_type, const string 
&comp_name, eDepsOperation_Type optype,
+       bool has_operation_node(ID *id, eDepsNode_Type comp_type, const string 
&comp_name,
                                eDepsOperation_Code opcode, const string 
&description = "");
 
        OperationDepsNode *find_operation_node(ID *id,
                                               eDepsNode_Type comp_type,
                                               const string &comp_name,
-                                              eDepsOperation_Type optype,
                                               eDepsOperation_Code opcode,
                                               const string &description = "");
 
        OperationDepsNode *find_operation_node(ID *id,
                                               eDepsNode_Type comp_type,
-                                              eDepsOperation_Type optype,
                                               eDepsOperation_Code opcode,
                                               const string &description = "")
        {
-               return find_operation_node(id, comp_type, "", optype, opcode, 
description);
+               return find_operation_node(id, comp_type, "", opcode, 
description);
        }
 
        void build_scene(Main *bmain, Scene *scene);
        SubgraphDepsNode *build_subgraph(Group *group);
-       void build_group(Scene *scene, Base *base, Object *object, Group 
*group);
+       void build_group(Scene *scene, Base *base, Group *group);
        void build_object(Scene *scene, Base *base, Object *ob);
        void build_object_transform(Scene *scene, Object *ob);
        void build_object_constraints(Scene *scene, Object *ob);
@@ -108,7 +106,7 @@ struct DepsgraphNodeBuilder {
        void build_ik_pose(Scene *scene, Object *ob, bPoseChannel *pchan, 
bConstraint *con);
        void build_splineik_pose(Scene *scene, Object *ob, bPoseChannel *pchan, 
bConstraint *con);
        void build_rig(Scene *scene, Object *ob);
-       void build_proxy_rig(Scene *scene, Object *ob);
+       void build_proxy_rig(Object *ob);
        void build_shapekeys(Key *key);
        void build_obdata_geom(Scene *scene, Object *ob);
        void build_camera(Object *ob);
@@ -258,13 +256,13 @@ struct DepsgraphRelationBuilder
                               ListBase *constraints, RootPChanMap *root_map);
        void build_animdata(ID *id);
        void build_driver(ID *id, FCurve *fcurve);
-       void build_world(Scene *scene, World *world);
+       void build_world(World *world);
        void build_rigidbody(Scene *scene);
        void build_particles(Scene *scene, Object *ob);
        void build_ik_pose(Object *ob, bPoseChannel *pchan, bConstraint *con, 
RootPChanMap *root_map);
        void build_splineik_pose(Object *ob, bPoseChannel *pchan, bConstraint 
*con, RootPChanMap *root_map);
        void build_rig(Scene *scene, Object *ob);
-       void build_proxy_rig(Scene *scene, Object *ob);
+       void build_proxy_rig(Object *ob);
        void build_shapekeys(ID *obdata, Key *key);
        void build_obdata_geom(Scene *scene, Object *ob);
        void build_camera(Object *ob);
diff --git a/source/blender/depsgraph/intern/depsgraph_build_idusers.cpp 
b/source/blender/depsgraph/intern/depsgraph_build_idusers.cpp
index d5faa1c..c756822 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_idusers.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_idusers.cpp
@@ -132,7 +132,7 @@ void DepsgraphIDUsersBuilder::add_relation(const ID 
*from_id, const ID *to_id,
        }
 }
 
-void DepsgraphIDUsersBuilder::build_scene(Main *bmain, Scene *scene)
+void DepsgraphIDUsersBuilder::build_scene(Main *UNUSED(bmain), Scene *scene)
 {
        /* scene set - do links to other scenes */
        if (scene->set) {
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp 
b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index c63371d..a5ad7cc 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -217,18 +217,16 @@ OperationDepsNode 
*DepsgraphNodeBuilder::add_operation_node(
 bool DepsgraphNodeBuilder::has_operation_node(ID *id,
                                               eDepsNode_Type comp_type,
                                               const string &comp_name,
-                                              eDepsOperation_Type optype,
                                               eDepsOperation_Code opcode,
                                               const string &description)
 {
-       return find_operation_node(id, comp_type, comp_name, optype, opcode, 
description) != NULL;
+       return find_operation_node(id, comp_type, comp_name, opcode, 
description) != NULL;
 }
 
 OperationDepsNode *DepsgraphNodeBuilder::find_operation_node(
         ID *id,
         eDepsNode_Type comp_type,
         const string &comp_name,
-        eDepsOperation_Type optype,
         eDepsOperation_Code opcode,
         const string &description)
 {
@@ -276,7 +274,7 @@ void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene 
*scene)
 
                /* Object dupligroup. */
                if (ob->dup_group) {
-                       build_group(scene, base, ob, ob->dup_group);
+                       build_group(scene, base, ob->dup_group);
                }
        }
 
@@ -311,7 +309,6 @@ void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene 
*scene)
 
 void DepsgraphNodeBuilder::build_group(Scene *scene,
                                        Base *base,
-                                       Object *object,
                                        Group *group)
 {
        ID *group_id = &group->id;
@@ -404,7 +401,7 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base 
*base, Object *ob)
 
                        case OB_ARMATURE: /* Pose */
                                if (ob->id.lib != NULL && ob->proxy_from != 
NULL) {
-                                       build_proxy_rig(scene, ob);
+                                       build_proxy_rig(ob);
                                }
                                else {
                                        build_rig(scene, ob);
@@ -559,7 +556,6 @@ OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID 
*id, FCurve *fcu)
         */
        OperationDepsNode *driver_op = find_operation_node(id,
                                                           
DEPSNODE_TYPE_PARAMETERS,
-                                                          DEPSOP_TYPE_EXEC,
                                                           DEG_OPCODE_DRIVER,
                                                           
deg_fcurve_id_name(fcu));
 
@@ -703,7 +699,7 @@ void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, 
Object *ob, bPoseChannel
        bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
 
        if (has_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
-                              DEPSOP_TYPE_SIM, DEG_OPCODE_POSE_IK_SOLVER))
+                              DEG_OPCODE_POSE_IK_SOLVER))
        {
                return;
        }
@@ -829,7 +825,7 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object 
*ob)
        }
 }
 
-void DepsgraphNodeBuilder::build_proxy_rig(Scene *scene, Object *ob)
+void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
 {
        add_operation_node(&ob->id,
                           DEPSNODE_TYPE_EVAL_POSE,
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp 
b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
index 32a2f1f..e53b88a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
@@ -125,6 +125,8 @@ 
DepsgraphRelationBuilder::DepsgraphRelationBuilder(Depsgraph *graph) :
 
 RootDepsNode *DepsgraphRelationBuilder::find_node(const RootKey &key) const
 {
+       (void)key;
+       BLI_assert(!"Doesn't seem to be correct");
        return m_graph->root_node;
 }
 
@@ -264,7 +266,7 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, 
Scene *scene)
 
        /* world */
        if (scene->world) {
-               build_world(scene, scene->world);
+               build_world(scene->world);
        }
 
        /* compo nodes */
@@ -388,7 +390,7 @@ void DepsgraphRelationBuilder::build_object(Scene *scene, 
Object *ob)
 
                        case OB_ARMATURE: /* Pose */
                                if (ob->id.lib != NULL && ob->proxy_from != 
NULL) {
-                                       build_proxy_rig(scene, ob);
+                                       build_proxy_rig(ob);
                                }
                                else {
                                        build_rig(scene, ob);
@@ -853,7 +855,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve 
*fcu)
        }
 }
 
-void DepsgraphRelationBuilder::build_world(Scene *scene, World *world)
+void DepsgraphRelationBuilder::build_world(World *world)
 {
        ID *world_id = &world->id;
        if (world_id->flag & LIB_DOIT) {
@@ -1403,7 +1405,7 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, 
Object *ob)
 

@@ Diff output truncated at 10240 characters. @@

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

Reply via email to