diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_scene.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 90e5459b599..8018178fcee 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -215,6 +215,7 @@ int BKE_scene_multiview_num_videos_get(const struct RenderData *rd); void BKE_scene_allocate_depsgraph_hash(struct Scene *scene); void BKE_scene_ensure_depsgraph_hash(struct Scene *scene); void BKE_scene_free_depsgraph_hash(struct Scene *scene); +void BKE_scene_free_view_layer_depsgraph(struct Scene *scene, struct ViewLayer *view_layer); struct Depsgraph *BKE_scene_get_depsgraph(struct Main *bmain, struct Scene *scene, diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 37049014ef7..027933e17c6 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2057,6 +2057,14 @@ void BKE_scene_free_depsgraph_hash(Scene *scene) scene->depsgraph_hash = NULL; } +void BKE_scene_free_view_layer_depsgraph(Scene *scene, ViewLayer *view_layer) +{ + if (scene->depsgraph_hash != NULL) { + DepsgraphKey key = {view_layer}; + BLI_ghash_remove(scene->depsgraph_hash, &key, depsgraph_key_free, depsgraph_key_value_free); + } +} + /* Query depsgraph for a specific contexts. */ Depsgraph *BKE_scene_get_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, bool allocate) |