[Bf-blender-cvs] [1418a12] depsgraph_refactor: Made debugging identifiers for nodes less "scary" looking

Joshua Leung noreply at git.blender.org
Thu Dec 18 05:09:30 CET 2014


Commit: 1418a1298d87cb9dfd0f2c090b2bd7b3beb7a8f5
Author: Joshua Leung
Date:   Thu Dec 18 17:08:52 2014 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rB1418a1298d87cb9dfd0f2c090b2bd7b3beb7a8f5

Made debugging identifiers for nodes less "scary" looking

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

M	source/blender/depsgraph/intern/depsnode.cpp
M	source/blender/depsgraph/intern/depsnode_component.cpp

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

diff --git a/source/blender/depsgraph/intern/depsnode.cpp b/source/blender/depsgraph/intern/depsnode.cpp
index 828ace9..c254ec4 100644
--- a/source/blender/depsgraph/intern/depsnode.cpp
+++ b/source/blender/depsgraph/intern/depsnode.cpp
@@ -69,10 +69,10 @@ DepsNode::~DepsNode()
 /* Generic identifier for Depsgraph Nodes */
 string DepsNode::identifier() const
 {
-	char typebuf[5];
-	sprintf(typebuf, "%d", type);
+	char typebuf[7];
+	sprintf(typebuf, "(%d)", type);
 	
-	return string("Node(") + "t: " + typebuf + ", n: '" + name + "')";
+	return string(typebuf) + " : " + name;
 }
 
 /* ******************************************************** */
diff --git a/source/blender/depsgraph/intern/depsnode_component.cpp b/source/blender/depsgraph/intern/depsnode_component.cpp
index 860e448..2b39e45 100644
--- a/source/blender/depsgraph/intern/depsnode_component.cpp
+++ b/source/blender/depsgraph/intern/depsnode_component.cpp
@@ -89,12 +89,12 @@ ComponentDepsNode::~ComponentDepsNode()
 
 string ComponentDepsNode::identifier() const
 {
-	const char *idname = this->owner->name.c_str();
+	string &idname = this->owner->name;
 	
-	char typebuf[5];
-	sprintf(typebuf, "%d", type);
+	char typebuf[7];
+	sprintf(typebuf, "(%d)", type);
 	
-	return string("Component(") + idname + " - " + typebuf + " " + name.c_str() + ")";
+	return string(typebuf) + name + " : " + idname;
 }
 
 OperationDepsNode *ComponentDepsNode::find_operation(OperationIDKey key) const




More information about the Bf-blender-cvs mailing list