From 3a7361ec395293477bb395832459339348fb8e8b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 1 Jun 2017 15:42:53 +0200 Subject: Depsgraph: Cleanup, use DEG_NODE_CLASS prefix for node classes --- .../depsgraph/intern/debug/deg_debug_graphviz.cc | 22 +++++++++++----------- source/blender/depsgraph/intern/depsgraph_types.h | 6 +++--- source/blender/depsgraph/intern/nodes/deg_node.cc | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'source/blender/depsgraph/intern') 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; } -- cgit v1.2.3