Depsgraph: Cleanup, use DEG_NODE_TYPE prefix for depsgraph node types
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Jun 2017 13:40:02 +0000 (15:40 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Jun 2017 14:22:35 +0000 (16:22 +0200)
19 files changed:
source/blender/depsgraph/intern/builder/deg_builder.cc
source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
source/blender/depsgraph/intern/depsgraph.cc
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/depsgraph/intern/depsgraph_debug.cc
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/depsgraph/intern/depsgraph_types.h
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/depsgraph/intern/nodes/deg_node.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc
source/blender/depsgraph/intern/nodes/deg_node_operation.cc

index 143f9908db8b10d16a0a61415cd2ab38472bfd32..55caad91b4e3f5585f36053def39825c7fe2cfdb 100644 (file)
@@ -79,7 +79,7 @@ void deg_graph_build_flush_layers(Depsgraph *graph)
                node->done = 0;
                node->num_links_pending = 0;
                foreach (DepsRelation *rel, node->outlinks) {
-                       if ((rel->from->type == DEPSNODE_TYPE_OPERATION) &&
+                       if ((rel->from->type == DEG_NODE_TYPE_OPERATION) &&
                            (rel->flag & DEPSREL_FLAG_CYCLIC) == 0)
                        {
                                ++node->num_links_pending;
@@ -97,14 +97,14 @@ void deg_graph_build_flush_layers(Depsgraph *graph)
                BLI_stack_pop(stack, &node);
                /* Flush layers to parents. */
                foreach (DepsRelation *rel, node->inlinks) {
-                       if (rel->from->type == DEPSNODE_TYPE_OPERATION) {
+                       if (rel->from->type == DEG_NODE_TYPE_OPERATION) {
                                OperationDepsNode *from = (OperationDepsNode *)rel->from;
                                from->owner->layers |= node->owner->layers;
                        }
                }
                /* Schedule parent nodes. */
                foreach (DepsRelation *rel, node->inlinks) {
-                       if (rel->from->type == DEPSNODE_TYPE_OPERATION) {
+                       if (rel->from->type == DEG_NODE_TYPE_OPERATION) {
                                OperationDepsNode *from = (OperationDepsNode *)rel->from;
                                if ((rel->flag & DEPSREL_FLAG_CYCLIC) == 0) {
                                        BLI_assert(from->num_links_pending > 0);
index 1420b5fc8a5c48ca84c32c921b961914e07d5834..0922f359abe210976f052d34f5c47d038be81e9d 100644 (file)
@@ -71,7 +71,7 @@ void deg_graph_detect_cycles(Depsgraph *graph)
        foreach (OperationDepsNode *node, graph->operations) {
                bool has_inlinks = false;
                foreach (DepsRelation *rel, node->inlinks) {
-                       if (rel->from->type == DEPSNODE_TYPE_OPERATION) {
+                       if (rel->from->type == DEG_NODE_TYPE_OPERATION) {
                                has_inlinks = true;
                        }
                }
@@ -95,7 +95,7 @@ void deg_graph_detect_cycles(Depsgraph *graph)
                bool all_child_traversed = true;
                for (int i = node->done; i < node->outlinks.size(); ++i) {
                        DepsRelation *rel = node->outlinks[i];
-                       if (rel->to->type == DEPSNODE_TYPE_OPERATION) {
+                       if (rel->to->type == DEG_NODE_TYPE_OPERATION) {
                                OperationDepsNode *to = (OperationDepsNode *)rel->to;
                                if (to->tag == NODE_IN_STACK) {
                                        printf("Dependency cycle detected:\n");
index ef94dec4b618186eb1f9fa89ede12f54054e2546..3330795d053b7eaef612b00720fabc707d3b3f8c 100644 (file)
@@ -447,13 +447,13 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
 void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
 {
        /* local transforms (from transform channels - loc/rot/scale + deltas) */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
+       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                           DEPSOP_TYPE_INIT, function_bind(BKE_object_eval_local_transform, _1, scene, ob),
                           DEG_OPCODE_TRANSFORM_LOCAL);
 
        /* object parent */
        if (ob->parent) {
-               add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                                   DEPSOP_TYPE_EXEC, function_bind(BKE_object_eval_parent, _1, scene, ob),
                                   DEG_OPCODE_TRANSFORM_PARENT);
        }
@@ -470,12 +470,12 @@ void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
         *
         * TODO(sergey): Get rid of this node.
         */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
+       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                           DEPSOP_TYPE_EXEC, function_bind(BKE_object_eval_uber_transform, _1, scene, ob),
                           DEG_OPCODE_OBJECT_UBEREVAL);
 
        /* object transform is done */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
+       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                           DEPSOP_TYPE_POST, function_bind(BKE_object_eval_done, _1, ob),
                           DEG_OPCODE_TRANSFORM_FINAL);
 }
@@ -500,7 +500,7 @@ void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
 void DepsgraphNodeBuilder::build_object_constraints(Scene *scene, Object *ob)
 {
        /* create node for constraint stack */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_TRANSFORM,
+       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                           DEPSOP_TYPE_EXEC, function_bind(BKE_object_eval_constraints, _1, scene, ob),
                           DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 }
@@ -523,7 +523,7 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
                /* actions and NLA - as a single unit for now, as it gets complicated to schedule otherwise */
                if ((adt->action) || (adt->nla_tracks.first)) {
                        /* create the node */
-                       add_operation_node(id, DEPSNODE_TYPE_ANIMATION,
+                       add_operation_node(id, DEG_NODE_TYPE_ANIMATION,
                                           DEPSOP_TYPE_EXEC, function_bind(BKE_animsys_eval_animdata, _1, id),
                                           DEG_OPCODE_ANIMATION, id->name);
 
@@ -554,14 +554,14 @@ OperationDepsNode *DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcu)
         * and use some tagging magic instead.
         */
        OperationDepsNode *driver_op = find_operation_node(id,
-                                                          DEPSNODE_TYPE_PARAMETERS,
+                                                          DEG_NODE_TYPE_PARAMETERS,
                                                           DEG_OPCODE_DRIVER,
                                                           fcu->rna_path ? fcu->rna_path : "",
                                                           fcu->array_index);
 
        if (driver_op == NULL) {
                driver_op = add_operation_node(id,
-                                              DEPSNODE_TYPE_PARAMETERS,
+                                              DEG_NODE_TYPE_PARAMETERS,
                                               DEPSOP_TYPE_EXEC,
                                               function_bind(BKE_animsys_eval_driver, _1, id, fcu),
                                               DEG_OPCODE_DRIVER,
@@ -589,9 +589,9 @@ void DepsgraphNodeBuilder::build_world(World *world)
        build_animdata(world_id);
 
        /* world itself */
-       add_component_node(world_id, DEPSNODE_TYPE_PARAMETERS);
+       add_component_node(world_id, DEG_NODE_TYPE_PARAMETERS);
 
-       add_operation_node(world_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(world_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
 
        /* textures */
@@ -627,13 +627,13 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
        /* XXX: is this the right component, or do we want to use another one instead? */
 
        /* init/rebuild operation */
-       /*OperationDepsNode *init_node =*/ add_operation_node(&scene->id, DEPSNODE_TYPE_TRANSFORM,
+       /*OperationDepsNode *init_node =*/ add_operation_node(&scene->id, DEG_NODE_TYPE_TRANSFORM,
                                                              DEPSOP_TYPE_REBUILD, 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, DEPSNODE_TYPE_TRANSFORM,
+       OperationDepsNode *sim_node     = add_operation_node(&scene->id, DEG_NODE_TYPE_TRANSFORM,
                                                             DEPSOP_TYPE_SIM, function_bind(BKE_rigidbody_eval_simulation, _1, scene),
                                                             DEG_OPCODE_RIGIDBODY_SIM);
 
@@ -654,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, DEPSNODE_TYPE_TRANSFORM,
+                       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
                                           DEPSOP_TYPE_EXEC, function_bind(BKE_rigidbody_object_sync_transforms, _1, scene, ob),
                                           DEG_OPCODE_TRANSFORM_RIGIDBODY);
                }
@@ -680,7 +680,7 @@ void DepsgraphNodeBuilder::build_particles(Scene *scene, Object *ob)
 
        /* component for all particle systems */
        ComponentDepsNode *psys_comp =
-               add_component_node(&ob->id, DEPSNODE_TYPE_EVAL_PARTICLES);
+               add_component_node(&ob->id, DEG_NODE_TYPE_EVAL_PARTICLES);
 
        /* particle systems */
        LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
@@ -710,7 +710,7 @@ void DepsgraphNodeBuilder::build_particles(Scene *scene, Object *ob)
 void DepsgraphNodeBuilder::build_cloth(Scene *scene, Object *object)
 {
        ComponentDepsNode *cache_comp = add_component_node(&object->id,
-                                                          DEPSNODE_TYPE_CACHE);
+                                                          DEG_NODE_TYPE_CACHE);
        add_operation_node(cache_comp,
                           DEPSOP_TYPE_EXEC,
                           function_bind(BKE_object_eval_cloth,
@@ -726,7 +726,7 @@ void DepsgraphNodeBuilder::build_shapekeys(Key *key)
 {
        build_animdata(&key->id);
 
-       add_operation_node(&key->id, DEPSNODE_TYPE_GEOMETRY, DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(&key->id, DEG_NODE_TYPE_GEOMETRY, DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Shapekey Eval");
 }
 
@@ -742,7 +742,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
         * Does this depend on other nodes?
         */
        add_operation_node(&ob->id,
-                          DEPSNODE_TYPE_PARAMETERS,
+                          DEG_NODE_TYPE_PARAMETERS,
                           DEPSOP_TYPE_POST,
                           NULL,
                           DEG_OPCODE_PLACEHOLDER,
@@ -756,13 +756,13 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
         * TODO(sergey): Get rid of this node.
         */
        add_operation_node(&ob->id,
-                          DEPSNODE_TYPE_GEOMETRY,
+                          DEG_NODE_TYPE_GEOMETRY,
                           DEPSOP_TYPE_POST,
                           function_bind(BKE_object_eval_uber_data, _1, scene, ob),
                           DEG_OPCODE_GEOMETRY_UBEREVAL);
 
        add_operation_node(&ob->id,
-                          DEPSNODE_TYPE_GEOMETRY,
+                          DEG_NODE_TYPE_GEOMETRY,
                           DEPSOP_TYPE_INIT,
                           NULL,
                           DEG_OPCODE_PLACEHOLDER,
@@ -773,7 +773,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
        /* Modifiers */
        LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
                add_operation_node(&ob->id,
-                                  DEPSNODE_TYPE_GEOMETRY,
+                                  DEG_NODE_TYPE_GEOMETRY,
                                   DEPSOP_TYPE_EXEC,
                                   function_bind(BKE_object_eval_modifier,
                                                 _1,
@@ -822,7 +822,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
 
                        /* evaluation operations */
                        add_operation_node(obdata,
-                                          DEPSNODE_TYPE_GEOMETRY,
+                                          DEG_NODE_TYPE_GEOMETRY,
                                           DEPSOP_TYPE_INIT,
                                           function_bind(BKE_mesh_eval_geometry,
                                                         _1,
@@ -841,7 +841,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
                                /* metaball evaluation operations */
                                /* NOTE: only the motherball gets evaluated! */
                                add_operation_node(obdata,
-                                                  DEPSNODE_TYPE_GEOMETRY,
+                                                  DEG_NODE_TYPE_GEOMETRY,
                                                   DEPSOP_TYPE_INIT,
                                                   function_bind(BKE_mball_eval_geometry,
                                                                 _1,
@@ -859,7 +859,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
                        /* Curve/nurms evaluation operations. */
                        /* - calculate curve geometry (including path) */
                        add_operation_node(obdata,
-                                          DEPSNODE_TYPE_GEOMETRY,
+                                          DEG_NODE_TYPE_GEOMETRY,
                                           DEPSOP_TYPE_INIT,
                                           function_bind(BKE_curve_eval_geometry,
                                                         _1,
@@ -870,7 +870,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
                        /* Calculate curve path - this is used by constraints, etc. */
                        if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
                                add_operation_node(obdata,
-                                                  DEPSNODE_TYPE_GEOMETRY,
+                                                  DEG_NODE_TYPE_GEOMETRY,
                                                   DEPSOP_TYPE_EXEC,
                                                   function_bind(BKE_curve_eval_path,
                                                                 _1,
@@ -899,7 +899,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
                {
                        /* Lattice evaluation operations. */
                        add_operation_node(obdata,
-                                          DEPSNODE_TYPE_GEOMETRY,
+                                          DEG_NODE_TYPE_GEOMETRY,
                                           DEPSOP_TYPE_INIT,
                                           function_bind(BKE_lattice_eval_geometry,
                                                         _1,
@@ -910,12 +910,12 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob)
                }
        }
 
-       add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
+       add_operation_node(obdata, DEG_NODE_TYPE_GEOMETRY,
                           DEPSOP_TYPE_POST, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Eval Done");
 
        /* Parameters for driver sources. */
-       add_operation_node(obdata, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(obdata, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
 }
 
@@ -931,12 +931,12 @@ void DepsgraphNodeBuilder::build_camera(Object *ob)
 
        build_animdata(&cam->id);
 
-       add_operation_node(camera_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(camera_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, 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, DEPSNODE_TYPE_PARAMETERS,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_PARAMETERS,
                                   DEPSOP_TYPE_EXEC, NULL,
                                   DEG_OPCODE_PLACEHOLDER,
                                   "Camera DOF");
@@ -955,10 +955,10 @@ void DepsgraphNodeBuilder::build_lamp(Object *ob)
        build_animdata(&la->id);
 
        /* node for obdata */
-       add_component_node(lamp_id, DEPSNODE_TYPE_PARAMETERS);
+       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, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
+       add_operation_node(lamp_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
 
        /* lamp's nodetree */
@@ -981,7 +981,7 @@ void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree)
        build_animdata(ntree_id);
 
        /* Parameters for drivers. */
-       add_operation_node(ntree_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_POST, NULL,
+       add_operation_node(ntree_id, DEG_NODE_TYPE_PARAMETERS, DEPSOP_TYPE_POST, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Parameters Eval");
 
        /* nodetree's nodes... */
@@ -1021,7 +1021,7 @@ void DepsgraphNodeBuilder::build_material(Material *ma)
        /* material itself */
        add_id_node(ma_id);
 
-       add_operation_node(ma_id, DEPSNODE_TYPE_SHADING,
+       add_operation_node(ma_id, DEG_NODE_TYPE_SHADING,
                           DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Material Update");
 
@@ -1078,7 +1078,7 @@ void DepsgraphNodeBuilder::build_image(Image *image) {
        add_id_node(image_id);
        /* Placeholder so we can add relations and tag ID node for update. */
        add_operation_node(image_id,
-                          DEPSNODE_TYPE_PARAMETERS,
+                          DEG_NODE_TYPE_PARAMETERS,
                           DEPSOP_TYPE_EXEC,
                           NULL,
                           DEG_OPCODE_PLACEHOLDER,
@@ -1090,10 +1090,10 @@ void DepsgraphNodeBuilder::build_compositor(Scene *scene)
        /* For now, just a plain wrapper? */
        // TODO: create compositing component?
        // XXX: component type undefined!
-       //graph->get_node(&scene->id, NULL, DEPSNODE_TYPE_COMPOSITING, NULL);
+       //graph->get_node(&scene->id, NULL, DEG_NODE_TYPE_COMPOSITING, NULL);
 
        /* for now, nodetrees are just parameters; compositing occurs in internals of renderer... */
-       add_component_node(&scene->id, DEPSNODE_TYPE_PARAMETERS);
+       add_component_node(&scene->id, DEG_NODE_TYPE_PARAMETERS);
        build_nodetree(scene->nodetree);
 }
 
@@ -1115,8 +1115,8 @@ void DepsgraphNodeBuilder::build_cachefile(CacheFile *cache_file)
 {
        ID *cache_file_id = &cache_file->id;
 
-       add_component_node(cache_file_id, DEPSNODE_TYPE_CACHE);
-       add_operation_node(cache_file_id, DEPSNODE_TYPE_CACHE,
+       add_component_node(cache_file_id, DEG_NODE_TYPE_CACHE);
+       add_operation_node(cache_file_id, DEG_NODE_TYPE_CACHE,
                           DEPSOP_TYPE_EXEC, NULL,
                           DEG_OPCODE_PLACEHOLDER, "Cache File Update");
 
index e307909cb1140ab829ccd7cb45ba646a7e13a552..29d80290bd316933a3926cd519751ff9197bae80 100644 (file)
@@ -67,7 +67,7 @@ namespace DEG {
 void DepsgraphNodeBuilder::build_pose_constraints(Scene *scene, Object *ob, bPoseChannel *pchan)
 {
        /* create node for constraint stack */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+       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);
@@ -81,14 +81,14 @@ void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, Object *ob, bPoseChannel
        /* Find the chain's root. */
        bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
 
-       if (has_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
+       if (has_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
                               DEG_OPCODE_POSE_IK_SOLVER))
        {
                return;
        }
 
        /* Operation node for evaluating/running IK Solver. */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
+       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),
                           DEG_OPCODE_POSE_IK_SOLVER);
 }
@@ -104,7 +104,7 @@ void DepsgraphNodeBuilder::build_splineik_pose(Scene *scene, Object *ob, bPoseCh
        /* Operation node for evaluating/running Spline IK Solver.
         * Store the "root bone" of this chain in the solver, so it knows where to start.
         */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name,
+       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),
                           DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
 }
@@ -125,7 +125,7 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
 
                /* Make sure pose is up-to-date with armature updates. */
                add_operation_node(&arm->id,
-                                  DEPSNODE_TYPE_PARAMETERS,
+                                  DEG_NODE_TYPE_PARAMETERS,
                                   DEPSOP_TYPE_EXEC,
                                   NULL,
                                   DEG_OPCODE_PLACEHOLDER,
@@ -175,28 +175,28 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
         */
 
        /* pose eval context */
-       add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE,
+       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);
 
-       add_operation_node(&ob->id, DEPSNODE_TYPE_EVAL_POSE,
+       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);
 
        /* bones */
        LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
                /* node for bone eval */
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               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);
 
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               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
                                   DEG_OPCODE_BONE_POSE_PARENT);
 
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   DEPSOP_TYPE_OUT, NULL, /* NOTE: dedicated noop for easier relationship construction */
                                   DEG_OPCODE_BONE_READY);
 
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               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);
 
@@ -247,27 +247,27 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
        }
 
        add_operation_node(&ob->id,
-                          DEPSNODE_TYPE_EVAL_POSE,
+                          DEG_NODE_TYPE_EVAL_POSE,
                           DEPSOP_TYPE_INIT,
                           function_bind(BKE_pose_eval_proxy_copy, _1, ob),
                           DEG_OPCODE_POSE_INIT);
 
        LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   DEPSOP_TYPE_INIT, NULL,
                                   DEG_OPCODE_BONE_LOCAL);
 
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   DEPSOP_TYPE_EXEC, NULL,
                                   DEG_OPCODE_BONE_READY);
 
-               add_operation_node(&ob->id, DEPSNODE_TYPE_BONE, pchan->name,
+               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   DEPSOP_TYPE_POST, NULL,
                                   DEG_OPCODE_BONE_DONE);
        }
 
        add_operation_node(&ob->id,
-                          DEPSNODE_TYPE_EVAL_POSE,
+                          DEG_NODE_TYPE_EVAL_POSE,
                           DEPSOP_TYPE_POST,
                           NULL,
                           DEG_OPCODE_POSE_DONE);
index eba4e8907b12b775116007e3daef4974d3a66685..d2188c940270697fa9056a12455fc038da99cdd1 100644 (file)
@@ -317,10 +317,10 @@ void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key,
        {
                Object *ob1 = collobjs[i];
 
-               ComponentKey trf_key(&ob1->id, DEPSNODE_TYPE_TRANSFORM);
+               ComponentKey trf_key(&ob1->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(trf_key, key, name);
 
-               ComponentKey coll_key(&ob1->id, DEPSNODE_TYPE_GEOMETRY);
+               ComponentKey coll_key(&ob1->id, DEG_NODE_TYPE_GEOMETRY);
                add_relation(coll_key, key, name);
        }
 
@@ -335,30 +335,30 @@ void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key,
        if (effectors) {
                for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) {
                        if (eff->ob != ob) {
-                               ComponentKey eff_key(&eff->ob->id, DEPSNODE_TYPE_TRANSFORM);
+                               ComponentKey eff_key(&eff->ob->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(eff_key, key, name);
                        }
 
                        if (eff->psys) {
                                if (eff->ob != ob) {
-                                       ComponentKey eff_key(&eff->ob->id, DEPSNODE_TYPE_EVAL_PARTICLES);
+                                       ComponentKey eff_key(&eff->ob->id, DEG_NODE_TYPE_EVAL_PARTICLES);
                                        add_relation(eff_key, key, name);
 
                                        /* TODO: remove this when/if EVAL_PARTICLES is sufficient for up to date particles */
-                                       ComponentKey mod_key(&eff->ob->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey mod_key(&eff->ob->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(mod_key, key, name);
                                }
                                else if (eff->psys != psys) {
-                                       OperationKey eff_key(&eff->ob->id, DEPSNODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, eff->psys->name);
+                                       OperationKey eff_key(&eff->ob->id, DEG_NODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, eff->psys->name);
                                        add_relation(eff_key, key, name);
                                }
                        }
 
                        if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
-                               ComponentKey trf_key(&eff->pd->f_source->id, DEPSNODE_TYPE_TRANSFORM);
+                               ComponentKey trf_key(&eff->pd->f_source->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(trf_key, key, "Smoke Force Domain");
 
-                               ComponentKey eff_key(&eff->pd->f_source->id, DEPSNODE_TYPE_GEOMETRY);
+                               ComponentKey eff_key(&eff->pd->f_source->id, DEG_NODE_TYPE_GEOMETRY);
                                add_relation(eff_key, key, "Smoke Force Domain");
                        }
 
@@ -397,13 +397,13 @@ void DepsgraphRelationBuilder::build_group(Main *bmain,
        ID *group_id = &group->id;
        bool group_done = (group_id->tag & LIB_TAG_DOIT) != 0;
        OperationKey object_local_transform_key(&object->id,
-                                               DEPSNODE_TYPE_TRANSFORM,
+                                               DEG_NODE_TYPE_TRANSFORM,
                                                DEG_OPCODE_TRANSFORM_LOCAL);
        LINKLIST_FOREACH (GroupObject *, go, &group->gobject) {
                if (!group_done) {
                        build_object(bmain, scene, go->ob);
                }
-               ComponentKey dupli_transform_key(&go->ob->id, DEPSNODE_TYPE_TRANSFORM);
+               ComponentKey dupli_transform_key(&go->ob->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(dupli_transform_key,
                             object_local_transform_key,
                             "Dupligroup");
@@ -420,13 +420,13 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
 
        /* Object Transforms */
        eDepsOperation_Code base_op = (ob->parent) ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
-       OperationKey base_op_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, base_op);
+       OperationKey base_op_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, base_op);
 
-       OperationKey local_transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
-       OperationKey parent_transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
-       OperationKey final_transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+       OperationKey local_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
+       OperationKey parent_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
+       OperationKey final_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
 
-       OperationKey ob_ubereval_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_OBJECT_UBEREVAL);
+       OperationKey ob_ubereval_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_OBJECT_UBEREVAL);
 
        /* parenting */
        if (ob->parent != NULL) {
@@ -457,7 +457,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
        /* object constraints */
        if (ob->constraints.first != NULL) {
                OperationKey constraint_key(&ob->id,
-                                           DEPSNODE_TYPE_TRANSFORM,
+                                           DEG_NODE_TYPE_TRANSFORM,
                                            DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 
                /* constraint relations */
@@ -465,7 +465,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
                // XXX: this is broken
                build_constraints(scene,
                                  &ob->id,
-                                 DEPSNODE_TYPE_TRANSFORM,
+                                 DEG_NODE_TYPE_TRANSFORM,
                                  "",
                                  &ob->constraints,
                                  NULL);
@@ -510,7 +510,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
 
        // XXX: This should be hooked up by the build_animdata code
        if (needs_animdata_node(&ob->id)) {
-               ComponentKey adt_key(&ob->id, DEPSNODE_TYPE_ANIMATION);
+               ComponentKey adt_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
                add_relation(adt_key,
                             local_transform_key,
                             "Object Animation");
@@ -557,8 +557,8 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
 
                Key *key = BKE_key_from_object(ob);
                if (key != NULL) {
-                       ComponentKey geometry_key((ID *)ob->data, DEPSNODE_TYPE_GEOMETRY);
-                       ComponentKey key_key(&key->id, DEPSNODE_TYPE_GEOMETRY);
+                       ComponentKey geometry_key((ID *)ob->data, DEG_NODE_TYPE_GEOMETRY);
+                       ComponentKey key_key(&key->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(key_key,
                                     geometry_key,
                                     "Shapekeys");
@@ -582,8 +582,8 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
                /* TODO(sergey): This is an inverted relation, matches old depsgraph
                 * behavior and need to be investigated if it still need to be inverted.
                 */
-               ComponentKey ob_pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
-               ComponentKey proxy_pose_key(&ob->proxy->id, DEPSNODE_TYPE_EVAL_POSE);
+               ComponentKey ob_pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey proxy_pose_key(&ob->proxy->id, DEG_NODE_TYPE_EVAL_POSE);
                add_relation(ob_pose_key, proxy_pose_key, "Proxy");
        }
 
@@ -600,14 +600,14 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
         */
        // XXX: @sergey - it would be good if we got that backwards flushing working
        // when tagging for updates.
-       //OperationKey ob_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
-       ComponentKey ob_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
+       //OperationKey ob_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
+       ComponentKey ob_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
 
        /* type-specific links */
        switch (ob->partype) {
                case PARSKEL:  /* Armature Deform (Virtual Modifier) */
                {
-                       ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
+                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(parent_key, ob_key, "Armature Deform Parent");
                        break;
                }
@@ -615,7 +615,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                case PARVERT1: /* Vertex Parent */
                case PARVERT3:
                {
-                       ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
+                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(parent_key, ob_key, "Vertex Parent");
 
                        /* XXX not sure what this is for or how you could be done properly - lukas */
@@ -624,7 +624,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                                parent_node->customdata_mask |= CD_MASK_ORIGINDEX;
                        }
 
-                       ComponentKey transform_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
+                       ComponentKey transform_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(transform_key, ob_key, "Vertex Parent TFM");
                        break;
                }
@@ -632,10 +632,10 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                case PARBONE: /* Bone Parent */
                {
                        ComponentKey parent_bone_key(&ob->parent->id,
-                                                    DEPSNODE_TYPE_BONE,
+                                                    DEG_NODE_TYPE_BONE,
                                                     ob->parsubstr);
                        OperationKey parent_transform_key(&ob->parent->id,
-                                                         DEPSNODE_TYPE_TRANSFORM,
+                                                         DEG_NODE_TYPE_TRANSFORM,
                                                          DEG_OPCODE_TRANSFORM_FINAL);
                        add_relation(parent_bone_key,
                                     ob_key,
@@ -651,8 +651,8 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                        if (ob->parent->type == OB_LATTICE) {
                                /* Lattice Deform Parent - Virtual Modifier */
                                // XXX: no virtual modifiers should be left!
-                               ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
-                               ComponentKey geom_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
+                               ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                               ComponentKey geom_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
 
                                add_relation(parent_key, ob_key, "Lattice Deform Parent");
                                add_relation(geom_key, ob_key, "Lattice Deform Parent Geom");
@@ -662,21 +662,21 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
 
                                if (cu->flag & CU_PATH) {
                                        /* Follow Path */
-                                       ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(parent_key, ob_key, "Curve Follow Parent");
 
-                                       ComponentKey transform_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
+                                       ComponentKey transform_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(transform_key, ob_key, "Curve Follow TFM");
                                }
                                else {
                                        /* Standard Parent */
-                                       ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
+                                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(parent_key, ob_key, "Curve Parent");
                                }
                        }
                        else {
                                /* Standard Parent */
-                               ComponentKey parent_key(&ob->parent->id, DEPSNODE_TYPE_TRANSFORM);
+                               ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(parent_key, ob_key, "Parent");
                        }
                        break;
@@ -693,7 +693,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                                  ListBase *constraints, RootPChanMap *root_map)
 {
        OperationKey constraint_op_key(id, component_type, component_subdata,
-                                      (component_type == DEPSNODE_TYPE_BONE) ? DEG_OPCODE_BONE_CONSTRAINTS : DEG_OPCODE_TRANSFORM_CONSTRAINTS);
+                                      (component_type == DEG_NODE_TYPE_BONE) ? DEG_OPCODE_BONE_CONSTRAINTS : DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 
        /* add dependencies for each constraint in turn */
        for (bConstraint *con = (bConstraint *)constraints->first; con; con = con->next) {
@@ -716,7 +716,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
 
                                if (data->depth_ob) {
                                        // DAG_RL_DATA_OB | DAG_RL_OB_OB
-                                       ComponentKey depth_key(&data->depth_ob->id, DEPSNODE_TYPE_TRANSFORM);
+                                       ComponentKey depth_key(&data->depth_ob->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(depth_key, constraint_op_key, cti->name);
                                }
                        }
@@ -726,7 +726,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
 
                        if (depends_on_camera && scene->camera) {
                                // DAG_RL_DATA_OB | DAG_RL_OB_OB
-                               ComponentKey camera_key(&scene->camera->id, DEPSNODE_TYPE_TRANSFORM);
+                               ComponentKey camera_key(&scene->camera->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(camera_key, constraint_op_key, cti->name);
                        }
 
@@ -742,7 +742,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                        bTransformCacheConstraint *data = (bTransformCacheConstraint *)con->data;
 
                        if (data->cache_file) {
-                               ComponentKey cache_key(&data->cache_file->id, DEPSNODE_TYPE_CACHE);
+                               ComponentKey cache_key(&data->cache_file->id, DEG_NODE_TYPE_CACHE);
                                add_relation(cache_key, constraint_op_key, cti->name);
                        }
                }
@@ -760,7 +760,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                }
                                else if (ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO)) {
                                        /* these constraints require path geometry data... */
-                                       ComponentKey target_key(&ct->tar->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey target_key(&ct->tar->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(target_key, constraint_op_key, cti->name); // XXX: type = geom_transform
                                        // TODO: path dependency
                                }
@@ -780,19 +780,19 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                                        target_key_opcode = DEG_OPCODE_BONE_DONE;
                                                }
 
-                                               OperationKey target_key(&ct->tar->id, DEPSNODE_TYPE_BONE, ct->subtarget, target_key_opcode);
+                                               OperationKey target_key(&ct->tar->id, DEG_NODE_TYPE_BONE, ct->subtarget, target_key_opcode);
                                                add_relation(target_key, constraint_op_key, cti->name);
                                        }
                                        else {
                                                /* different armature - we can safely use the result of that */
-                                               OperationKey target_key(&ct->tar->id, DEPSNODE_TYPE_BONE, ct->subtarget, DEG_OPCODE_BONE_DONE);
+                                               OperationKey target_key(&ct->tar->id, DEG_NODE_TYPE_BONE, ct->subtarget, DEG_OPCODE_BONE_DONE);
                                                add_relation(target_key, constraint_op_key, cti->name);
                                        }
                                }
                                else if (ELEM(ct->tar->type, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) {
                                        /* vertex group */
                                        /* NOTE: for now, we don't need to represent vertex groups separately... */
-                                       ComponentKey target_key(&ct->tar->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey target_key(&ct->tar->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(target_key, constraint_op_key, cti->name);
 
                                        if (ct->tar->type == OB_MESH) {
@@ -804,11 +804,11 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                }
                                else if (con->type == CONSTRAINT_TYPE_SHRINKWRAP) {
                                        /* Constraints which requires the target object surface. */
-                                       ComponentKey target_key(&ct->tar->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey target_key(&ct->tar->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(target_key, constraint_op_key, cti->name);
 
                                        /* NOTE: obdata eval now doesn't necessarily depend on the object's transform... */
-                                       ComponentKey target_transform_key(&ct->tar->id, DEPSNODE_TYPE_TRANSFORM);
+                                       ComponentKey target_transform_key(&ct->tar->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(target_transform_key, constraint_op_key, cti->name);
                                }
                                else {
@@ -821,18 +821,18 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                                 * - If however it is a real self targetting case, just make it depend on the
                                                 *   previous constraint (or the pre-constraint state)...
                                                 */
-                                               if ((ct->tar->type == OB_ARMATURE) && (component_type == DEPSNODE_TYPE_BONE)) {
-                                                       OperationKey target_key(&ct->tar->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+                                               if ((ct->tar->type == OB_ARMATURE) && (component_type == DEG_NODE_TYPE_BONE)) {
+                                                       OperationKey target_key(&ct->tar->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
                                                        add_relation(target_key, constraint_op_key, cti->name);
                                                }
                                                else {
-                                                       OperationKey target_key(&ct->tar->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
+                                                       OperationKey target_key(&ct->tar->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
                                                        add_relation(target_key, constraint_op_key, cti->name);
                                                }
                                        }
                                        else {
                                                /* normal object dependency */
-                                               OperationKey target_key(&ct->tar->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+                                               OperationKey target_key(&ct->tar->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
                                                add_relation(target_key, constraint_op_key, cti->name);
                                        }
                                }
@@ -847,7 +847,7 @@ void DepsgraphRelationBuilder::build_constraints(Scene *scene, ID *id, eDepsNode
                                         CONSTRAINT_TYPE_TRANSLIKE))
                                {
                                        /* TODO(sergey): Add used space check. */
-                                       ComponentKey target_transform_key(&ct->tar->id, DEPSNODE_TYPE_TRANSFORM);
+                                       ComponentKey target_transform_key(&ct->tar->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(target_transform_key, constraint_op_key, cti->name);
                                }
 
@@ -866,7 +866,7 @@ void DepsgraphRelationBuilder::build_animdata(ID *id)
        if (adt == NULL)
                return;
 
-       ComponentKey adt_key(id, DEPSNODE_TYPE_ANIMATION);
+       ComponentKey adt_key(id, DEG_NODE_TYPE_ANIMATION);
 
        /* animation */
        if (adt->action || adt->nla_tracks.first) {
@@ -882,7 +882,7 @@ void DepsgraphRelationBuilder::build_animdata(ID *id)
        /* drivers */
        LINKLIST_FOREACH (FCurve *, fcu, &adt->drivers) {
                OperationKey driver_key(id,
-                                       DEPSNODE_TYPE_PARAMETERS,
+                                       DEG_NODE_TYPE_PARAMETERS,
                                        DEG_OPCODE_DRIVER,
                                        fcu->rna_path ? fcu->rna_path : "",
                                        fcu->array_index);
@@ -923,12 +923,12 @@ void DepsgraphRelationBuilder::build_animdata(ID *id)
                        }
                        if (fcu_prev != NULL) {
                                OperationKey prev_driver_key(id,
-                                                            DEPSNODE_TYPE_PARAMETERS,
+                                                            DEG_NODE_TYPE_PARAMETERS,
                                                             DEG_OPCODE_DRIVER,
                                                             fcu_prev->rna_path ? fcu_prev->rna_path : "",
                                                             fcu_prev->array_index);
                                OperationKey driver_key(id,
-                                                       DEPSNODE_TYPE_PARAMETERS,
+                                                       DEG_NODE_TYPE_PARAMETERS,
                                                        DEG_OPCODE_DRIVER,
                                                        fcu->rna_path ? fcu->rna_path : "",
                                                        fcu->array_index);
@@ -950,7 +950,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
 {
        ChannelDriver *driver = fcu->driver;
        OperationKey driver_key(id,
-                               DEPSNODE_TYPE_PARAMETERS,
+                               DEG_NODE_TYPE_PARAMETERS,
                                DEG_OPCODE_DRIVER,
                                fcu->rna_path ? fcu->rna_path : "",
                                fcu->array_index);
@@ -980,7 +980,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                }
 
                if (pchan) {
-                       OperationKey bone_key(id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+                       OperationKey bone_key(id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
                        add_relation(driver_key, bone_key, "[Driver -> Bone]");
                }
                else {
@@ -1007,7 +1007,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                                        bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bone_name); // NOTE: ob->pose may be NULL
 
                                        if (pchan) {
-                                               OperationKey bone_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+                                               OperationKey bone_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
                                                add_relation(driver_key, bone_key, "[Arm Bone -> Driver -> Bone]");
                                        }
                                }
@@ -1028,7 +1028,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                char *modifier_name = BLI_str_quoted_substrN(rna_path, "modifiers[");
                if (modifier_name) {
                        OperationKey modifier_key(id,
-                                                 DEPSNODE_TYPE_GEOMETRY,
+                                                 DEG_NODE_TYPE_GEOMETRY,
                                                  DEG_OPCODE_GEOMETRY_MODIFIER,
                                                  modifier_name);
                        if (has_node(modifier_key)) {
@@ -1046,21 +1046,21 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                // XXX: double check where this points
                Key *shape_key = (Key *)id;
 
-               ComponentKey geometry_key(shape_key->from, DEPSNODE_TYPE_GEOMETRY);
+               ComponentKey geometry_key(shape_key->from, DEG_NODE_TYPE_GEOMETRY);
                add_relation(driver_key, geometry_key, "[Driver -> ShapeKey Geom]");
        }
        else if (strstr(rna_path, "key_blocks[")) {
-               ComponentKey geometry_key(id, DEPSNODE_TYPE_GEOMETRY);
+               ComponentKey geometry_key(id, DEG_NODE_TYPE_GEOMETRY);
                add_relation(driver_key, geometry_key, "[Driver -> ShapeKey Geom]");
        }
        else {
                if (GS(id->name) == ID_OB) {
                        /* assume that driver affects a transform... */
-                       OperationKey local_transform_key(id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
+                       OperationKey local_transform_key(id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
                        add_relation(driver_key, local_transform_key, "[Driver -> Transform]");
                }
                else if (GS(id->name) == ID_KE) {
-                       ComponentKey geometry_key(id, DEPSNODE_TYPE_GEOMETRY);
+                       ComponentKey geometry_key(id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(driver_key, geometry_key, "[Driver -> Shapekey Geometry]");
                }
        }
@@ -1094,13 +1094,13 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                                        {
                                                continue;
                                        }
-                                       OperationKey target_key(dtar->id, DEPSNODE_TYPE_BONE, target_pchan->name, DEG_OPCODE_BONE_DONE);
+                                       OperationKey target_key(dtar->id, DEG_NODE_TYPE_BONE, target_pchan->name, DEG_OPCODE_BONE_DONE);
                                        add_relation(target_key, driver_key, "[Bone Target -> Driver]");
                                }
                        }
                        else if (dtar->flag & DTAR_FLAG_STRUCT_REF) {
                                /* get node associated with the object's transforms */
-                               OperationKey target_key(dtar->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+                               OperationKey target_key(dtar->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
                                add_relation(target_key, driver_key, "[Target -> Driver]");
                        }
                        else if (dtar->rna_path && strstr(dtar->rna_path, "pose.bones[")) {
@@ -1121,7 +1121,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                                        {
                                                continue;
                                        }
-                                       OperationKey bone_key(dtar->id, DEPSNODE_TYPE_BONE, target_pchan->name, DEG_OPCODE_BONE_LOCAL);
+                                       OperationKey bone_key(dtar->id, DEG_NODE_TYPE_BONE, target_pchan->name, DEG_OPCODE_BONE_LOCAL);
                                        add_relation(bone_key, driver_key, "[RNA Bone -> Driver]");
                                }
                        }
@@ -1170,8 +1170,8 @@ void DepsgraphRelationBuilder::build_world(World *world)
        /* world's nodetree */
        if (world->nodetree != NULL) {
                build_nodetree(world->nodetree);
-               ComponentKey ntree_key(&world->nodetree->id, DEPSNODE_TYPE_PARAMETERS);
-               ComponentKey world_key(world_id, DEPSNODE_TYPE_PARAMETERS);
+               ComponentKey ntree_key(&world->nodetree->id, DEG_NODE_TYPE_PARAMETERS);
+               ComponentKey world_key(world_id, DEG_NODE_TYPE_PARAMETERS);
                add_relation(ntree_key, world_key,
                             "NTree->World Parameters");
        }
@@ -1181,8 +1181,8 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
 {
        RigidBodyWorld *rbw = scene->rigidbody_world;
 
-       OperationKey init_key(&scene->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_REBUILD);
-       OperationKey sim_key(&scene->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_SIM);
+       OperationKey init_key(&scene->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_REBUILD);
+       OperationKey sim_key(&scene->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_SIM);
 
        /* rel between the two sim-nodes */
        add_relation(init_key, sim_key, "Rigidbody [Init -> SimStep]");
@@ -1211,10 +1211,10 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                         *    XXX: there's probably a difference between passive and active
                         *         - passive don't change, so may need to know full transform...
                         */
-                       OperationKey rbo_key(&ob->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
+                       OperationKey rbo_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
 
                        eDepsOperation_Code trans_opcode = ob->parent ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
-                       OperationKey trans_op(&ob->id, DEPSNODE_TYPE_TRANSFORM, trans_opcode);
+                       OperationKey trans_op(&ob->id, DEG_NODE_TYPE_TRANSFORM, trans_opcode);
 
                        add_relation(sim_key, rbo_key, "Rigidbody Sim Eval -> RBO Sync");
 
@@ -1228,7 +1228,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                         */
                        if (ob->constraints.first) {
                                OperationKey constraint_key(&ob->id,
-                                                           DEPSNODE_TYPE_TRANSFORM,
+                                                           DEG_NODE_TYPE_TRANSFORM,
                                                            DEG_OPCODE_TRANSFORM_CONSTRAINTS);
                                add_relation(rbo_key,
                                             constraint_key,
@@ -1241,7 +1241,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                                 * If it is gone we'll need to reconsider relation here.
                                 */
                                OperationKey uber_key(&ob->id,
-                                                     DEPSNODE_TYPE_TRANSFORM,
+                                                     DEG_NODE_TYPE_TRANSFORM,
                                                      DEG_OPCODE_OBJECT_UBEREVAL);
                                add_relation(rbo_key,
                                             uber_key,
@@ -1268,9 +1268,9 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                        /* final result of the constraint object's transform controls how the
                         * constraint affects the physics sim for these objects
                         */
-                       ComponentKey trans_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
-                       OperationKey ob1_key(&rbc->ob1->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
-                       OperationKey ob2_key(&rbc->ob2->id, DEPSNODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
+                       ComponentKey trans_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+                       OperationKey ob1_key(&rbc->ob1->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
+                       OperationKey ob2_key(&rbc->ob2->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
 
                        /* - constrained-objects sync depends on the constraint-holder */
                        add_relation(trans_key, ob1_key, "RigidBodyConstraint -> RBC.Object_1");
@@ -1286,7 +1286,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
 {
        TimeSourceKey time_src_key;
        OperationKey obdata_ubereval_key(&ob->id,
-                                        DEPSNODE_TYPE_GEOMETRY,
+                                        DEG_NODE_TYPE_GEOMETRY,
                                         DEG_OPCODE_GEOMETRY_UBEREVAL);
 
        /* particle systems */
@@ -1297,7 +1297,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
                build_animdata(&part->id);
 
                /* this particle system */
-               OperationKey psys_key(&ob->id, DEPSNODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, psys->name);
+               OperationKey psys_key(&ob->id, DEG_NODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, psys->name);
 
                /* XXX: if particle system is later re-enabled, we must do full rebuild? */
                if (!psys_check_enabled(ob, psys, G.is_rendering))
@@ -1339,7 +1339,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
                                                ruleob = ((BoidRuleFollowLeader *)rule)->ob;
 
                                        if (ruleob) {
-                                               ComponentKey ruleob_key(&ruleob->id, DEPSNODE_TYPE_TRANSFORM);
+                                               ComponentKey ruleob_key(&ruleob->id, DEG_NODE_TYPE_TRANSFORM);
                                                add_relation(ruleob_key, psys_key, "Boid Rule");
                                        }
                                }
@@ -1347,7 +1347,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
                }
 
                if (part->ren_as == PART_DRAW_OB && part->dup_ob) {
-                       ComponentKey dup_ob_key(&part->dup_ob->id, DEPSNODE_TYPE_TRANSFORM);
+                       ComponentKey dup_ob_key(&part->dup_ob->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(dup_ob_key,
                                     psys_key,
                                     "Particle Object Visualization");
@@ -1360,7 +1360,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
         * TODO(sergey): This relation should be altered once real granular update
         * is implemented.
         */
-       ComponentKey transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
+       ComponentKey transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
        add_relation(transform_key,
                     obdata_ubereval_key,
                     "Partcile Eval");
@@ -1374,12 +1374,12 @@ void DepsgraphRelationBuilder::build_cloth(Scene * /*scene*/,
                                            ModifierData *md)
 {
        OperationKey cache_key(&object->id,
-                              DEPSNODE_TYPE_CACHE,
+                              DEG_NODE_TYPE_CACHE,
                               DEG_OPCODE_PLACEHOLDER,
                               "Cloth Modifier");
        /* Cache component affects on modifier. */
        OperationKey modifier_key(&object->id,
-                                 DEPSNODE_TYPE_GEOMETRY,
+                                 DEG_NODE_TYPE_GEOMETRY,
                                  DEG_OPCODE_GEOMETRY_MODIFIER,
                                  md->name);
        add_relation(cache_key,
@@ -1390,7 +1390,7 @@ void DepsgraphRelationBuilder::build_cloth(Scene * /*scene*/,
 /* Shapekeys */
 void DepsgraphRelationBuilder::build_shapekeys(ID *obdata, Key *key)
 {
-       ComponentKey obdata_key(obdata, DEPSNODE_TYPE_GEOMETRY);
+       ComponentKey obdata_key(obdata, DEG_NODE_TYPE_GEOMETRY);
 
        /* attach animdata to geometry */
        build_animdata(&key->id);
@@ -1398,7 +1398,7 @@ void DepsgraphRelationBuilder::build_shapekeys(ID *obdata, Key *key)
        if (key->adt) {
                // TODO: this should really be handled in build_animdata, since many of these cases will need it
                if (key->adt->action || key->adt->nla_tracks.first) {
-                       ComponentKey adt_key(&key->id, DEPSNODE_TYPE_ANIMATION);
+                       ComponentKey adt_key(&key->id, DEG_NODE_TYPE_ANIMATION);
                        add_relation(adt_key, obdata_key, "Animation");
                }
 
@@ -1407,7 +1407,7 @@ void DepsgraphRelationBuilder::build_shapekeys(ID *obdata, Key *key)
 
        /* attach to geometry */
        // XXX: aren't shapekeys now done as a pseudo-modifier on object?
-       //ComponentKey key_key(&key->id, DEPSNODE_TYPE_GEOMETRY); // FIXME: this doesn't exist
+       //ComponentKey key_key(&key->id, DEG_NODE_TYPE_GEOMETRY); // FIXME: this doesn't exist
        //add_relation(key_key, obdata_key, "Shapekeys");
 }
 
@@ -1436,11 +1436,11 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
        ID *obdata = (ID *)ob->data;
 
        /* Init operation of object-level geometry evaluation. */
-       OperationKey geom_init_key(&ob->id, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Init");
+       OperationKey geom_init_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Init");
 
        /* get nodes for result of obdata's evaluation, and geometry evaluation on object */
-       ComponentKey obdata_geom_key(obdata, DEPSNODE_TYPE_GEOMETRY);
-       ComponentKey geom_key(&ob->id, DEPSNODE_TYPE_GEOMETRY);
+       ComponentKey obdata_geom_key(obdata, DEG_NODE_TYPE_GEOMETRY);
+       ComponentKey geom_key(&ob->id, DEG_NODE_TYPE_GEOMETRY);
 
        /* link components to each other */
        add_relation(obdata_geom_key, geom_key, "Object Geometry Base Data");
@@ -1451,7 +1451,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
 
                LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
                        const ModifierTypeInfo *mti = modifierType_getInfo((ModifierType)md->type);
-                       OperationKey mod_key(&ob->id, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_MODIFIER, md->name);
+                       OperationKey mod_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_MODIFIER, md->name);
 
                        if (md->prev) {
                                /* Stack relation: modifier depends on previous modifier in the stack */
@@ -1483,7 +1483,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
                                 */
                                /* XXX: Remove this hack when these links are added as part of build_animdata() instead */
                                if (modifier_dependsOnTime(md) == false && needs_animdata_node(&ob->id)) {
-                                       ComponentKey animation_key(&ob->id, DEPSNODE_TYPE_ANIMATION);
+                                       ComponentKey animation_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
                                        add_relation(animation_key, mod_key, "Modifier Animation");
                                }
                        }
@@ -1517,10 +1517,10 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
         */
        if (ob->type != OB_ARMATURE) {
                /* Armatures does no longer require uber node. */
-               OperationKey obdata_ubereval_key(&ob->id, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_UBEREVAL);
+               OperationKey obdata_ubereval_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_UBEREVAL);
                if (ob->modifiers.last) {
                        ModifierData *md = (ModifierData *)ob->modifiers.last;
-                       OperationKey mod_key(&ob->id, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_MODIFIER, md->name);
+                       OperationKey mod_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_MODIFIER, md->name);
                        add_relation(mod_key, obdata_ubereval_key, "Object Geometry UberEval");
                }
                else {
@@ -1534,8 +1534,8 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
        obdata->tag |= LIB_TAG_DOIT;
 
        /* Link object data evaluation node to exit operation. */
-       OperationKey obdata_geom_eval_key(obdata, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
-       OperationKey obdata_geom_done_key(obdata, DEPSNODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Done");
+       OperationKey obdata_geom_eval_key(obdata, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+       OperationKey obdata_geom_done_key(obdata, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Done");
        add_relation(obdata_geom_eval_key, obdata_geom_done_key, "ObData Geom Eval Done");
 
        /* type-specific node/links */
@@ -1550,8 +1550,8 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
                        /* motherball - mom depends on children! */
                        if (mom != ob) {
                                /* non-motherball -> cannot be directly evaluated! */
-                               ComponentKey mom_key(&mom->id, DEPSNODE_TYPE_GEOMETRY);
-                               ComponentKey transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
+                               ComponentKey mom_key(&mom->id, DEG_NODE_TYPE_GEOMETRY);
+                               ComponentKey transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(geom_key, mom_key, "Metaball Motherball");
                                add_relation(transform_key, mom_key, "Metaball Motherball");
                        }
@@ -1566,18 +1566,18 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
                        /* curve's dependencies */
                        // XXX: these needs geom data, but where is geom stored?
                        if (cu->bevobj) {
-                               ComponentKey bevob_key(&cu->bevobj->id, DEPSNODE_TYPE_GEOMETRY);
+                               ComponentKey bevob_key(&cu->bevobj->id, DEG_NODE_TYPE_GEOMETRY);
                                build_object(bmain, scene, cu->bevobj);
                                add_relation(bevob_key, geom_key, "Curve Bevel");
                        }
                        if (cu->taperobj) {
-                               ComponentKey taperob_key(&cu->taperobj->id, DEPSNODE_TYPE_GEOMETRY);
+                               ComponentKey taperob_key(&cu->taperobj->id, DEG_NODE_TYPE_GEOMETRY);
                                build_object(bmain, scene, cu->taperobj);
                                add_relation(taperob_key, geom_key, "Curve Taper");
                        }
                        if (ob->type == OB_FONT) {
                                if (cu->textoncurve) {
-                                       ComponentKey textoncurve_key(&cu->textoncurve->id, DEPSNODE_TYPE_GEOMETRY);
+                                       ComponentKey textoncurve_key(&cu->textoncurve->id, DEG_NODE_TYPE_GEOMETRY);
                                        build_object(bmain, scene, cu->textoncurve);
                                        add_relation(textoncurve_key, geom_key, "Text on Curve");
                                }
@@ -1603,8 +1603,8 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje
        }
 
        if (needs_animdata_node(obdata)) {
-               ComponentKey animation_key(obdata, DEPSNODE_TYPE_ANIMATION);
-               ComponentKey parameters_key(obdata, DEPSNODE_TYPE_PARAMETERS);
+               ComponentKey animation_key(obdata, DEG_NODE_TYPE_ANIMATION);
+               ComponentKey parameters_key(obdata, DEG_NODE_TYPE_PARAMETERS);
                add_relation(animation_key, parameters_key,
                             "Geom Parameters");
                /* Evaluation usually depends on animation.
@@ -1625,18 +1625,18 @@ void DepsgraphRelationBuilder::build_camera(Object *ob)
        }
        camera_id->tag |= LIB_TAG_DOIT;
 
-       ComponentKey parameters_key(camera_id, DEPSNODE_TYPE_PARAMETERS);
+       ComponentKey parameters_key(camera_id, DEG_NODE_TYPE_PARAMETERS);
 
        if (needs_animdata_node(camera_id)) {
-               ComponentKey animation_key(camera_id, DEPSNODE_TYPE_ANIMATION);
+               ComponentKey animation_key(camera_id, DEG_NODE_TYPE_ANIMATION);
                add_relation(animation_key, parameters_key,
                             "Camera Parameters");
        }
 
        /* DOF */
        if (cam->dof_ob) {
-               ComponentKey ob_param_key(&ob->id, DEPSNODE_TYPE_PARAMETERS);
-               ComponentKey dof_ob_key(&cam->dof_ob->id, DEPSNODE_TYPE_TRANSFORM);
+               ComponentKey ob_param_key(&ob->id, DEG_NODE_TYPE_PARAMETERS);
+               ComponentKey dof_ob_key(&cam->dof_ob->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(dof_ob_key, ob_param_key, "Camera DOF");
        }
 }
@@ -1651,10 +1651,10 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob)
        }
        lamp_id->tag |= LIB_TAG_DOIT;
 
-       ComponentKey parameters_key(lamp_id, DEPSNODE_TYPE_PARAMETERS);
+       ComponentKey parameters_key(lamp_id, DEG_NODE_TYPE_PARAMETERS);
 
        if (needs_animdata_node(lamp_id)) {
-               ComponentKey animation_key(lamp_id, DEPSNODE_TYPE_ANIMATION);
+               ComponentKey animation_key(lamp_id, DEG_NODE_TYPE_ANIMATION);
                add_relation(animation_key, parameters_key,
                             "Lamp Parameters");
        }
@@ -1662,7 +1662,7 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob)
        /* lamp's nodetree */
        if (la->nodetree) {
                build_nodetree(la->nodetree);
-               ComponentKey nodetree_key(&la->nodetree->id, DEPSNODE_TYPE_PARAMETERS);
+               ComponentKey nodetree_key(&la->nodetree->id, DEG_NODE_TYPE_PARAMETERS);
                add_relation(nodetree_key, parameters_key,
                             "NTree->Lamp Parameters");
        }
@@ -1681,7 +1681,7 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)
        build_animdata(ntree_id);
 
        OperationKey parameters_key(ntree_id,
-                                   DEPSNODE_TYPE_PARAMETERS,
+                                   DEG_NODE_TYPE_PARAMETERS,
                                    DEG_OPCODE_PLACEHOLDER,
                                    "Parameters Eval");
 
@@ -1701,7 +1701,7 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)
                                        group_ntree->id.tag |= LIB_TAG_DOIT;
                                }
                                OperationKey group_parameters_key(&group_ntree->id,
-                                                                 DEPSNODE_TYPE_PARAMETERS,
+                                                                 DEG_NODE_TYPE_PARAMETERS,
                                                                  DEG_OPCODE_PLACEHOLDER,
                                                                  "Parameters Eval");
                                add_relation(group_parameters_key, parameters_key,
@@ -1711,7 +1711,7 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree)
        }
 
        if (needs_animdata_node(ntree_id)) {
-               ComponentKey animation_key(ntree_id, DEPSNODE_TYPE_ANIMATION);
+               ComponentKey animation_key(ntree_id, DEG_NODE_TYPE_ANIMATION);
                add_relation(animation_key, parameters_key,
                             "NTree Parameters");
        }
@@ -1736,11 +1736,11 @@ void DepsgraphRelationBuilder::build_material(Material *ma)
        if (ma->nodetree != NULL) {
                build_nodetree(ma->nodetree);
                OperationKey ntree_key(&ma->nodetree->id,
-                                      DEPSNODE_TYPE_PARAMETERS,
+                                      DEG_NODE_TYPE_PARAMETERS,
                                       DEG_OPCODE_PLACEHOLDER,
                                       "Parameters Eval");
                OperationKey material_key(&ma->id,
-                                         DEPSNODE_TYPE_SHADING,
+                                         DEG_NODE_TYPE_SHADING,
                                          DEG_OPCODE_PLACEHOLDER,
                                          "Material Update");
                add_relation(ntree_key, material_key,
index feae8bca303afe0be0dafd447f6269223731954f..478756e0cffebecf3e3fd971eda669d74ed22e37 100644 (file)
@@ -64,7 +64,7 @@ string TimeSourceKey::identifier() const
 
 ComponentKey::ComponentKey()
         : id(NULL),
-          type(DEPSNODE_TYPE_UNDEFINED),
+          type(DEG_NODE_TYPE_UNDEFINED),
           name("")
 {
 }
@@ -90,7 +90,7 @@ string ComponentKey::identifier() const
 
 OperationKey::OperationKey()
         : id(NULL),
-          component_type(DEPSNODE_TYPE_UNDEFINED),
+          component_type(DEG_NODE_TYPE_UNDEFINED),
           component_name(""),
           opcode(DEG_OPCODE_OPERATION),
           name(""),
index df1d19e59dc2df71b431e6606a2c5d9b95aa9bf7..2e2dc8d5d3e3c8f88ab9d9b7e9c2d604e527d09a 100644 (file)
@@ -83,7 +83,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
         * - see notes on direction of rel below...
         */
        bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
-       OperationKey solver_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_IK_SOLVER);
+       OperationKey solver_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_IK_SOLVER);
 
        /* IK target */
        // XXX: this should get handled as part of the constraint code
@@ -96,24 +96,24 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                 * testing IK solver.
                 */
                // FIXME: geometry targets...
-               ComponentKey pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
+               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
                if ((data->tar->type == OB_ARMATURE) && (data->subtarget[0])) {
                        /* TODO(sergey): This is only for until granular update stores intermediate result. */
                        if (data->tar != ob) {
                                /* different armature - can just read the results */
-                               ComponentKey target_key(&data->tar->id, DEPSNODE_TYPE_BONE, data->subtarget);
+                               ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_BONE, data->subtarget);
                                add_relation(target_key, pose_key, con->name);
                        }
                        else {
                                /* same armature - we'll use the ready state only, just in case this bone is in the chain we're solving */
-                               OperationKey target_key(&data->tar->id, DEPSNODE_TYPE_BONE, data->subtarget, DEG_OPCODE_BONE_DONE);
+                               OperationKey target_key(&data->tar->id, DEG_NODE_TYPE_BONE, data->subtarget, DEG_OPCODE_BONE_DONE);
                                add_relation(target_key, solver_key, con->name);
                        }
                }
                else if (ELEM(data->tar->type, OB_MESH, OB_LATTICE) && (data->subtarget[0])) {
                        /* vertex group target */
                        /* NOTE: for now, we don't need to represent vertex groups separately... */
-                       ComponentKey target_key(&data->tar->id, DEPSNODE_TYPE_GEOMETRY);
+                       ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(target_key, solver_key, con->name);
 
                        if (data->tar->type == OB_MESH) {
@@ -125,7 +125,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                }
                else {
                        /* Standard Object Target */
-                       ComponentKey target_key(&data->tar->id, DEPSNODE_TYPE_TRANSFORM);
+                       ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(target_key, pose_key, con->name);
                }
 
@@ -142,13 +142,13 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
        if (data->poletar != NULL) {
                if ((data->poletar->type == OB_ARMATURE) && (data->polesubtarget[0])) {
                        // XXX: same armature issues - ready vs done?
-                       ComponentKey target_key(&data->poletar->id, DEPSNODE_TYPE_BONE, data->polesubtarget);
+                       ComponentKey target_key(&data->poletar->id, DEG_NODE_TYPE_BONE, data->polesubtarget);
                        add_relation(target_key, solver_key, con->name);
                }
                else if (ELEM(data->poletar->type, OB_MESH, OB_LATTICE) && (data->polesubtarget[0])) {
                        /* vertex group target */
                        /* NOTE: for now, we don't need to represent vertex groups separately... */
-                       ComponentKey target_key(&data->poletar->id, DEPSNODE_TYPE_GEOMETRY);
+                       ComponentKey target_key(&data->poletar->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(target_key, solver_key, con->name);
 
                        if (data->poletar->type == OB_MESH) {
@@ -159,7 +159,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                        }
                }
                else {
-                       ComponentKey target_key(&data->poletar->id, DEPSNODE_TYPE_TRANSFORM);
+                       ComponentKey target_key(&data->poletar->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(target_key, solver_key, con->name);
                }
        }
@@ -170,7 +170,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
        bPoseChannel *parchan = pchan;
        /* exclude tip from chain? */
        if (!(data->flag & CONSTRAINT_IK_TIP)) {
-               OperationKey tip_transforms_key(&ob->id, DEPSNODE_TYPE_BONE,
+               OperationKey tip_transforms_key(&ob->id, DEG_NODE_TYPE_BONE,
                                                parchan->name, DEG_OPCODE_BONE_LOCAL);
                add_relation(solver_key, tip_transforms_key,
                             "IK Solver Result");
@@ -179,7 +179,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
 
        root_map->add_bone(parchan->name, rootchan->name);
 
-       OperationKey parchan_transforms_key(&ob->id, DEPSNODE_TYPE_BONE,
+       OperationKey parchan_transforms_key(&ob->id, DEG_NODE_TYPE_BONE,
                                            parchan->name, DEG_OPCODE_BONE_READY);
        add_relation(parchan_transforms_key, solver_key,
                     "IK Solver Owner");
@@ -196,14 +196,14 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                 * grab the result with IK solver results...
                 */
                if (parchan != pchan) {
-                       OperationKey parent_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
+                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
                        add_relation(parent_key, solver_key, "IK Chain Parent");
 
-                       OperationKey done_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey done_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, done_key, "IK Chain Result");
                }
                else {
-                       OperationKey final_transforms_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, final_transforms_key, "IK Solver Result");
                }
                parchan->flag |= POSE_DONE;
@@ -219,7 +219,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                parchan  = parchan->parent;
        }
 
-       OperationKey flush_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
        add_relation(solver_key, flush_key, "PoseEval Result-Bone Link");
 }
 
@@ -231,8 +231,8 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
 {
        bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
        bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data);
-       OperationKey transforms_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-       OperationKey solver_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
+       OperationKey transforms_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+       OperationKey solver_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
 
        /* attach owner to IK Solver too
         * - assume that owner is always part of chain
@@ -247,13 +247,13 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                 * See IK pose for a bit more information.
                 */
                // TODO: the bigggest point here is that we need the curve PATH and not just the general geometry...
-               ComponentKey target_key(&data->tar->id, DEPSNODE_TYPE_GEOMETRY);
-               ComponentKey pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
+               ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_GEOMETRY);
+               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
                add_relation(target_key, pose_key, "[Curve.Path -> Spline IK] DepsRel");
        }
 
        pchan->flag |= POSE_DONE;
-       OperationKey final_transforms_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+       OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
        add_relation(solver_key, final_transforms_key, "Spline IK Result");
 
        root_map->add_bone(pchan->name, rootchan->name);
@@ -270,15 +270,15 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                 * grab the result with IK solver results...
                 */
                if (parchan != pchan) {
-                       OperationKey parent_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
+                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
                        add_relation(parent_key, solver_key, "Spline IK Solver Update");
 
-                       OperationKey done_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey done_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, done_key, "IK Chain Result");
                }
                parchan->flag |= POSE_DONE;
 
-               OperationKey final_transforms_key(&ob->id, DEPSNODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+               OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                add_relation(solver_key, final_transforms_key, "Spline IK Solver Result");
 
                root_map->add_bone(parchan->name, rootchan->name);
@@ -288,7 +288,7 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                if ((segcount == data->chainlen) || (segcount > 255)) break;  /* 255 is weak */
        }
 
-       OperationKey flush_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
        add_relation(solver_key, flush_key, "PoseEval Result-Bone Link");
 }
 
@@ -301,20 +301,20 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
        // TODO: selection status?
 
        /* attach links between pose operations */
-       OperationKey init_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
-       OperationKey flush_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey init_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
+       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
 
        add_relation(init_key, flush_key, "[Pose Init -> Pose Cleanup]");
 
        /* Make sure pose is up-to-date with armature updates. */
        OperationKey armature_key(&arm->id,
-                                 DEPSNODE_TYPE_PARAMETERS,
+                                 DEG_NODE_TYPE_PARAMETERS,
                                  DEG_OPCODE_PLACEHOLDER,
                                  "Armature Eval");
        add_relation(armature_key, init_key, "Data dependency");
 
        if (needs_animdata_node(&ob->id)) {
-               ComponentKey animation_key(&ob->id, DEPSNODE_TYPE_ANIMATION);
+               ComponentKey animation_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
                add_relation(animation_key, init_key, "Rig Animation");
        }
 
@@ -370,18 +370,18 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
                /* TODO(sergey): Once partial updates are possible use relation between
                 * object transform and solver itself in it's build function.
                 */
-               ComponentKey pose_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE);
-               ComponentKey local_transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM);
+               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey local_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(local_transform_key, pose_key, "Local Transforms");
        }
 
 
        /* links between operations for each bone */
        LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               OperationKey bone_local_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
-               OperationKey bone_pose_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_POSE_PARENT);
-               OperationKey bone_ready_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-               OperationKey bone_done_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+               OperationKey bone_local_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+               OperationKey bone_pose_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_POSE_PARENT);
+               OperationKey bone_ready_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+               OperationKey bone_done_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
 
                pchan->flag &= ~POSE_DONE;
 
@@ -403,17 +403,17 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
                                parent_key_opcode = DEG_OPCODE_BONE_DONE;
                        }
 
-                       OperationKey parent_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
+                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
                        add_relation(parent_key, bone_pose_key, "[Parent Bone -> Child Bone]");
                }
 
                /* constraints */
                if (pchan->constraints.first != NULL) {
                        /* constraints stack and constraint dependencies */
-                       build_constraints(scene, &ob->id, DEPSNODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
+                       build_constraints(scene, &ob->id, DEG_NODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
 
                        /* pose -> constraints */
-                       OperationKey constraints_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_CONSTRAINTS);
+                       OperationKey constraints_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_CONSTRAINTS);
                        add_relation(bone_pose_key, constraints_key, "Constraints Stack");
 
                        /* constraints -> ready */
@@ -439,12 +439,12 @@ void DepsgraphRelationBuilder::build_rig(Scene *scene, Object *ob)
 
 void DepsgraphRelationBuilder::build_proxy_rig(Object *ob)
 {
-       OperationKey pose_init_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
-       OperationKey pose_done_key(&ob->id, DEPSNODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey pose_init_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
+       OperationKey pose_done_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
        LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               OperationKey bone_local_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
-               OperationKey bone_ready_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-               OperationKey bone_done_key(&ob->id, DEPSNODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+               OperationKey bone_local_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+               OperationKey bone_ready_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+               OperationKey bone_done_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
                add_relation(pose_init_key, bone_local_key, "Pose Init -> Bone Local");
                add_relation(bone_local_key, bone_ready_key, "Local -> Ready");
                add_relation(bone_ready_key, bone_done_key, "Ready -> Done");
index da71db09f3dda26eba873c42c666e1f62662d91a..5c825b29354c4e41247c7d56de8da0f084c79143 100644 (file)
@@ -105,7 +105,7 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
                        /* Increment in advance, so we can safely remove the relation. */
                        ++it_rel;
 
-                       if (rel->from->type == DEPSNODE_TYPE_TIMESOURCE) {
+                       if (rel->from->type == DEG_NODE_TYPE_TIMESOURCE) {
                                /* HACK: time source nodes don't get "done" flag set/cleared. */
                                /* TODO: there will be other types in future, so iterators above
                                 * need modifying.
index 96325fb38227f65580f6778966bdfe8353793736..8cc9634f1a33c5bfe28cf9203909c1beca7ca112 100644 (file)
@@ -77,19 +77,19 @@ static const char *deg_debug_colors_light[] = {
 
 #ifdef COLOR_SCHEME_NODE_TYPE
 static const int deg_debug_node_type_color_map[][2] = {
-    {DEPSNODE_TYPE_ROOT,         0},
-    {DEPSNODE_TYPE_TIMESOURCE,   1},
-    {DEPSNODE_TYPE_ID_REF,       2},
+    {DEG_NODE_TYPE_ROOT,         0},
+    {DEG_NODE_TYPE_TIMESOURCE,   1},
+    {DEG_NODE_TYPE_ID_REF,       2},
 
     /* Outer Types */
-    {DEPSNODE_TYPE_PARAMETERS,   3},
-    {DEPSNODE_TYPE_PROXY,        4},
-    {DEPSNODE_TYPE_ANIMATION,    5},
-    {DEPSNODE_TYPE_TRANSFORM,    6},
-    {DEPSNODE_TYPE_GEOMETRY,     7},
-    {DEPSNODE_TYPE_SEQUENCER,    8},
-    {DEPSNODE_TYPE_SHADING,      9},
-    {DEPSNODE_TYPE_CACHE,        10},
+    {DEG_NODE_TYPE_PARAMETERS,   3},
+    {DEG_NODE_TYPE_PROXY,        4},
+    {DEG_NODE_TYPE_ANIMATION,    5},
+    {DEG_NODE_TYPE_TRANSFORM,    6},
+    {DEG_NODE_TYPE_GEOMETRY,     7},
+    {DEG_NODE_TYPE_SEQUENCER,    8},
+    {DEG_NODE_TYPE_SHADING,      9},
+    {DEG_NODE_TYPE_CACHE,        10},
     {-1,                         0}
 };
 #endif
@@ -99,9 +99,9 @@ static int deg_debug_node_color_index(const DepsNode *node)
 #ifdef COLOR_SCHEME_NODE_CLASS
        /* Some special types. */
        switch (node->type) {
-               case DEPSNODE_TYPE_ID_REF:
+               case DEG_NODE_TYPE_ID_REF:
                        return 5;
-               case DEPSNODE_TYPE_OPERATION:
+               case DEG_NODE_TYPE_OPERATION:
                {
                        OperationDepsNode *op_node = (OperationDepsNode *)node;
                        if (op_node->is_noop())
@@ -285,7 +285,7 @@ static void deg_debug_graphviz_node_single(const DebugContext &ctx,
        const char *shape = "box";
        string name = node->identifier();
        float priority = -1.0f;
-       if (node->type == DEPSNODE_TYPE_ID_REF) {
+       if (node->type == DEG_NODE_TYPE_ID_REF) {
                IDDepsNode *id_node = (IDDepsNode *)node;
                char buf[256];
                BLI_snprintf(buf, sizeof(buf), " (Layers: %u)", id_node->layers);
@@ -321,7 +321,7 @@ static void deg_debug_graphviz_node_cluster_begin(const DebugContext &ctx,
                                                   const DepsNode *node)
 {
        string name = node->identifier();
-       if (node->type == DEPSNODE_TYPE_ID_REF) {
+       if (node->type == DEG_NODE_TYPE_ID_REF) {
                IDDepsNode *id_node = (IDDepsNode *)node;
                char buf[256];
                BLI_snprintf(buf, sizeof(buf), " (Layers: %u)", id_node->layers);
@@ -362,7 +362,7 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
                                     const DepsNode *node)
 {
        switch (node->type) {
-               case DEPSNODE_TYPE_ID_REF:
+               case DEG_NODE_TYPE_ID_REF:
                {
                        const IDDepsNode *id_node = (const IDDepsNode *)node;
                        if (BLI_ghash_size(id_node->components) == 0) {
@@ -379,17 +379,17 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
                        }
                        break;
                }
-               case DEPSNODE_TYPE_PARAMETERS:
-               case DEPSNODE_TYPE_ANIMATION:
-               case DEPSNODE_TYPE_TRANSFORM:
-               case DEPSNODE_TYPE_PROXY:
-               case DEPSNODE_TYPE_GEOMETRY:
-               case DEPSNODE_TYPE_SEQUENCER:
-               case DEPSNODE_TYPE_EVAL_POSE:
-               case DEPSNODE_TYPE_BONE:
-               case DEPSNODE_TYPE_SHADING:
-               case DEPSNODE_TYPE_CACHE:
-               case DEPSNODE_TYPE_EVAL_PARTICLES:
+               case DEG_NODE_TYPE_PARAMETERS:
+               case DEG_NODE_TYPE_ANIMATION:
+               case DEG_NODE_TYPE_TRANSFORM:
+               case DEG_NODE_TYPE_PROXY:
+               case DEG_NODE_TYPE_GEOMETRY:
+               case DEG_NODE_TYPE_SEQUENCER:
+               case DEG_NODE_TYPE_EVAL_POSE:
+               case DEG_NODE_TYPE_BONE:
+               case DEG_NODE_TYPE_SHADING:
+               case DEG_NODE_TYPE_CACHE:
+               case DEG_NODE_TYPE_EVAL_PARTICLES:
                {
                        ComponentDepsNode *comp_node = (ComponentDepsNode *)node;
                        if (!comp_node->operations.empty()) {
@@ -413,19 +413,19 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
 static bool deg_debug_graphviz_is_cluster(const DepsNode *node)
 {
        switch (node->type) {
-               case DEPSNODE_TYPE_ID_REF:
+               case DEG_NODE_TYPE_ID_REF:
                {
                        const IDDepsNode *id_node = (const IDDepsNode *)node;
                        return BLI_ghash_size(id_node->components) > 0;
                }
-               case DEPSNODE_TYPE_PARAMETERS:
-               case DEPSNODE_TYPE_ANIMATION:
-               case DEPSNODE_TYPE_TRANSFORM:
-               case DEPSNODE_TYPE_PROXY:
-               case DEPSNODE_TYPE_GEOMETRY:
-               case DEPSNODE_TYPE_SEQUENCER:
-               case DEPSNODE_TYPE_EVAL_POSE:
-               case DEPSNODE_TYPE_BONE:
+               case DEG_NODE_TYPE_PARAMETERS:
+               case DEG_NODE_TYPE_ANIMATION:
+               case DEG_NODE_TYPE_TRANSFORM:
+               case DEG_NODE_TYPE_PROXY:
+               case DEG_NODE_TYPE_GEOMETRY:
+               case DEG_NODE_TYPE_SEQUENCER:
+               case DEG_NODE_TYPE_EVAL_POSE:
+               case DEG_NODE_TYPE_BONE:
                {
                        ComponentDepsNode *comp_node = (ComponentDepsNode *)node;
                        return !comp_node->operations.empty();
index 30146544b76f40270a5e13a17abe8e0c2b9f85f3..330f8a0dcb6df41b9b0fbccfd71dd0a6cb5b23c4 100644 (file)
@@ -128,7 +128,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                bPoseChannel *pchan = (bPoseChannel *)ptr->data;
 
                /* Bone - generally, we just want the bone component... */
-               *type = DEPSNODE_TYPE_BONE;
+               *type = DEG_NODE_TYPE_BONE;
                *subdata = pchan->name;
 
                return true;
@@ -138,7 +138,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
 
                /* armature-level bone, but it ends up going to bone component anyway */
                // TODO: the ID in thise case will end up being bArmature, not Object as needed!
-               *type = DEPSNODE_TYPE_BONE;
+               *type = DEG_NODE_TYPE_BONE;
                *subdata = bone->name;
                //*id = ...
 
@@ -152,7 +152,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                if (BLI_findindex(&ob->constraints, con) != -1) {
                        /* object transform */
                        // XXX: for now, we can't address the specific constraint or the constraint stack...
-                       *type = DEPSNODE_TYPE_TRANSFORM;
+                       *type = DEG_NODE_TYPE_TRANSFORM;
                        return true;
                }
                else if (ob->pose) {
@@ -160,7 +160,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                        for (pchan = (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                                if (BLI_findindex(&pchan->constraints, con) != -1) {
                                        /* bone transforms */
-                                       *type = DEPSNODE_TYPE_BONE;
+                                       *type = DEG_NODE_TYPE_BONE;
                                        *subdata = pchan->name;
                                        return true;
                                }
@@ -175,7 +175,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                 * so although we have unique ops for modifiers,
                 * we can't lump them together
                 */
-               *type = DEPSNODE_TYPE_BONE;
+               *type = DEG_NODE_TYPE_BONE;
                //*subdata = md->name;
 
                return true;
@@ -192,14 +192,14 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                            strstr(prop_identifier, "scale") ||
                            strstr(prop_identifier, "matrix_"))
                        {
-                               *type = DEPSNODE_TYPE_TRANSFORM;
+                               *type = DEG_NODE_TYPE_TRANSFORM;
                                return true;
                        }
                        else if (strstr(prop_identifier, "data")) {
                                /* We access object.data, most likely a geometry.
                                 * Might be a bone tho..
                                 */
-                               *type = DEPSNODE_TYPE_GEOMETRY;
+                               *type = DEG_NODE_TYPE_GEOMETRY;
                                return true;
                        }
                }
@@ -209,21 +209,21 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
 
                /* ShapeKeys are currently handled as geometry on the geometry that owns it */
                *id = key->from; // XXX
-               *type = DEPSNODE_TYPE_PARAMETERS;
+               *type = DEG_NODE_TYPE_PARAMETERS;
 
                return true;
        }
        else if (RNA_struct_is_a(ptr->type, &RNA_Sequence)) {
                Sequence *seq = (Sequence *)ptr->data;
                /* Sequencer strip */
-               *type = DEPSNODE_TYPE_SEQUENCER;
+               *type = DEG_NODE_TYPE_SEQUENCER;
                *subdata = seq->name; // xxx?
                return true;
        }
 
        if (prop) {
                /* All unknown data effectively falls under "parameter evaluation" */
-               *type = DEPSNODE_TYPE_PARAMETERS;
+               *type = DEG_NODE_TYPE_PARAMETERS;
                return true;
        }
 
@@ -263,7 +263,7 @@ static void id_node_deleter(void *value)
 RootDepsNode *Depsgraph::add_root_node()
 {
        if (!root_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEPSNODE_TYPE_ROOT);
+               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_ROOT);
                root_node = (RootDepsNode *)factory->create_node(NULL, "", "Root (Scene)");
        }
        return root_node;
@@ -284,7 +284,7 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, const char *name)
 {
        IDDepsNode *id_node = find_id_node(id);
        if (!id_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEPSNODE_TYPE_ID_REF);
+               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_ID_REF);
                id_node = (IDDepsNode *)factory->create_node(id, "", name);
                id->tag |= LIB_TAG_DOIT;
                /* register */
@@ -318,7 +318,7 @@ DepsRelation *Depsgraph::add_new_relation(OperationDepsNode *from,
        /* TODO(sergey): Find a better place for this. */
 #ifdef WITH_OPENSUBDIV
        ComponentDepsNode *comp_node = from->owner;
-       if (comp_node->type == DEPSNODE_TYPE_GEOMETRY) {
+       if (comp_node->type == DEG_NODE_TYPE_GEOMETRY) {
                IDDepsNode *id_to = to->owner->owner;
                IDDepsNode *id_from = from->owner->owner;
                if (id_to != id_from && (id_to->id->tag & LIB_TAG_ID_RECALC_ALL)) {
index 9abdc3cf0ebd3639cc674aafab8afb43f4a4988e..9434387ecb8264c854f6c5f49cbf8e1f592004e7 100644 (file)
@@ -81,29 +81,29 @@ static DEG::eDepsNode_Type deg_build_scene_component_type(
         eDepsSceneComponentType component)
 {
        switch (component) {
-               case DEG_SCENE_COMP_PARAMETERS:     return DEG::DEPSNODE_TYPE_PARAMETERS;
-               case DEG_SCENE_COMP_ANIMATION:      return DEG::DEPSNODE_TYPE_ANIMATION;
-               case DEG_SCENE_COMP_SEQUENCER:      return DEG::DEPSNODE_TYPE_SEQUENCER;
+               case DEG_SCENE_COMP_PARAMETERS:     return DEG::DEG_NODE_TYPE_PARAMETERS;
+               case DEG_SCENE_COMP_ANIMATION:      return DEG::DEG_NODE_TYPE_ANIMATION;
+               case DEG_SCENE_COMP_SEQUENCER:      return DEG::DEG_NODE_TYPE_SEQUENCER;
        }
-       return DEG::DEPSNODE_TYPE_UNDEFINED;
+       return DEG::DEG_NODE_TYPE_UNDEFINED;
 }
 
 static DEG::eDepsNode_Type deg_build_object_component_type(
         eDepsObjectComponentType component)
 {
        switch (component) {
-               case DEG_OB_COMP_PARAMETERS:        return DEG::DEPSNODE_TYPE_PARAMETERS;
-               case DEG_OB_COMP_PROXY:             return DEG::DEPSNODE_TYPE_PROXY;
-               case DEG_OB_COMP_ANIMATION:         return DEG::DEPSNODE_TYPE_ANIMATION;
-               case DEG_OB_COMP_TRANSFORM:         return DEG::DEPSNODE_TYPE_TRANSFORM;
-               case DEG_OB_COMP_GEOMETRY:          return DEG::DEPSNODE_TYPE_GEOMETRY;
-               case DEG_OB_COMP_EVAL_POSE:         return DEG::DEPSNODE_TYPE_EVAL_POSE;
-               case DEG_OB_COMP_BONE:              return DEG::DEPSNODE_TYPE_BONE;
-               case DEG_OB_COMP_EVAL_PARTICLES:    return DEG::DEPSNODE_TYPE_EVAL_PARTICLES;
-               case DEG_OB_COMP_SHADING:           return DEG::DEPSNODE_TYPE_SHADING;
-               case DEG_OB_COMP_CACHE:             return DEG::DEPSNODE_TYPE_CACHE;
+               case DEG_OB_COMP_PARAMETERS:        return DEG::DEG_NODE_TYPE_PARAMETERS;
+               case DEG_OB_COMP_PROXY:             return DEG::DEG_NODE_TYPE_PROXY;
+               case DEG_OB_COMP_ANIMATION:         return DEG::DEG_NODE_TYPE_ANIMATION;
+               case DEG_OB_COMP_TRANSFORM:         return DEG::DEG_NODE_TYPE_TRANSFORM;
+               case DEG_OB_COMP_GEOMETRY:          return DEG::DEG_NODE_TYPE_GEOMETRY;
+               case DEG_OB_COMP_EVAL_POSE:         return DEG::DEG_NODE_TYPE_EVAL_POSE;
+               case DEG_OB_COMP_BONE:              return DEG::DEG_NODE_TYPE_BONE;
+               case DEG_OB_COMP_EVAL_PARTICLES:    return DEG::DEG_NODE_TYPE_EVAL_PARTICLES;
+               case DEG_OB_COMP_SHADING:           return DEG::DEG_NODE_TYPE_SHADING;
+               case DEG_OB_COMP_CACHE:             return DEG::DEG_NODE_TYPE_CACHE;
        }
-       return DEG::DEPSNODE_TYPE_UNDEFINED;
+       return DEG::DEG_NODE_TYPE_UNDEFINED;
 }
 
 static DEG::DepsNodeHandle *get_handle(DepsNodeHandle *handle)
index 0a8a57ae09f0979f6ae99e423e818cf3cb226a98..6f0a82b5cc2326764e46533b5887864a0246dca4 100644 (file)
@@ -165,7 +165,7 @@ bool DEG_debug_consistency_check(Depsgraph *graph)
                        return false;
                }
                foreach (DEG::DepsRelation *rel, node->outlinks) {
-                       if (rel->to->type == DEG::DEPSNODE_TYPE_OPERATION) {
+                       if (rel->to->type == DEG::DEG_NODE_TYPE_OPERATION) {
                                DEG::OperationDepsNode *to = (DEG::OperationDepsNode *)rel->to;
                                BLI_assert(to->num_links_pending < to->inlinks.size());
                                ++to->num_links_pending;
@@ -177,7 +177,7 @@ bool DEG_debug_consistency_check(Depsgraph *graph)
        foreach (DEG::OperationDepsNode *node, deg_graph->operations) {
                int num_links_pending = 0;
                foreach (DEG::DepsRelation *rel, node->inlinks) {
-                       if (rel->from->type == DEG::DEPSNODE_TYPE_OPERATION) {
+                       if (rel->from->type == DEG::DEG_NODE_TYPE_OPERATION) {
                                ++num_links_pending;
                        }
                }
index 8c4c0b8c8a5a704514d2ac94dadc8828849c9d53..ee45ce536c64d0f030cf688b9f7dd7d26162d9ee 100644 (file)
@@ -337,7 +337,7 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
                                {
                                        id_node->tag_update(graph);
                                        DEG::ComponentDepsNode *anim_comp =
-                                               id_node->find_component(DEG::DEPSNODE_TYPE_ANIMATION);
+                                               id_node->find_component(DEG::DEG_NODE_TYPE_ANIMATION);
                                        if (anim_comp != NULL && object->recalc & OB_RECALC_TIME) {
                                                anim_comp->tag_update(graph);
                                        }
index 3c74ecfc52c15f2e2739dab7e46fad8e5b43d0bb..120ace6a9d89647bc455c98d637642ecb311347e 100644 (file)
@@ -82,53 +82,53 @@ typedef enum eDepsNode_Class {
 /* Types of Nodes */
 typedef enum eDepsNode_Type {
        /* Fallback type for invalid return value */
-       DEPSNODE_TYPE_UNDEFINED        = -1,
+       DEG_NODE_TYPE_UNDEFINED        = -1,
        /* Inner Node (Operation) */
-       DEPSNODE_TYPE_OPERATION        = 0,
+       DEG_NODE_TYPE_OPERATION        = 0,
 
        /* **** Generic Types **** */
 
        /* "Current Scene" - basically whatever kicks off the evaluation process. */
-       DEPSNODE_TYPE_ROOT,
+       DEG_NODE_TYPE_ROOT,
        /* Time-Source */
-       DEPSNODE_TYPE_TIMESOURCE,
+       DEG_NODE_TYPE_TIMESOURCE,
        /* ID-Block reference - used as landmarks/collection point for components,
         * but not usually part of main graph.
         */
-       DEPSNODE_TYPE_ID_REF,
+       DEG_NODE_TYPE_ID_REF,
 
        /* **** Outer Types **** */
 
        /* Parameters Component - Default when nothing else fits
         * (i.e. just SDNA property setting).
         */
-       DEPSNODE_TYPE_PARAMETERS,
+       DEG_NODE_TYPE_PARAMETERS,
        /* Generic "Proxy-Inherit" Component. */
-       DEPSNODE_TYPE_PROXY,
+       DEG_NODE_TYPE_PROXY,
        /* Animation Component
         *
         * XXX: merge in with parameters?
         */
-       DEPSNODE_TYPE_ANIMATION,
+       DEG_NODE_TYPE_ANIMATION,
        /* Transform Component (Parenting/Constraints) */
-       DEPSNODE_TYPE_TRANSFORM,
+       DEG_NODE_TYPE_TRANSFORM,
        /* Geometry Component (DerivedMesh/Displist) */
-       DEPSNODE_TYPE_GEOMETRY,
+       DEG_NODE_TYPE_GEOMETRY,
        /* Sequencer Component (Scene Only) */
-       DEPSNODE_TYPE_SEQUENCER,
+       DEG_NODE_TYPE_SEQUENCER,
 
        /* **** Evaluation-Related Outer Types (with Subdata) **** */
 
        /* Pose Component - Owner/Container of Bones Eval */
-       DEPSNODE_TYPE_EVAL_POSE,
+       DEG_NODE_TYPE_EVAL_POSE,
        /* Bone Component - Child/Subcomponent of Pose */
-       DEPSNODE_TYPE_BONE,
+       DEG_NODE_TYPE_BONE,
        /* Particle Systems Component */
-       DEPSNODE_TYPE_EVAL_PARTICLES,
+       DEG_NODE_TYPE_EVAL_PARTICLES,
        /* Material Shading Component */
-       DEPSNODE_TYPE_SHADING,
+       DEG_NODE_TYPE_SHADING,
        /* Cache Component */
-       DEPSNODE_TYPE_CACHE,
+       DEG_NODE_TYPE_CACHE,
 } eDepsNode_Type;
 
 /* Identifiers for common operations (as an enum). */
index 54947ddbb5e0c567eab99e916e61f4fbf5d45989..e8dbe8e84eb13b9f31956d8b565786b3dbaad353 100644 (file)
@@ -152,7 +152,7 @@ static void calculate_pending_func(void *data_v, int i)
            (node->flag & DEPSOP_FLAG_NEEDS_UPDATE) != 0)
        {
                foreach (DepsRelation *rel, node->inlinks) {
-                       if (rel->from->type == DEPSNODE_TYPE_OPERATION &&
+                       if (rel->from->type == DEG_NODE_TYPE_OPERATION &&
                            (rel->flag & DEPSREL_FLAG_CYCLIC) == 0)
                        {
                                OperationDepsNode *from = (OperationDepsNode *)rel->from;
@@ -197,7 +197,7 @@ static void calculate_eval_priority(OperationDepsNode *node)
 
                foreach (DepsRelation *rel, node->outlinks) {
                        OperationDepsNode *to = (OperationDepsNode *)rel->to;
-                       BLI_assert(to->type == DEPSNODE_TYPE_OPERATION);
+                       BLI_assert(to->type == DEG_NODE_TYPE_OPERATION);
                        calculate_eval_priority(to);
                        node->eval_priority += to->eval_priority;
                }
@@ -265,7 +265,7 @@ static void schedule_children(TaskPool *pool,
 {
        foreach (DepsRelation *rel, node->outlinks) {
                OperationDepsNode *child = (OperationDepsNode *)rel->to;
-               BLI_assert(child->type == DEPSNODE_TYPE_OPERATION);
+               BLI_assert(child->type == DEG_NODE_TYPE_OPERATION);
                if (child->scheduled) {
                        /* Happens when having cyclic dependencies. */
                        continue;
index 89a61ecaca99a1f637547df273a2ff6dc2ea6872..963c16c3a13b6cbeddf3a2e9174836a89619fb86 100644 (file)
@@ -165,28 +165,28 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
                                         * layers visibility update has proper flags to work with.
                                         */
                                        switch (comp_node->type) {
-                                               case DEPSNODE_TYPE_UNDEFINED:
-                                               case DEPSNODE_TYPE_OPERATION:
-                                               case DEPSNODE_TYPE_ROOT:
-                                               case DEPSNODE_TYPE_TIMESOURCE:
-                                               case DEPSNODE_TYPE_ID_REF:
-                                               case DEPSNODE_TYPE_PARAMETERS:
-                                               case DEPSNODE_TYPE_SEQUENCER:
+                                               case DEG_NODE_TYPE_UNDEFINED:
+                                               case DEG_NODE_TYPE_OPERATION:
+                                               case DEG_NODE_TYPE_ROOT:
+                                               case DEG_NODE_TYPE_TIMESOURCE:
+                                               case DEG_NODE_TYPE_ID_REF:
+                                               case DEG_NODE_TYPE_PARAMETERS:
+                                               case DEG_NODE_TYPE_SEQUENCER:
                                                        /* Ignore, does not translate to object component. */
                                                        break;
-                                               case DEPSNODE_TYPE_ANIMATION:
+                                               case DEG_NODE_TYPE_ANIMATION:
                                                        object->recalc |= OB_RECALC_TIME;
                                                        break;
-                                               case DEPSNODE_TYPE_TRANSFORM:
+                                               case DEG_NODE_TYPE_TRANSFORM:
                                                        object->recalc |= OB_RECALC_OB;
                                                        break;
-                                               case DEPSNODE_TYPE_GEOMETRY:
-                                               case DEPSNODE_TYPE_EVAL_POSE:
-                                               case DEPSNODE_TYPE_BONE:
-                                               case DEPSNODE_TYPE_EVAL_PARTICLES:
-                                               case DEPSNODE_TYPE_SHADING:
-                                               case DEPSNODE_TYPE_CACHE:
-                                               case DEPSNODE_TYPE_PROXY:
+                                               case DEG_NODE_TYPE_GEOMETRY:
+                                               case DEG_NODE_TYPE_EVAL_POSE:
+                                               case DEG_NODE_TYPE_BONE:
+                                               case DEG_NODE_TYPE_EVAL_PARTICLES:
+                                               case DEG_NODE_TYPE_SHADING:
+                                               case DEG_NODE_TYPE_CACHE:
+                                               case DEG_NODE_TYPE_PROXY:
                                                        object->recalc |= OB_RECALC_DATA;
                                                        break;
                                        }
index dc2d1a4e0ae9a787432cc7d91e9ded766e3b68f2..bd9d0b37e2eea34064974696bebd410d31a3a012 100644 (file)
@@ -60,9 +60,9 @@ namespace DEG {
 DepsNode::TypeInfo::TypeInfo(eDepsNode_Type type, const char *tname)
 {
        this->type = type;
-       if (type == DEPSNODE_TYPE_OPERATION)
+       if (type == DEG_NODE_TYPE_OPERATION)
                this->tclass = DEPSNODE_CLASS_OPERATION;
-       else if (type < DEPSNODE_TYPE_PARAMETERS)
+       else if (type < DEG_NODE_TYPE_PARAMETERS)
                this->tclass = DEPSNODE_CLASS_GENERIC;
        else
                this->tclass = DEPSNODE_CLASS_COMPONENT;
@@ -124,19 +124,19 @@ RootDepsNode::~RootDepsNode()
 TimeSourceDepsNode *RootDepsNode::add_time_source(const char *name)
 {
        if (!time_source) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEPSNODE_TYPE_TIMESOURCE);
+               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_TIMESOURCE);
                time_source = (TimeSourceDepsNode *)factory->create_node(NULL, "", name);
                /*time_source->owner = this;*/ // XXX
        }
        return time_source;
 }
 
-DEG_DEPSNODE_DEFINE(RootDepsNode, DEPSNODE_TYPE_ROOT, "Root DepsNode");
+DEG_DEPSNODE_DEFINE(RootDepsNode, DEG_NODE_TYPE_ROOT, "Root DepsNode");
 static DepsNodeFactoryImpl<RootDepsNode> DNTI_ROOT;
 
 /* Time Source Node ======================================= */
 
-DEG_DEPSNODE_DEFINE(TimeSourceDepsNode, DEPSNODE_TYPE_TIMESOURCE, "Time Source");
+DEG_DEPSNODE_DEFINE(TimeSourceDepsNode, DEG_NODE_TYPE_TIMESOURCE, "Time Source");
 static DepsNodeFactoryImpl<TimeSourceDepsNode> DNTI_TIMESOURCE;
 
 /* ID Node ================================================ */
@@ -262,8 +262,8 @@ void IDDepsNode::tag_update(Depsgraph *graph)
        GHASH_FOREACH_BEGIN(ComponentDepsNode *, comp_node, components)
        {
                /* TODO(sergey): What about drievrs? */
-               bool do_component_tag = comp_node->type != DEPSNODE_TYPE_ANIMATION;
-               if (comp_node->type == DEPSNODE_TYPE_ANIMATION) {
+               bool do_component_tag = comp_node->type != DEG_NODE_TYPE_ANIMATION;
+               if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
                        AnimData *adt = BKE_animdata_from_id(id);
                        /* Animation data might be null if relations are tagged for update. */
                        if (adt != NULL && (adt->recalc & ADT_RECALC_ANIM)) {
@@ -286,7 +286,7 @@ void IDDepsNode::finalize_build()
        GHASH_FOREACH_END();
 }
 
-DEG_DEPSNODE_DEFINE(IDDepsNode, DEPSNODE_TYPE_ID_REF, "ID Node");
+DEG_DEPSNODE_DEFINE(IDDepsNode, DEG_NODE_TYPE_ID_REF, "ID Node");
 static DepsNodeFactoryImpl<IDDepsNode> DNTI_ID_REF;
 
 void deg_register_base_depsnodes()
index 136c66b951633ec46fbaafad3551b46f9d25e4ec..ce44a82b75df0003e3aafc907cbe97598b0c233c 100644 (file)
@@ -206,7 +206,7 @@ OperationDepsNode *ComponentDepsNode::add_operation(eDepsOperation_Type optype,
 {
        OperationDepsNode *op_node = has_operation(opcode, name, name_tag);
        if (!op_node) {
-               DepsNodeFactory *factory = deg_get_node_factory(DEPSNODE_TYPE_OPERATION);
+               DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_OPERATION);
                op_node = (OperationDepsNode *)factory->create_node(this->owner->id, "", name);
 
                /* register opnode in this component's operation set */
@@ -336,37 +336,37 @@ void ComponentDepsNode::finalize_build()
 
 /* Parameter Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(ParametersComponentDepsNode, DEPSNODE_TYPE_PARAMETERS, "Parameters Component");
+DEG_DEPSNODE_DEFINE(ParametersComponentDepsNode, DEG_NODE_TYPE_PARAMETERS, "Parameters Component");
 static DepsNodeFactoryImpl<ParametersComponentDepsNode> DNTI_PARAMETERS;
 
 /* Animation Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(AnimationComponentDepsNode, DEPSNODE_TYPE_ANIMATION, "Animation Component");
+DEG_DEPSNODE_DEFINE(AnimationComponentDepsNode, DEG_NODE_TYPE_ANIMATION, "Animation Component");
 static DepsNodeFactoryImpl<AnimationComponentDepsNode> DNTI_ANIMATION;
 
 /* Transform Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(TransformComponentDepsNode, DEPSNODE_TYPE_TRANSFORM, "Transform Component");
+DEG_DEPSNODE_DEFINE(TransformComponentDepsNode, DEG_NODE_TYPE_TRANSFORM, "Transform Component");
 static DepsNodeFactoryImpl<TransformComponentDepsNode> DNTI_TRANSFORM;
 
 /* Proxy Component Defines ================================ */
 
-DEG_DEPSNODE_DEFINE(ProxyComponentDepsNode, DEPSNODE_TYPE_PROXY, "Proxy Component");
+DEG_DEPSNODE_DEFINE(ProxyComponentDepsNode, DEG_NODE_TYPE_PROXY, "Proxy Component");
 static DepsNodeFactoryImpl<ProxyComponentDepsNode> DNTI_PROXY;
 
 /* Geometry Component Defines ============================= */
 
-DEG_DEPSNODE_DEFINE(GeometryComponentDepsNode, DEPSNODE_TYPE_GEOMETRY, "Geometry Component");
+DEG_DEPSNODE_DEFINE(GeometryComponentDepsNode, DEG_NODE_TYPE_GEOMETRY, "Geometry Component");
 static DepsNodeFactoryImpl<GeometryComponentDepsNode> DNTI_GEOMETRY;
 
 /* Sequencer Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(SequencerComponentDepsNode, DEPSNODE_TYPE_SEQUENCER, "Sequencer Component");
+DEG_DEPSNODE_DEFINE(SequencerComponentDepsNode, DEG_NODE_TYPE_SEQUENCER, "Sequencer Component");
 static DepsNodeFactoryImpl<SequencerComponentDepsNode> DNTI_SEQUENCER;
 
 /* Pose Component ========================================= */
 
-DEG_DEPSNODE_DEFINE(PoseComponentDepsNode, DEPSNODE_TYPE_EVAL_POSE, "Pose Eval Component");
+DEG_DEPSNODE_DEFINE(PoseComponentDepsNode, DEG_NODE_TYPE_EVAL_POSE, "Pose Eval Component");
 static DepsNodeFactoryImpl<PoseComponentDepsNode> DNTI_EVAL_POSE;
 
 /* Bone Component ========================================= */
@@ -388,22 +388,22 @@ void BoneComponentDepsNode::init(const ID *id, const char *subdata)
        this->pchan = BKE_pose_channel_find_name(ob->pose, subdata);
 }
 
-DEG_DEPSNODE_DEFINE(BoneComponentDepsNode, DEPSNODE_TYPE_BONE, "Bone Component");
+DEG_DEPSNODE_DEFINE(BoneComponentDepsNode, DEG_NODE_TYPE_BONE, "Bone Component");
 static DepsNodeFactoryImpl<BoneComponentDepsNode> DNTI_BONE;
 
 /* Particles Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(ParticlesComponentDepsNode, DEPSNODE_TYPE_EVAL_PARTICLES, "Particles Component");
+DEG_DEPSNODE_DEFINE(ParticlesComponentDepsNode, DEG_NODE_TYPE_EVAL_PARTICLES, "Particles Component");
 static DepsNodeFactoryImpl<ParticlesComponentDepsNode> DNTI_EVAL_PARTICLES;
 
 /* Shading Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(ShadingComponentDepsNode, DEPSNODE_TYPE_SHADING, "Shading Component");
+DEG_DEPSNODE_DEFINE(ShadingComponentDepsNode, DEG_NODE_TYPE_SHADING, "Shading Component");
 static DepsNodeFactoryImpl<ShadingComponentDepsNode> DNTI_SHADING;
 
 /* Cache Component Defines ============================ */
 
-DEG_DEPSNODE_DEFINE(CacheComponentDepsNode, DEPSNODE_TYPE_CACHE, "Cache Component");
+DEG_DEPSNODE_DEFINE(CacheComponentDepsNode, DEG_NODE_TYPE_CACHE, "Cache Component");
 static DepsNodeFactoryImpl<CacheComponentDepsNode> DNTI_CACHE;
 
 
index cbf397bc7a965271d2a679496a95ac7b9f4af108..5af5ef1b4d1d6418a71d1356abe55fbfcd11e0e6 100644 (file)
@@ -65,7 +65,7 @@ string OperationDepsNode::identifier() const
 string OperationDepsNode::full_identifier() const
 {
        string owner_str = "";
-       if (owner->type == DEPSNODE_TYPE_BONE) {
+       if (owner->type == DEG_NODE_TYPE_BONE) {
                owner_str = string(owner->owner->name) + "." + owner->name;
        }
        else {
@@ -84,7 +84,7 @@ void OperationDepsNode::tag_update(Depsgraph *graph)
        graph->add_entry_tag(this);
 }
 
-DEG_DEPSNODE_DEFINE(OperationDepsNode, DEPSNODE_TYPE_OPERATION, "Operation");
+DEG_DEPSNODE_DEFINE(OperationDepsNode, DEG_NODE_TYPE_OPERATION, "Operation");
 static DepsNodeFactoryImpl<OperationDepsNode> DNTI_OPERATION;
 
 void deg_register_operation_depsnodes()