Commit: 3a7361ec395293477bb395832459339348fb8e8b
Author: Sergey Sharybin
Date:   Thu Jun 1 15:42:53 2017 +0200
Branches: master
https://developer.blender.org/rB3a7361ec395293477bb395832459339348fb8e8b

Depsgraph: Cleanup, use DEG_NODE_CLASS prefix for node classes

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

M       source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
M       source/blender/depsgraph/intern/depsgraph_types.h
M       source/blender/depsgraph/intern/nodes/deg_node.cc

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

diff --git a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc 
b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
index 8cc9634f1a3..8da3e097d07 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
@@ -114,9 +114,9 @@ static int deg_debug_node_color_index(const DepsNode *node)
        }
        /* Do others based on class. */
        switch (node->tclass) {
-               case DEPSNODE_CLASS_OPERATION:
+               case DEG_NODE_CLASS_OPERATION:
                        return 4;
-               case DEPSNODE_CLASS_COMPONENT:
+               case DEG_NODE_CLASS_COMPONENT:
                        return 1;
                default:
                        return 9;
@@ -200,7 +200,7 @@ static void deg_debug_graphviz_node_color(const 
DebugContext &ctx,
        const char *color_update = "dodgerblue3";
        const char *color = color_default;
        if (ctx.show_tags) {
-               if (node->tclass == DEPSNODE_CLASS_OPERATION) {
+               if (node->tclass == DEG_NODE_CLASS_OPERATION) {
                        OperationDepsNode *op_node = (OperationDepsNode *)node;
                        if (op_node->flag & DEPSOP_FLAG_DIRECTLY_MODIFIED) {
                                color = color_modified;
@@ -221,7 +221,7 @@ static void deg_debug_graphviz_node_penwidth(const 
DebugContext &ctx,
        float penwidth_update = 4.0f;
        float penwidth = penwidth_default;
        if (ctx.show_tags) {
-               if (node->tclass == DEPSNODE_CLASS_OPERATION) {
+               if (node->tclass == DEG_NODE_CLASS_OPERATION) {
                        OperationDepsNode *op_node = (OperationDepsNode *)node;
                        if (op_node->flag & DEPSOP_FLAG_DIRECTLY_MODIFIED) {
                                penwidth = penwidth_modified;
@@ -259,7 +259,7 @@ static void deg_debug_graphviz_node_style(const 
DebugContext &ctx, const DepsNod
 {
        const char *base_style = "filled"; /* default style */
        if (ctx.show_tags) {
-               if (node->tclass == DEPSNODE_CLASS_OPERATION) {
+               if (node->tclass == DEG_NODE_CLASS_OPERATION) {
                        OperationDepsNode *op_node = (OperationDepsNode *)node;
                        if (op_node->flag & (DEPSOP_FLAG_DIRECTLY_MODIFIED | 
DEPSOP_FLAG_NEEDS_UPDATE)) {
                                base_style = "striped";
@@ -267,13 +267,13 @@ static void deg_debug_graphviz_node_style(const 
DebugContext &ctx, const DepsNod
                }
        }
        switch (node->tclass) {
-               case DEPSNODE_CLASS_GENERIC:
+               case DEG_NODE_CLASS_GENERIC:
                        deg_debug_fprintf(ctx, "\"%s\"", base_style);
                        break;
-               case DEPSNODE_CLASS_COMPONENT:
+               case DEG_NODE_CLASS_COMPONENT:
                        deg_debug_fprintf(ctx, "\"%s\"", base_style);
                        break;
-               case DEPSNODE_CLASS_OPERATION:
+               case DEG_NODE_CLASS_OPERATION:
                        deg_debug_fprintf(ctx, "\"%s,rounded\"", base_style);
                        break;
        }
@@ -291,7 +291,7 @@ static void deg_debug_graphviz_node_single(const 
DebugContext &ctx,
                BLI_snprintf(buf, sizeof(buf), " (Layers: %u)", 
id_node->layers);
                name += buf;
        }
-       if (ctx.show_eval_priority && node->tclass == DEPSNODE_CLASS_OPERATION) 
{
+       if (ctx.show_eval_priority && node->tclass == DEG_NODE_CLASS_OPERATION) 
{
                priority = ((OperationDepsNode *)node)->eval_priority;
        }
        deg_debug_fprintf(ctx, "// %s\n", name.c_str());
@@ -439,14 +439,14 @@ static bool deg_debug_graphviz_is_owner(const DepsNode 
*node,
                                         const DepsNode *other)
 {
        switch (node->tclass) {
-               case DEPSNODE_CLASS_COMPONENT:
+               case DEG_NODE_CLASS_COMPONENT:
                {
                        ComponentDepsNode *comp_node = (ComponentDepsNode 
*)node;
                        if (comp_node->owner == other)
                                return true;
                        break;
                }
-               case DEPSNODE_CLASS_OPERATION:
+               case DEG_NODE_CLASS_OPERATION:
                {
                        OperationDepsNode *op_node = (OperationDepsNode *)node;
                        if (op_node->owner == other)
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h 
b/source/blender/depsgraph/intern/depsgraph_types.h
index 120ace6a9d8..6de0f8d7506 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -67,16 +67,16 @@ typedef enum eDepsNode_Class {
        /* Types generally unassociated with user-visible entities,
         * but needed for graph functioning.
         */
-       DEPSNODE_CLASS_GENERIC         = 0,
+       DEG_NODE_CLASS_GENERIC         = 0,
        /* [Outer Node] An "aspect" of evaluating/updating an ID-Block, 
requiring
         * certain types of evaluation behavior.
         */
-       DEPSNODE_CLASS_COMPONENT       = 1,
+       DEG_NODE_CLASS_COMPONENT       = 1,
        /* [Inner Node] A glorified function-pointer/callback for scheduling up
         * evaluation operations for components, subject to relationship
         * requirements.
         */
-       DEPSNODE_CLASS_OPERATION       = 2,
+       DEG_NODE_CLASS_OPERATION       = 2,
 } eDepsNode_Class;
 
 /* Types of Nodes */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node.cc 
b/source/blender/depsgraph/intern/nodes/deg_node.cc
index bd9d0b37e2e..be4783e616f 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node.cc
@@ -61,11 +61,11 @@ DepsNode::TypeInfo::TypeInfo(eDepsNode_Type type, const 
char *tname)
 {
        this->type = type;
        if (type == DEG_NODE_TYPE_OPERATION)
-               this->tclass = DEPSNODE_CLASS_OPERATION;
+               this->tclass = DEG_NODE_CLASS_OPERATION;
        else if (type < DEG_NODE_TYPE_PARAMETERS)
-               this->tclass = DEPSNODE_CLASS_GENERIC;
+               this->tclass = DEG_NODE_CLASS_GENERIC;
        else
-               this->tclass = DEPSNODE_CLASS_COMPONENT;
+               this->tclass = DEG_NODE_CLASS_COMPONENT;
        this->tname = tname;
 }

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

Reply via email to