[Bf-blender-cvs] [8cf9c58906f] blender2.8: Depsgraph: Put original and evaluated ID node pointers to graphviz

Sergey Sharybin noreply at git.blender.org
Tue May 1 10:24:36 CEST 2018


Commit: 8cf9c58906f756bb556e0f290c9d005455502a6c
Author: Sergey Sharybin
Date:   Mon Apr 30 17:31:04 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB8cf9c58906f756bb556e0f290c9d005455502a6c

Depsgraph: Put original and evaluated ID node pointers to graphviz

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

M	source/blender/depsgraph/intern/nodes/deg_node_id.cc
M	source/blender/depsgraph/intern/nodes/deg_node_id.h

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

diff --git a/source/blender/depsgraph/intern/nodes/deg_node_id.cc b/source/blender/depsgraph/intern/nodes/deg_node_id.cc
index edc5c0114f9..9f161db73ad 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_id.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_id.cc
@@ -172,6 +172,15 @@ void IDDepsNode::destroy()
 	id_orig = NULL;
 }
 
+string IDDepsNode::identifier() const
+{
+	char orig_ptr[24], cow_ptr[24];
+	BLI_snprintf(orig_ptr, sizeof(orig_ptr), "%p", id_orig);
+	BLI_snprintf(cow_ptr, sizeof(cow_ptr), "%p", id_cow);
+	return string(nodeTypeAsString(type)) + " : " + name +
+	        " (orig: " + orig_ptr + ", eval: " + cow_ptr + ")";
+}
+
 ComponentDepsNode *IDDepsNode::find_component(eDepsNode_Type type,
                                               const char *name) const
 {
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_id.h b/source/blender/depsgraph/intern/nodes/deg_node_id.h
index 505a1129192..12dbc16b4fa 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_id.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_id.h
@@ -51,6 +51,8 @@ struct IDDepsNode : public DepsNode {
 	~IDDepsNode();
 	void destroy();
 
+	virtual string identifier() const;
+
 	ComponentDepsNode *find_component(eDepsNode_Type type,
 	                                  const char *name = "") const;
 	ComponentDepsNode *add_component(eDepsNode_Type type,



More information about the Bf-blender-cvs mailing list