Commit: df7d38c11127cc1ab84c32db645c72b870fe1a40
Author: Sergey Sharybin
Date:   Thu Jun 1 16:15:23 2017 +0200
Branches: master
https://developer.blender.org/rBdf7d38c11127cc1ab84c32db645c72b870fe1a40

Depsgraph: Remove operation types enum

Was only used to indicate entry/exit operation of component,
which is now done explicitly. No reason to keep something which
is unused and confusing.

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

M       source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M       source/blender/depsgraph/intern/builder/deg_builder_nodes.h
M       source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
M       source/blender/depsgraph/intern/depsgraph_types.h
M       source/blender/depsgraph/intern/nodes/deg_node_component.cc
M       source/blender/depsgraph/intern/nodes/deg_node_component.h
M       source/blender/depsgraph/intern/nodes/deg_node_operation.h

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc 
b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 78d0b2b323e..1e51b8131e4 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -193,7 +193,6 @@ ComponentDepsNode *DepsgraphNodeBuilder::add_component_node(
 
 OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
         ComponentDepsNode *comp_node,
-        eDepsOperation_Type optype,
         DepsEvalOperationCb op,
         eDepsOperation_Code opcode,
         const char *name,
@@ -203,7 +202,7 @@ OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
                                                              name,
                                                              name_tag);
        if (op_node == NULL) {
-               op_node = comp_node->add_operation(optype, op, opcode, name, 
name_tag);
+               op_node = comp_node->add_operation(op, opcode, name, name_tag);
                m_graph->operations.push_back(op_node);
        }
        else {
@@ -221,20 +220,18 @@ OperationDepsNode 
*DepsgraphNodeBuilder::add_operation_node(
         ID *id,
         eDepsNode_Type comp_type,
         const char *comp_name,
-        eDepsOperation_Type optype,
         DepsEvalOperationCb op,
         eDepsOperation_Code opcode,
         const char *name,
         int name_tag)
 {
        ComponentDepsNode *comp_node = add_component_node(id, comp_type, 
comp_name);
-       return add_operation_node(comp_node, optype, op, opcode, name, 
name_tag);
+       return add_operation_node(comp_node, op, opcode, name, name_tag);
 }
 
 OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
         ID *id,
         eDepsNode_Type comp_type,
-        eDepsOperation_Type optype,
         DepsEvalOperationCb op,
         eDepsOperation_Code opcode,
         const char *name,
@@ -243,7 +240,6 @@ OperationDepsNode *DepsgraphNodeBuilder::add_operation_node(
        return add_operation_node(id,
                                  comp_type,
                                  "",
-                                 optype,
                                  op,
                                  opcode,
                                  name,
@@ -450,14 +446,14 @@ void DepsgraphNodeBuilder::build_object_transform(Scene 
*scene, Object *ob)
 
        /* local transforms (from transform channels - loc/rot/scale + deltas) 
*/
        op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          DEPSOP_TYPE_INIT, 
function_bind(BKE_object_eval_local_transform, _1, scene, ob),
+                          function_bind(BKE_object_eval_local_transform, _1, 
scene, ob),
                           DEG_OPCODE_TRANSFORM_LOCAL);
        op_node->set_as_entry();
 
        /* object parent */
        if (ob->parent) {
                add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                  DEPSOP_TYPE_EXEC, 
function_bind(BKE_object_eval_parent, _1, scene, ob),
+                                  function_bind(BKE_object_eval_parent, _1, 
scene, ob),
                                   DEG_OPCODE_TRANSFORM_PARENT);
        }
 
@@ -474,13 +470,13 @@ void DepsgraphNodeBuilder::build_object_transform(Scene 
*scene, Object *ob)
         * TODO(sergey): Get rid of this node.
         */
        add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          DEPSOP_TYPE_EXEC, 
function_bind(BKE_object_eval_uber_transform, _1, scene, ob),
+                          function_bind(BKE_object_eval_uber_transform, _1, 
scene, ob),
                           DEG_OPCODE_OBJECT_UBEREVAL);
 
        /* object transform is done */
        op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          DEPSOP_TYPE_POST, 
function_bind(BKE_object_eval_done, _1, ob),
-                          DEG_OPCODE_TRANSFORM_FINAL);
+                                    function_bind(BKE_object_eval_done, _1, 
ob),
+                                    DEG_OPCODE_TRANSFORM_FINAL);
        op_node->set_as_exit();
 }
 
@@ -505,7 +501,7 @@ void DepsgraphNodeBuilder::build_object_constraints(Scene 
*scene, Object *ob)
 {
        /* create node for constraint stack */
        add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          DEPSOP_TYPE_EXEC, 
function_bind(BKE_object_eval_constraints, _1, scene, ob),
+                          function_bind(BKE_object_eval_constraints, _1, 
scene, ob),
                           DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 }
 
@@ -528,7 +524,7 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
                if ((adt->action) || (adt->nla_tracks.first)) {
                        /* create the node */
                        add_operation_node(id, DEG_NODE_TYPE_ANIMATION,
-                                          DEPSOP_TYPE_EXEC, 
function_bind(BKE_animsys_eval_animdata, _1, id),
+                                          
function_bind(BKE_animsys_eval_animdata, _1, id),
                                           DEG_OPCODE_ANIMATION, id->name);
 
                        // TODO: for each channel affected, we might also want 
to add some support for running RNA update callbacks on them
@@ -566,7 +562,6 @@ OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID 
*id, FCurve *fcu)
        if (driver_op == NULL) {
                driver_op = add_operation_node(id,
                                               DEG_NODE_TYPE_PARAMETERS,
-                                              DEPSOP_TYPE_EXEC,
                                               
function_bind(BKE_animsys_eval_driver, _1, id, fcu),
                                               DEG_OPCODE_DRIVER,
                                               fcu->rna_path ? fcu->rna_path : 
"",
@@ -595,7 +590,7 @@ void DepsgraphNodeBuilder::build_world(World *world)
        /* world itself */
        add_component_node(world_id, DEG_NODE_TYPE_PARAMETERS);
 
-       add_operation_node(world_id, DEG_NODE_TYPE_PARAMETERS, 
DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(world_id, DEG_NODE_TYPE_PARAMETERS, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
 
        /* textures */
@@ -632,13 +627,13 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
 
        /* init/rebuild operation */
        /*OperationDepsNode *init_node =*/ add_operation_node(&scene->id, 
DEG_NODE_TYPE_TRANSFORM,
-                                                             
DEPSOP_TYPE_REBUILD, function_bind(BKE_rigidbody_rebuild_sim, _1, scene),
+                                                             
function_bind(BKE_rigidbody_rebuild_sim, _1, scene),
                                                              
DEG_OPCODE_RIGIDBODY_REBUILD);
 
        /* do-sim operation */
        // XXX: what happens if we need to split into several groups?
        OperationDepsNode *sim_node     = add_operation_node(&scene->id, 
DEG_NODE_TYPE_TRANSFORM,
-                                                            DEPSOP_TYPE_SIM, 
function_bind(BKE_rigidbody_eval_simulation, _1, scene),
+                                                            
function_bind(BKE_rigidbody_eval_simulation, _1, scene),
                                                             
DEG_OPCODE_RIGIDBODY_SIM);
 
        /* XXX: For now, the sim node is the only one that really matters here. 
If any other
@@ -659,7 +654,7 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
                        /* 2) create operation for flushing results */
                        /* object's transform component - where the rigidbody 
operation lives */
                        add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                          DEPSOP_TYPE_EXEC, 
function_bind(BKE_rigidbody_object_sync_transforms, _1, scene, ob),
+                                          
function_bind(BKE_rigidbody_object_sync_transforms, _1, scene, ob),
                                           DEG_OPCODE_TRANSFORM_RIGIDBODY);
                }
        }
@@ -697,7 +692,6 @@ void DepsgraphNodeBuilder::build_particles(Scene *scene, 
Object *ob)
                /* this particle system */
                // TODO: for now, this will just be a placeholder "ubereval" 
node
                add_operation_node(psys_comp,
-                                  DEPSOP_TYPE_EXEC,
                                   function_bind(BKE_particle_system_eval,
                                                 _1,
                                                 scene,
@@ -716,7 +710,6 @@ void DepsgraphNodeBuilder::build_cloth(Scene *scene, Object 
*object)
        ComponentDepsNode *cache_comp = add_component_node(&object->id,
                                                           DEG_NODE_TYPE_CACHE);
        add_operation_node(cache_comp,
-                          DEPSOP_TYPE_EXEC,
                           function_bind(BKE_object_eval_cloth,
                                         _1,
                                         scene,
@@ -730,7 +723,7 @@ void DepsgraphNodeBuilder::build_shapekeys(Key *key)
 {
        build_animdata(&key->id);
 
-       add_operation_node(&key->id, DEG_NODE_TYPE_GEOMETRY, DEPSOP_TYPE_EXEC, 
NULL,
+       add_operation_node(&key->id, DEG_NODE_TYPE_GEOMETRY, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Shapekey Eval");
 }
 
@@ -748,7 +741,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, 
Object *ob)
         */
        op_node = add_operation_node(&ob->id,
                           DEG_NODE_TYPE_PARAMETERS,
-                          DEPSOP_TYPE_POST,
                           NULL,
                           DEG_OPCODE_PLACEHOLDER,
                           "Parameters Eval");
@@ -763,14 +755,12 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene 
*scene, Object *ob)
         */
        op_node = add_operation_node(&ob->id,
                           DEG_NODE_TYPE_GEOMETRY,
-                          DEPSOP_TYPE_POST,
                           function_bind(BKE_object_eval_uber_data, _1, scene, 
ob),
                           DEG_OPCODE_GEOMETRY_UBEREVAL);
        op_node->set_as_exit();
 
        op_node = add_operation_node(&ob->id,
                           DEG_NODE_TYPE_GEOMETRY,
-                          DEPSOP_TYPE_INIT,
                           NULL,
                           DEG_OPCODE_PLACEHOLDER,
                           "Eval Init");
@@ -782,7 +772,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, 
Object *ob)
        LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
                add_operation_node(&ob->id,
                                   DEG_NODE_TYPE_GEOMETRY,
-                                  DEPSOP_TYPE_EXEC,
                                   function_bind(BKE_object_eval_modifier,
                                                 _1,
                                                 scene,
@@ -831,7 +820,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, 
Object *ob)
                        /* evaluation operations */
                        op_node = add_operation_node(obdata,
                                           DEG_NODE_TYPE_GEOMETRY,
-                                          DEPSOP_TYPE_INIT,
                                           function_bind(BKE_mesh_eval_geometry,
                                                         _1,
                                        

@@ Diff output truncated at 10240 characters. @@

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

Reply via email to