[Bf-blender-cvs] [8ca497b9117] blender2.8: Depsgraph: Traversing should be consistent for nodes and relationship

Dalai Felinto noreply at git.blender.org
Mon Jun 12 16:09:55 CEST 2017


Commit: 8ca497b9117c1a094ba34246c813a35508bc2ee8
Author: Dalai Felinto
Date:   Mon Jun 12 16:06:24 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB8ca497b9117c1a094ba34246c813a35508bc2ee8

Depsgraph: Traversing should be consistent for nodes and relationship

We need to traverse the same exact objects for both nodes and relationship
builder. We were using FOREACH_SCENE_OBJECT for relationships, which
would lead to plenty of warnings in multiple situations.

In the future we will need to change this to build the depsgraph
relations and nodes to one single render_layer.

Fix T51780: If an object is in two collections and I do a full copy of
scene things go bad

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
index 08a897df2aa..f157a4b58d0 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
@@ -78,11 +78,11 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene)
 	m_graph->scene = scene;
 
 	/* scene objects */
-	FOREACH_SCENE_OBJECT(scene, ob)
-	{
-		build_object(bmain, scene, ob);
+	for (SceneLayer *sl = (SceneLayer *)scene->render_layers.first; sl; sl = sl->next) {
+		for (Base *base = (Base *)sl->object_bases.first; base; base = base->next) {
+			build_object(bmain, scene, base->object);
+		}
 	}
-	FOREACH_SCENE_OBJECT_END
 
 	/* rigidbody */
 	if (scene->rigidbody_world) {




More information about the Bf-blender-cvs mailing list