[Bf-blender-cvs] [db73f57] depsgraph_refactor: Graphviz debug support for relations on operations.

Lukas Tönne noreply at git.blender.org
Thu Apr 17 15:32:39 CEST 2014


Commit: db73f57654ca4da8b8d58cb9c6c9a9631c398518
Author: Lukas Tönne
Date:   Thu Apr 17 15:26:38 2014 +0200
https://developer.blender.org/rBdb73f57654ca4da8b8d58cb9c6c9a9631c398518

Graphviz debug support for relations on operations.

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

M	source/blender/depsgraph/intern/depsgraph_debug.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cpp b/source/blender/depsgraph/intern/depsgraph_debug.cpp
index a24e287..94f9e6c 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cpp
@@ -512,26 +512,25 @@ static void deg_debug_graphviz_node_relations(const DebugContext &ctx, const Dep
 	}
 	DEPSNODE_RELATIONS_ITER_END;
 
-	switch (node->type) {
-		case DEPSNODE_TYPE_ID_REF: {
-			const IDDepsNode *id_node = (const IDDepsNode *)node;
-			for (IDDepsNode::ComponentMap::const_iterator it = id_node->components.begin(); it != id_node->components.end(); ++it) {
-				const ComponentDepsNode *comp = it->second;
-				deg_debug_graphviz_node_relations(ctx, comp);
-			}
-			break;
+	if (node->tclass == DEPSNODE_CLASS_COMPONENT) {
+		const ComponentDepsNode *comp_node = (const ComponentDepsNode *)node;
+		for (ComponentDepsNode::OperationMap::const_iterator it = comp_node->operations.begin(); it != comp_node->operations.end(); ++it) {
+			OperationDepsNode *op_node = it->second;
+			deg_debug_graphviz_node_relations(ctx, op_node);
 		}
-		
-		case DEPSNODE_TYPE_SUBGRAPH: {
-			SubgraphDepsNode *sub_node = (SubgraphDepsNode *)node;
-			if (sub_node->graph) {
-				deg_debug_graphviz_graph_relations(ctx, sub_node->graph);
-			}
-			break;
+	}
+	else if (node->type == DEPSNODE_TYPE_ID_REF) {
+		const IDDepsNode *id_node = (const IDDepsNode *)node;
+		for (IDDepsNode::ComponentMap::const_iterator it = id_node->components.begin(); it != id_node->components.end(); ++it) {
+			const ComponentDepsNode *comp = it->second;
+			deg_debug_graphviz_node_relations(ctx, comp);
+		}
+	}
+	else if (node->type == DEPSNODE_TYPE_SUBGRAPH) {
+		SubgraphDepsNode *sub_node = (SubgraphDepsNode *)node;
+		if (sub_node->graph) {
+			deg_debug_graphviz_graph_relations(ctx, sub_node->graph);
 		}
-		
-		default:
-			break;
 	}
 }




More information about the Bf-blender-cvs mailing list