[Bf-blender-cvs] [d492ae8893e] master: Depsgraph: Remove dead code

Sergey Sharybin noreply at git.blender.org
Thu Jun 1 16:22:47 CEST 2017


Commit: d492ae8893e6c1aa26bf1fd65ec2f5d76f6f3aa7
Author: Sergey Sharybin
Date:   Thu Jun 1 15:07:47 2017 +0200
Branches: master
https://developer.blender.org/rBd492ae8893e6c1aa26bf1fd65ec2f5d76f6f3aa7

Depsgraph: Remove dead code

Was never used or worked on in ages, if any of this code is
needed in the future it'll need to be redone anyway.

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M	source/blender/depsgraph/intern/depsgraph.cc
M	source/blender/depsgraph/intern/depsgraph_build.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 7df33e07e49..eba4e8907b1 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1317,34 +1317,6 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
 		             obdata_ubereval_key,
 		             "PSys -> UberEval");
 
-#if 0
-		if (ELEM(part->phystype, PART_PHYS_KEYED, PART_PHYS_BOIDS)) {
-			LINKLIST_FOREACH (ParticleTarget *, pt, &psys->targets) {
-				if (pt->ob && BLI_findlink(&pt->ob->particlesystem, pt->psys - 1)) {
-					node2 = dag_get_node(dag, pt->ob);
-					dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Particle Targets");
-				}
-			}
-		}
-
-		if (part->ren_as == PART_DRAW_OB && part->dup_ob) {
-			node2 = dag_get_node(dag, part->dup_ob);
-			/* note that this relation actually runs in the wrong direction, the problem
-			 * is that dupli system all have this (due to parenting), and the render
-			 * engine instancing assumes particular ordering of objects in list */
-			dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Object Visualization");
-			if (part->dup_ob->type == OB_MBALL)
-				dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Object Visualization");
-		}
-
-		if (part->ren_as == PART_DRAW_GR && part->dup_group) {
-			LINKLIST_FOREACH (GroupObject *, go, &part->dup_group->gobject) {
-				node2 = dag_get_node(dag, go->ob);
-				dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Particle Group Visualization");
-			}
-		}
-#endif
-
 		/* collisions */
 		if (part->type != PART_HAIR) {
 			add_collision_relations(psys_key, scene, ob, part->collision_group, ob->lay, true, "Particle Collision");
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index c3e9ad5a475..8054c33817b 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -302,16 +302,6 @@ SubgraphDepsNode *Depsgraph::add_subgraph_node(const ID *id)
 	/* Add to subnodes list. */
 	BLI_gset_insert(subgraphs, subgraph_node);
 
-	/* if there's an ID associated, add to ID-nodes lookup too */
-	if (id) {
-#if 0
-		/* XXX subgraph node is NOT a true IDDepsNode - what is this supposed to do? */
-		// TODO: what to do if subgraph's ID has already been added?
-		BLI_assert(!graph->find_id_node(id));
-		graph->id_hash[id] = this;
-#endif
-	}
-
 	return subgraph_node;
 }
 
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index aa9a2aebd30..9abdc3cf0eb 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -219,11 +219,6 @@ void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
 	 * scene is to be connected.
 	 */
 	relation_builder.begin_build(bmain);
-#if 0
-	relation_builder.add_relation(RootKey(),
-	                              IDKey(scene),
-	                              "Root to Active Scene");
-#endif
 	relation_builder.build_scene(bmain, scene);
 
 	/* Detect and solve cycles. */




More information about the Bf-blender-cvs mailing list