diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-07 18:54:09 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-07 18:54:09 +0300 |
commit | 6432c8cc002cb7391e2ac5eae3c300fed28fc422 (patch) | |
tree | 10005610d94a4e23b305d1661d9be72795c7f563 /source/blender/makesrna | |
parent | 6bf9c8ac8918a6656c20cca2c08f20b38e90980c (diff) |
Layers: get/update CollectionEngineSettings (depsgraph placeholder)
Every time:
* A collection settings is set
* A collection visibility changes
* An object is added/removed/ ...
We need to recalculate the "accumulated" CollectionEngineSettings that
the render engine should use for an object.
This is to be handled by the depsgraph. Meanwhile this code should allow
us to start using those settings in the render engines.
Note: We are storing this in the objects, which means we can only have
one active calculated option every time.
This is intended to get the conversation with the Depsgraph department
going.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ec9a08af287..2fb1fa9c8d6 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2424,7 +2424,8 @@ RNA_LAYER_ENGINE_GET_SET_FLOAT(ssao_attenuation) static void rna_CollectionEngineSettings_update(bContext *C, PointerRNA *UNUSED(ptr)) { SceneLayer *sl = CTX_data_scene_layer(C); - BKE_scene_layer_engine_settings_recalculate(sl); + LayerCollection *lc = CTX_data_layer_collection(C); + BKE_scene_layer_engine_settings_collection_recalculate(sl, lc); } /***********************************/ @@ -2485,6 +2486,7 @@ static void rna_LayerCollection_hide_update(bContext *C, PointerRNA *ptr) /* hide and deselect bases that are directly influenced by this LayerCollection */ BKE_scene_layer_base_flag_recalculate(sl); + BKE_scene_layer_engine_settings_collection_recalculate(sl, lc); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } |