diff options
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 5 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build.cc | 5 |
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); |