[Bf-blender-cvs] [3e12395] depsgraph_refactor: Code Cleanup: Style + Removing dead code
Joshua Leung
noreply at git.blender.org
Thu Dec 18 12:17:51 CET 2014
Commit: 3e12395150bb239768f32b4a5d77f9ae960ef978
Author: Joshua Leung
Date: Thu Dec 18 23:22:29 2014 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rB3e12395150bb239768f32b4a5d77f9ae960ef978
Code Cleanup: Style + Removing dead code
===================================================================
M source/blender/depsgraph/intern/depsgraph.cpp
M source/blender/depsgraph/intern/depsgraph.h
M source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M source/blender/depsgraph/intern/depsgraph_debug.cpp
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph.cpp b/source/blender/depsgraph/intern/depsgraph.cpp
index 7c8d0ca..2fda708 100644
--- a/source/blender/depsgraph/intern/depsgraph.cpp
+++ b/source/blender/depsgraph/intern/depsgraph.cpp
@@ -275,27 +275,6 @@ DepsRelation *Depsgraph::add_new_relation(DepsNode *from, DepsNode *to,
return rel;
}
-/* Sort nodes to determine evaluation order for operation nodes
- * where dependency relationships won't get violated.
- */
-void Depsgraph::sort()
-{
-#if 0
- void *ctx = NULL; // XXX: temp struct for keeping track of visited nodes, etc.?
-
- /* 1) Traverse graph from root:
- * - note when each graph was visited (within its peers)
- * - tag/knock out relationships leading to cyclic dependencies
- */
- DEG_graph_traverse(graph,
- DEG_Filter_ExecutableNodes,
- NULL,
- tag_nodes_for_sorting,
- ctx);
- /* 2) Tweak order of nodes within each set of links. */
-#endif
-}
-
/* ************************************************** */
/* Relationships Management */
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index aff3ab6..0cdabea 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -152,11 +152,6 @@ struct Depsgraph {
eDepsRelation_Type type,
const string &description);
- /* Sort nodes to determine evaluation order for operation nodes
- * where dependency relationships won't get violated.
- */
- void sort();
-
/* Tag a specific node as needing updates. */
void add_entry_tag(OperationDepsNode *node);
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 5949611..6f8dc3e 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -466,7 +466,7 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
for (GroupObject *go = (GroupObject *)rbw->group->gobject.first; go; go = go->next) {
Object *ob = go->ob;
- if (!ob || ob->type != OB_MESH)
+ if (!ob || (ob->type != OB_MESH))
continue;
/* 2) create operation for flushing results */
@@ -549,7 +549,7 @@ void DepsgraphNodeBuilder::build_rig(Scene *scene, Object *ob)
bArmature *arm = (bArmature *)ob->data;
/* Rbuild pose if not up to date. */
- if (ob->pose == NULL || ob->pose->flag & POSE_RECALC) {
+ if (ob->pose == NULL || (ob->pose->flag & POSE_RECALC)) {
BKE_pose_rebuild(ob, arm);
}
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cpp b/source/blender/depsgraph/intern/depsgraph_debug.cpp
index 45c87bb..7904113 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cpp
@@ -490,12 +490,14 @@ static void deg_debug_graphviz_node(const DebugContext &ctx, const DepsNode *nod
static bool deg_debug_graphviz_is_cluster(const DepsNode *node)
{
switch (node->type) {
- case DEPSNODE_TYPE_ID_REF: {
+ case DEPSNODE_TYPE_ID_REF:
+ {
const IDDepsNode *id_node = (const IDDepsNode *)node;
return !id_node->components.empty();
}
- case DEPSNODE_TYPE_SUBGRAPH: {
+ case DEPSNODE_TYPE_SUBGRAPH:
+ {
SubgraphDepsNode *sub_node = (SubgraphDepsNode *)node;
return sub_node->graph != NULL;
}
@@ -641,7 +643,6 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx, const De
TimeSourceDepsNode *time_source = graph->find_time_source(NULL);
if (time_source != NULL) {
- printf("drawing timesource deps\n");
deg_debug_graphviz_node_relations(ctx, time_source);
}
#endif
More information about the Bf-blender-cvs
mailing list