39 #define COLOR_SCHEME_NODE_CLASS 1
46 #ifdef COLOR_SCHEME_NODE_TYPE
47 static const char *deg_debug_colors[] = {
79 #ifdef COLOR_SCHEME_NODE_TYPE
80 static const int deg_debug_node_type_color_map[][2] = {
101 #ifdef COLOR_SCHEME_NODE_CLASS
131 #ifdef COLOR_SCHEME_NODE_TYPE
133 for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) {
151 std::stringstream &ss)
155 ss <<
"<TD>" << name <<
"</TD>";
156 ss <<
"<TD BGCOLOR=\"" <<
color <<
"\"></TD>";
167 std::stringstream ss;
169 ss << R
"(<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">)";
170 ss << "<TR><TD COLSPAN=\"2\"><B>Legend</B></TD></TR>";
172 #ifdef COLOR_SCHEME_NODE_CLASS
181 #ifdef COLOR_SCHEME_NODE_TYPE
183 for (pair = deg_debug_node_type_color_map; (*pair)[0] >= 0; pair++) {
200 const char *color_default =
"black";
201 const char *color_modified =
"orangered4";
202 const char *color_update =
"dodgerblue3";
203 const char *
color = color_default;
208 color = color_modified;
211 color = color_update;
222 float penwidth_default = 1.0f;
223 float penwidth_modified = 4.0f;
224 float penwidth_update = 4.0f;
225 float penwidth = penwidth_default;
230 penwidth = penwidth_modified;
233 penwidth = penwidth_update;
237 dot_attributes.
set(
"penwidth", penwidth);
242 const char *defaultcolor =
"gainsboro";
244 const char *fillcolor = color_index < 0 ?
247 dot_attributes.
set(
"fillcolor", fillcolor);
252 const char *color_default =
"black";
253 const char *color_cyclic =
"red4";
254 const char *color_godmode =
"blue4";
255 const char *
color = color_default;
257 color = color_cyclic;
260 color = color_godmode;
262 edge.attributes.set(
"color",
color);
267 const char *style_default =
"solid";
268 const char *style_no_flush =
"dashed";
269 const char *style_flush_user_only =
"dotted";
270 const char *style = style_default;
272 style = style_no_flush;
275 style = style_flush_user_only;
277 edge.attributes.set(
"style", style);
282 const char *shape_default =
"normal";
283 const char *shape_no_cow =
"box";
284 const char *shape = shape_default;
290 !op_to->owner->need_tag_cow_before_update()) {
291 shape = shape_no_cow;
294 edge.attributes.set(
"arrowhead", shape);
306 base_style =
"striped";
312 dot_attributes.
set(
"style", base_style);
315 dot_attributes.
set(
"style", base_style);
318 dot_attributes.
set(
"style", base_style +
",rounded");
437 float penwidth = 2.0f;
439 const Node *head = rel->
to;
447 edge.attributes.set(
"id", rel->
name);
451 edge.attributes.set(
"penwidth", penwidth);
457 if (tail_cluster !=
nullptr && tail_cluster->
contains(dot_head)) {
458 edge.attributes.set(
"ltail", tail_cluster->
name());
461 if (head_cluster !=
nullptr && head_cluster->
contains(dot_tail)) {
462 edge.attributes.set(
"lhead", head_cluster->
name());
473 if (time_source !=
nullptr) {
489 if (time_source !=
nullptr) {
507 digraph.
set_rankdir(dot::Attr_rankdir::LeftToRight);
522 fprintf(fp,
"%s", dot_string.c_str());
struct Depsgraph Depsgraph
These structs are the foundation for all linked lists in the library system.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
void set(StringRef key, StringRef value)
void set_parent_cluster(Cluster *new_parent)
bool contains(Node &node) const
DirectedEdge & new_edge(NodePort from, NodePort to)
std::string to_dot_string() const
Cluster & new_cluster(StringRef label="")
Node & new_node(StringRef label)
void set_rankdir(Attr_rankdir rankdir)
void set_parent_cluster(Cluster *cluster)
void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *fp, const char *label)
static int deg_debug_node_color_index(const Node *node)
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
static void deg_debug_graphviz_graph_relations(DotExportContext &ctx, const Depsgraph *graph)
static void deg_debug_graphviz_legend(DotExportContext &ctx)
static float deg_debug_graphviz_node_label_size
static const char * deg_debug_colors_light[]
static void deg_debug_graphviz_node(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static const int deg_debug_max_colors
static float deg_debug_graphviz_graph_label_size
static void deg_debug_graphviz_graph_nodes(DotExportContext &ctx, const Depsgraph *graph)
DepsNodeFactory * type_get_factory(const NodeType type)
static void deg_debug_graphviz_node_single(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static void deg_debug_graphviz_node_fillcolor(const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_relation_style(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_relation_arrowhead(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_legend_color(const char *name, const char *color, std::stringstream &ss)
static dot::Cluster & deg_debug_graphviz_node_cluster_create(DotExportContext &ctx, const Node *node, dot::Cluster *parent_cluster)
static void deg_debug_graphviz_node_relations(DotExportContext &ctx, const Node *node)
@ DEPSOP_FLAG_NEEDS_UPDATE
@ DEPSOP_FLAG_DIRECTLY_MODIFIED
static const char * deg_debug_graphviz_fontname
static void deg_debug_graphviz_relation_color(const Relation *rel, dot::DirectedEdge &edge)
static void deg_debug_graphviz_node_style(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_node_penwidth(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
static void deg_debug_graphviz_node_color(DotExportContext &ctx, const Node *node, dot::Attributes &dot_attributes)
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
Vector< OperationNode * > operations
TimeSourceNode * find_time_source() const
dot::DirectedGraph & digraph
Map< const Node *, dot::Cluster * > clusters_map
Map< const Node *, dot::Node * > nodes_map
Map< ComponentIDKey, ComponentNode * > components
virtual NodeClass get_class() const
virtual string identifier() const override