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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-10-25 13:38:41 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-10-25 14:28:40 +0300
commitdb04cc0f00718b61e6973b8091a36b0294eb0d51 (patch)
treeda8ebcd7c9b6436c7660ac2be0611b3b05f96cb5 /source/blender
parentda78338da035a95b6eb5c5c52144ffa0e7bcb236 (diff)
Depsgraph: Remove direct relations rebuild from set_background
We wouldn't really know which context we want there.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/scene.c5
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc5
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 7370bd8a47e..f0c727b33ac 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1106,7 +1106,6 @@ BaseLegacy *BKE_scene_base_find(Scene *scene, Object *ob)
*/
void BKE_scene_set_background(Main *bmain, Scene *scene)
{
- Scene *sce;
BaseLegacy *base;
Object *ob;
Group *group;
@@ -1132,10 +1131,6 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
}
}
- /* sort baselist for scene and sets */
- for (sce = scene; sce; sce = sce->set)
- DEG_scene_relations_rebuild(bmain, sce);
-
/* copy layers and flags from bases to objects */
for (base = scene->base.first; base; base = base->next) {
ob = base->object;
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 9822cd154b1..05b5b73a735 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -291,6 +291,11 @@ void DEG_scene_relations_update(Main *bmain, Scene *scene)
/* Rebuild graph from scratch and exit. */
scene->depsgraph_legacy = DEG_graph_new();
DEG_graph_build_from_scene(scene->depsgraph_legacy, bmain, scene);
+ /* TODO(sergey): When we first create dependency graph we consider
+ * it is first time became visible. This is true for viewports, but
+ * will fail when render engines will start having their own graphs.
+ */
+ DEG_graph_on_visible_update(bmain, scene->depsgraph_legacy);
return;
}
DEG_graph_relations_update(scene->depsgraph_legacy, bmain, scene);