Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
| Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
| #ifdef COLOR_SCHEME_NODE_CLASS | #ifdef COLOR_SCHEME_NODE_CLASS | ||||
| /* Some special types. */ | /* Some special types. */ | ||||
| switch (node->type) { | switch (node->type) { | ||||
| case NodeType::ID_REF: | case NodeType::ID_REF: | ||||
| return 5; | return 5; | ||||
| case NodeType::OPERATION: { | case NodeType::OPERATION: { | ||||
| OperationNode *op_node = (OperationNode *)node; | OperationNode *op_node = (OperationNode *)node; | ||||
| if (op_node->is_noop()) { | if (op_node->is_noop()) { | ||||
| if (op_node->flag & OperationFlag::DEPSOP_FLAG_FAKE_USER) { | |||||
| return 7; | |||||
| } | |||||
| return 8; | return 8; | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | static void deg_debug_graphviz_legend(const DebugContext &ctx) | ||||
| deg_debug_fprintf(ctx, "<TR><TD COLSPAN=\"2\"><B>Legend</B></TD></TR>" NL); | deg_debug_fprintf(ctx, "<TR><TD COLSPAN=\"2\"><B>Legend</B></TD></TR>" NL); | ||||
| #ifdef COLOR_SCHEME_NODE_CLASS | #ifdef COLOR_SCHEME_NODE_CLASS | ||||
| const char **colors = deg_debug_colors_light; | const char **colors = deg_debug_colors_light; | ||||
| deg_debug_graphviz_legend_color(ctx, "Operation", colors[4]); | deg_debug_graphviz_legend_color(ctx, "Operation", colors[4]); | ||||
| deg_debug_graphviz_legend_color(ctx, "Component", colors[1]); | deg_debug_graphviz_legend_color(ctx, "Component", colors[1]); | ||||
| deg_debug_graphviz_legend_color(ctx, "ID Node", colors[5]); | deg_debug_graphviz_legend_color(ctx, "ID Node", colors[5]); | ||||
| deg_debug_graphviz_legend_color(ctx, "NOOP", colors[8]); | deg_debug_graphviz_legend_color(ctx, "NOOP", colors[8]); | ||||
| deg_debug_graphviz_legend_color(ctx, "Pinned OP", colors[7]); | |||||
| #endif | #endif | ||||
| #ifdef COLOR_SCHEME_NODE_TYPE | #ifdef COLOR_SCHEME_NODE_TYPE | ||||
| const int(*pair)[2]; | const int(*pair)[2]; | ||||
| for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) { | for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) { | ||||
| DepsNodeFactory *nti = type_get_factory((NodeType)(*pair)[0]); | DepsNodeFactory *nti = type_get_factory((NodeType)(*pair)[0]); | ||||
| deg_debug_graphviz_legend_color( | deg_debug_graphviz_legend_color( | ||||
| ctx, nti->tname().c_str(), deg_debug_colors_light[(*pair)[1] % deg_debug_max_colors]); | ctx, nti->tname().c_str(), deg_debug_colors_light[(*pair)[1] % deg_debug_max_colors]); | ||||
| ▲ Show 20 Lines • Show All 409 Lines • Show Last 20 Lines | |||||