Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-06-12 17:06:24 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-06-12 17:08:57 +0300
commit8ca497b9117c1a094ba34246c813a35508bc2ee8 (patch)
tree2ec11f043d76d651548e5e2c408544872813f99c /source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
parent0f4f4d87542b96942234e10421823dcc6766331c (diff)
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
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc8
1 files changed, 4 insertions, 4 deletions
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) {