diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-13 16:43:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-13 16:43:36 +0300 |
commit | c9aef27326d54ed053edb37d27fe5571805139b9 (patch) | |
tree | 1455a2f704b8187d3770a009054e880c97edfbc3 /source/blender/blenkernel/intern/scene.c | |
parent | 065cd6e4e4295063bfdf952ffd18931736b065c2 (diff) |
Depsgraph: Begin work on making depsgraph per-scene-layer
This is a first step towards proper depsgraph "ownership", where
we would allow scene to be in multiple states dependent on active
workspace or scene layer.
This commit introduces a basic API to get proper dependency graph
for a given scene layer. It also renames scene->depsgraph to
depsgraph_legacy, so it's easier to search0-n-replace in the future.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 3b2287a7921..7b103a3c56e 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -255,7 +255,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type) scen->ed = NULL; scen->theDag = NULL; - scen->depsgraph = NULL; + scen->depsgraph_legacy = NULL; scen->obedit = NULL; scen->fps_info = NULL; @@ -583,8 +583,8 @@ void BKE_scene_free_ex(Scene *sce, const bool do_id_user) } DEG_scene_graph_free(sce); - if (sce->depsgraph) - DEG_graph_free(sce->depsgraph); + if (sce->depsgraph_legacy) + DEG_graph_free(sce->depsgraph_legacy); MEM_SAFE_FREE(sce->fps_info); @@ -1542,7 +1542,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc * * in the future this should handle updates for all datablocks, not * only objects and scenes. - brecht */ - DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph, scene); + DEG_evaluate_on_refresh(eval_ctx, scene->depsgraph_legacy, scene); /* TODO(sergey): This is to beocme a node in new depsgraph. */ BKE_mask_update_scene(bmain, scene); @@ -1604,7 +1604,7 @@ void BKE_scene_update_for_newframe(EvaluationContext *eval_ctx, Main *bmain, Sce BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false); /* BKE_object_handle_update() on all objects, groups and sets */ - DEG_evaluate_on_framechange(eval_ctx, bmain, sce->depsgraph, ctime); + DEG_evaluate_on_framechange(eval_ctx, bmain, sce->depsgraph_legacy, ctime); /* update sound system animation (TODO, move to depsgraph) */ BKE_sound_update_scene(bmain, sce); @@ -2250,3 +2250,9 @@ int BKE_scene_multiview_num_videos_get(const RenderData *rd) return BKE_scene_multiview_num_views_get(rd); } } + +Depsgraph* BKE_scene_get_depsgraph(Scene *scene, SceneLayer *scene_layer) +{ + (void) scene_layer; + return scene->depsgraph_legacy; +} |