Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/scene.c
| Show First 20 Lines • Show All 2,051 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| if (scene->depsgraph_hash == NULL) { | if (scene->depsgraph_hash == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| BLI_ghash_free(scene->depsgraph_hash, depsgraph_key_free, depsgraph_key_value_free); | BLI_ghash_free(scene->depsgraph_hash, depsgraph_key_free, depsgraph_key_value_free); | ||||
| scene->depsgraph_hash = NULL; | 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. */ | /* Query depsgraph for a specific contexts. */ | ||||
| Depsgraph *BKE_scene_get_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, bool allocate) | Depsgraph *BKE_scene_get_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, bool allocate) | ||||
| { | { | ||||
| BLI_assert(scene != NULL); | BLI_assert(scene != NULL); | ||||
| BLI_assert(view_layer != NULL); | BLI_assert(view_layer != NULL); | ||||
| /* Make sure hash itself exists. */ | /* Make sure hash itself exists. */ | ||||
| if (allocate) { | if (allocate) { | ||||
| ▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines | |||||