[Bf-blender-cvs] [833e29e] depsgraph_refactor: Resolve TODO: We can check for specific components by using the type instead of using strings

Joshua Leung noreply at git.blender.org
Fri Jan 2 05:15:19 CET 2015


Commit: 833e29e522b27caec2b411480808ddda035271be
Author: Joshua Leung
Date:   Fri Jan 2 14:30:11 2015 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rB833e29e522b27caec2b411480808ddda035271be

Resolve TODO: We can check for specific components by using the type instead of using strings

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

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

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

diff --git a/source/blender/depsgraph/intern/depsnode.cpp b/source/blender/depsgraph/intern/depsnode.cpp
index 43ee5eb..be576dc 100644
--- a/source/blender/depsgraph/intern/depsnode.cpp
+++ b/source/blender/depsgraph/intern/depsnode.cpp
@@ -217,10 +217,8 @@ void IDDepsNode::tag_update(Depsgraph *graph)
 		ComponentDepsNode *comp_node = it->second;
 		/* Animation component should only be tagged for update by the time
 		 * updates or by tagging the animation itself.
-		 *
-		 * TODO(sergey): Make it faster than stupid string comparison.
 		 */
-		if (comp_node->name != "Animation Component") {
+		if (comp_node->type != DEPSNODE_TYPE_ANIMATION) {
 			comp_node->tag_update(graph);
 		}
 	}




More information about the Bf-blender-cvs mailing list