From df7d38c11127cc1ab84c32db645c72b870fe1a40 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 1 Jun 2017 16:15:23 +0200 Subject: [PATCH] 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. --- .../intern/builder/deg_builder_nodes.cc | 70 +++++++------------ .../intern/builder/deg_builder_nodes.h | 3 - .../intern/builder/deg_builder_nodes_rig.cc | 48 ++++++------- .../depsgraph/intern/depsgraph_types.h | 26 ------- .../intern/nodes/deg_node_component.cc | 4 +- .../intern/nodes/deg_node_component.h | 3 +- .../intern/nodes/deg_node_operation.h | 3 - 7 files changed, 47 insertions(+), 110 deletions(-) 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, (Mesh *)obdata), @@ -851,7 +839,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) /* NOTE: only the motherball gets evaluated! */ op_node = add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, - DEPSOP_TYPE_INIT, function_bind(BKE_mball_eval_geometry, _1, (MetaBall *)obdata), @@ -870,7 +857,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) /* - calculate curve geometry (including path) */ op_node = add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, - DEPSOP_TYPE_INIT, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata), @@ -882,7 +868,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) if (ELEM(ob->type, OB_CURVE, OB_FONT)) { add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, - DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_path, _1, (Curve *)obdata), @@ -911,7 +896,6 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) /* Lattice evaluation operations. */ op_node = add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, - DEPSOP_TYPE_INIT, function_bind(BKE_lattice_eval_geometry, _1, (Lattice *)obdata), @@ -922,13 +906,12 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) } } - op_node = add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, - DEPSOP_TYPE_POST, NULL, - DEG_OPCODE_PLACEHOLDER, "Eval Done"); + op_node = add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY, NULL, + DEG_OPCODE_PLACEHOLDER, "Eval Done"); op_node->set_as_exit(); /* Parameters for driver sources. */ - add_operation_node(obdata, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL, + add_operation_node(obdata, DEG_NODE_TYPE_PARAMETERS, NULL, DEG_OPCODE_PLACEHOLDER, "Parameters Eval"); } @@ -944,15 +927,13 @@ void DepsgraphNodeBuilder::build_camera(Object *ob) build_animdata(&cam->id); - add_operation_node(camera_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL, + add_operation_node(camera_id, DEG_NODE_TYPE_PARAMETERS, NULL, DEG_OPCODE_PLACEHOLDER, "Parameters Eval"); if (cam->dof_ob != NULL) { /* TODO(sergey): For now parametrs are on object level. */ - add_operation_node(&ob->id, DEG_NODE_TYPE_PARAMETERS, - DEPSOP_TYPE_EXEC, NULL, - DEG_OPCODE_PLACEHOLDER, - "Camera DOF"); + add_operation_node(&ob->id, DEG_NODE_TYPE_PARAMETERS, NULL, + DEG_OPCODE_PLACEHOLDER, "Camera DOF"); } } @@ -971,7 +952,7 @@ void DepsgraphNodeBuilder::build_lamp(Object *ob) add_component_node(lamp_id, DEG_NODE_TYPE_PARAMETERS); /* TODO(sergey): Is it really how we're supposed to work with drivers? */ - add_operation_node(lamp_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL, + add_operation_node(lamp_id, DEG_NODE_TYPE_PARAMETERS, NULL, DEG_OPCODE_PLACEHOLDER, "Parameters Eval"); /* lamp's nodetree */ @@ -995,7 +976,7 @@ void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree) build_animdata(ntree_id); /* Parameters for drivers. */ - op_node = add_operation_node(ntree_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_POST, NULL, + op_node = add_operation_node(ntree_id, DEG_NODE_TYPE_PARAMETERS, NULL, DEG_OPCODE_PLACEHOLDER, "Parameters Eval"); op_node->set_as_exit(); @@ -1036,8 +1017,7 @@ void DepsgraphNodeBuilder::build_material(Material *ma) /* material itself */ add_id_node(ma_id); - add_operation_node(ma_id, DEG_NODE_TYPE_SHADING, - DEPSOP_TYPE_EXEC, NULL, + add_operation_node(ma_id, DEG_NODE_TYPE_SHADING, NULL, DEG_OPCODE_PLACEHOLDER, "Material Update"); /* material animation */ @@ -1094,7 +1074,6 @@ void DepsgraphNodeBuilder::build_image(Image *image) { /* Placeholder so we can add relations and tag ID node for update. */ add_operation_node(image_id, DEG_NODE_TYPE_PARAMETERS, - DEPSOP_TYPE_EXEC, NULL, DEG_OPCODE_PLACEHOLDER, "Image Eval"); @@ -1131,8 +1110,7 @@ void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file) ID *cache_file_id = &cache_file->id; add_component_node(cache_file_id, DEG_NODE_TYPE_CACHE); - add_operation_node(cache_file_id, DEG_NODE_TYPE_CACHE, - DEPSOP_TYPE_EXEC, NULL, + add_operation_node(cache_file_id, DEG_NODE_TYPE_CACHE, NULL, DEG_OPCODE_PLACEHOLDER, "Cache File Update"); add_id_node(cache_file_id); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index 5774d8b6aed..ba8a5d01cb0 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -82,7 +82,6 @@ struct DepsgraphNodeBuilder { const char *comp_name = ""); OperationDepsNode *add_operation_node(ComponentDepsNode *comp_node, - eDepsOperation_Type optype, DepsEvalOperationCb op, eDepsOperation_Code opcode, const char *name = "", @@ -90,14 +89,12 @@ struct DepsgraphNodeBuilder { OperationDepsNode *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 = -1); OperationDepsNode *add_operation_node(ID *id, eDepsNode_Type comp_type, - eDepsOperation_Type optype, DepsEvalOperationCb op, eDepsOperation_Code opcode, const char *name = "", diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index 00b9ef8bf6a..7ab52c1fd07 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -68,7 +68,6 @@ void DepsgraphNodeBuilder::build_pose_constraints(Scene *scene, Object *ob, bPos { /* create node for constraint stack */ add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_EXEC, function_bind(BKE_pose_constraints_evaluate, _1, scene, ob, pchan), DEG_OPCODE_BONE_CONSTRAINTS); } @@ -89,7 +88,7 @@ void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, Object *ob, bPoseChannel /* Operation node for evaluating/running IK Solver. */ add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, - DEPSOP_TYPE_SIM, function_bind(BKE_pose_iktree_evaluate, _1, scene, ob, rootchan), + function_bind(BKE_pose_iktree_evaluate, _1, scene, ob, rootchan), DEG_OPCODE_POSE_IK_SOLVER); } @@ -105,7 +104,7 @@ void DepsgraphNodeBuilder::build_splineik_pose(Scene *scene, Object *ob, bPoseCh * Store the "root bone" of this chain in the solver, so it knows where to start. */ add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, - DEPSOP_TYPE_SIM, function_bind(BKE_pose_splineik_evaluate, _1, scene, ob, rootchan), + function_bind(BKE_pose_splineik_evaluate, _1, scene, ob, rootchan), DEG_OPCODE_POSE_SPLINE_IK_SOLVER); } @@ -127,7 +126,6 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob) /* Make sure pose is up-to-date with armature updates. */ add_operation_node(&arm->id, DEG_NODE_TYPE_PARAMETERS, - DEPSOP_TYPE_EXEC, NULL, DEG_OPCODE_PLACEHOLDER, "Armature Eval"); @@ -176,33 +174,36 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob) */ /* pose eval context */ - op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, - DEPSOP_TYPE_INIT, function_bind(BKE_pose_eval_init, _1, scene, ob, ob->pose), DEG_OPCODE_POSE_INIT); + op_node = add_operation_node(&ob->id, + DEG_NODE_TYPE_EVAL_POSE, + function_bind(BKE_pose_eval_init, _1, scene, ob, ob->pose), + DEG_OPCODE_POSE_INIT); op_node->set_as_entry(); - op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, - DEPSOP_TYPE_POST, function_bind(BKE_pose_eval_flush, _1, scene, ob, ob->pose), DEG_OPCODE_POSE_DONE); + op_node = add_operation_node(&ob->id, + DEG_NODE_TYPE_EVAL_POSE, + function_bind(BKE_pose_eval_flush, _1, scene, ob, ob->pose), + DEG_OPCODE_POSE_DONE); op_node->set_as_exit(); /* bones */ LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { /* node for bone eval */ - op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_INIT, NULL, // XXX: BKE_pose_eval_bone_local - DEG_OPCODE_BONE_LOCAL); + op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, NULL, + DEG_OPCODE_BONE_LOCAL); op_node->set_as_entry(); add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_EXEC, function_bind(BKE_pose_eval_bone, _1, scene, ob, pchan), // XXX: BKE_pose_eval_bone_pose + function_bind(BKE_pose_eval_bone, _1, scene, ob, pchan), DEG_OPCODE_BONE_POSE_PARENT); add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_OUT, NULL, /* NOTE: dedicated noop for easier relationship construction */ + NULL, /* NOTE: dedicated noop for easier relationship construction */ DEG_OPCODE_BONE_READY); op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_POST, function_bind(BKE_pose_bone_done, _1, pchan), - DEG_OPCODE_BONE_DONE); + function_bind(BKE_pose_bone_done, _1, pchan), + DEG_OPCODE_BONE_DONE); op_node->set_as_exit(); /* constraints */ @@ -255,32 +256,25 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *ob) op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, - DEPSOP_TYPE_INIT, function_bind(BKE_pose_eval_proxy_copy, _1, ob), DEG_OPCODE_POSE_INIT); op_node->set_as_entry(); LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_INIT, NULL, - DEG_OPCODE_BONE_LOCAL); + NULL, DEG_OPCODE_BONE_LOCAL); op_node->set_as_entry(); add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_EXEC, NULL, - DEG_OPCODE_BONE_READY); + NULL, DEG_OPCODE_BONE_READY); op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, - DEPSOP_TYPE_POST, NULL, - DEG_OPCODE_BONE_DONE); + NULL, DEG_OPCODE_BONE_DONE); op_node->set_as_exit(); } - op_node = add_operation_node(&ob->id, - DEG_NODE_TYPE_EVAL_POSE, - DEPSOP_TYPE_POST, - NULL, - DEG_OPCODE_POSE_DONE); + op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, + NULL, DEG_OPCODE_POSE_DONE); op_node->set_as_exit(); } diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h index 6de0f8d7506..c6960bf1351 100644 --- a/source/blender/depsgraph/intern/depsgraph_types.h +++ b/source/blender/depsgraph/intern/depsgraph_types.h @@ -252,30 +252,4 @@ protected: /* String defines for these opcodes, defined in depsgraph_type_defines.cpp */ extern DepsOperationStringifier DEG_OPNAMES; -/* Type of operation */ -typedef enum eDepsOperation_Type { - /* **** Primary operation types **** */ - - /* Initialise evaluation data */ - DEPSOP_TYPE_INIT = 0, - /* Standard evaluation step */ - DEPSOP_TYPE_EXEC = 1, - /* Cleanup evaluation data + flush results */ - DEPSOP_TYPE_POST = 2, - - /* **** Additional operation types **** */ - /* Indicator for outputting a temporary result that other components - * can use. // XXX? - */ - DEPSOP_TYPE_OUT = 3, - /* Indicator for things like IK Solvers and Rigidbody Sim steps which - * modify final results of separate entities at once. - */ - DEPSOP_TYPE_SIM = 4, - /* Rebuild internal evaluation data - used for Rigidbody Reset and - * Armature Rebuild-On-Load. - */ - DEPSOP_TYPE_REBUILD = 5, -} eDepsOperation_Type; - } // namespace DEG diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc index 80a1ce3f98e..0171fd9ac25 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc @@ -198,8 +198,7 @@ OperationDepsNode *ComponentDepsNode::has_operation(eDepsOperation_Code opcode, return has_operation(key); } -OperationDepsNode *ComponentDepsNode::add_operation(eDepsOperation_Type optype, - DepsEvalOperationCb op, +OperationDepsNode *ComponentDepsNode::add_operation(DepsEvalOperationCb op, eDepsOperation_Code opcode, const char *name, int name_tag) @@ -224,7 +223,6 @@ OperationDepsNode *ComponentDepsNode::add_operation(eDepsOperation_Type optype, /* attach extra data */ op_node->evaluate = op; - op_node->optype = optype; op_node->opcode = opcode; op_node->name = name; diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h index 0eb4e42950c..f476d8ff202 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.h +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h @@ -99,8 +99,7 @@ struct ComponentDepsNode : public DepsNode { * \param op: The operation to perform * \param name: Identifier for operation - used to find/locate it again */ - OperationDepsNode *add_operation(eDepsOperation_Type optype, - DepsEvalOperationCb op, + OperationDepsNode *add_operation(DepsEvalOperationCb op, eDepsOperation_Code opcode, const char *name, int name_tag); diff --git a/source/blender/depsgraph/intern/nodes/deg_node_operation.h b/source/blender/depsgraph/intern/nodes/deg_node_operation.h index 3ff215a31b2..1e5c3832d03 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_operation.h +++ b/source/blender/depsgraph/intern/nodes/deg_node_operation.h @@ -82,9 +82,6 @@ struct OperationDepsNode : public DepsNode { float eval_priority; bool scheduled; - /* Stage of evaluation */ - eDepsOperation_Type optype; - /* Identifier for the operation being performed. */ eDepsOperation_Code opcode;