diff options
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 3 | ||||
-rw-r--r-- | source/blender/editors/scene/scene_edit.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 8 |
3 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 6ae826a20b1..1e034a27e64 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2464,8 +2464,5 @@ void BKE_scene_free_depsgraph_hash(Scene *scene) Depsgraph *BKE_scene_get_depsgraph(Scene *scene, SceneLayer *scene_layer) { (void) scene_layer; - if (scene->depsgraph_legacy == NULL) { - scene->depsgraph_legacy = DEG_graph_new(); - } return scene->depsgraph_legacy; } diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c index 1bbc6b3e91a..3799fed8ac2 100644 --- a/source/blender/editors/scene/scene_edit.c +++ b/source/blender/editors/scene/scene_edit.c @@ -125,6 +125,10 @@ void ED_scene_changed_update(Main *bmain, bContext *C, Scene *scene_new, const b * per window-workspace combination (using WorkSpaceDataRelation) */ SceneLayer *layer_new = BLI_findlink(&scene_new->render_layers, scene_new->active_layer); Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene_new, layer_new); + /* TODO(sergey): This is a temporary solution. */ + if (depsgraph == NULL) { + scene_new->depsgraph_legacy = depsgraph = DEG_graph_new(); + } CTX_data_scene_set(C, scene_new); BKE_workspace_render_layer_set(CTX_wm_workspace(C), layer_new); diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 0ce8cc205b5..76c210ea0ae 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -90,6 +90,10 @@ static void rna_Scene_frame_set(Scene *scene, Main *bmain, int frame, float subf scene_layer = scene_layer->next) { Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, scene_layer); + /* TODO(sergey): This is a temporary solution. */ + if (depsgraph == NULL) { + scene->depsgraph_legacy = depsgraph = DEG_graph_new(); + } BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene); } @@ -136,6 +140,10 @@ static void rna_Scene_update_tagged(Scene *scene, Main *bmain) scene_layer = scene_layer->next) { Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, scene_layer); + /* TODO(sergey): This is a temporary solution. */ + if (depsgraph == NULL) { + scene->depsgraph_legacy = depsgraph = DEG_graph_new(); + } BKE_scene_graph_update_tagged(bmain->eval_ctx, depsgraph, bmain, scene); } |