diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-17 14:47:29 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-01 02:27:08 +0300 |
commit | eba09b1520c06df304bc353e93d7220b4e83b755 (patch) | |
tree | 27f1e1e397a78b3f2f11a986599ee82d7bbcb89d /source/blender/editors/render/render_shading.c | |
parent | 97b9afda3719627b9e52d1862ffd3b0b3ef12518 (diff) |
Blender 2.8: Hook of layer collections evaluation in DEG
This moves selectability/visibility flag flush from some hardcoded
places in the code to depsgraph. This way it is possible to simply
tag depsgraph to update those flags and rest it'll do on its own.
Using depsgraph for such flush is an overkill: those flags are fully
static and can not be animated, so it doesn't really make sense to
hook only those to depsgraph.
However, in the future we will have overrides on collections, which
ideally would need to be animatable and drivable and easiest way
to support this is to do this on depsgraph level, so it ensures
proper order of evaluation for animation and drivers. And it seems
logical to do both overrides and flags flush from depsgraph from
this point of view.
This commit also includes the evaluation of IDProperty for collections,
which basically are just another form of override. So once we implement
the other kind of overrides the flushing and collection evaluation won't
change.
Patch by Sergey Sharybin and Dalai Felinto
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 490182b17ed..b58bd43a35e 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -631,6 +631,7 @@ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op)) scene->active_layer = BLI_listbase_count(&scene->render_layers) - 1; DAG_id_tag_update(&scene->id, 0); + DAG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); return OPERATOR_FINISHED; @@ -660,6 +661,7 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) } DAG_id_tag_update(&scene->id, 0); + DAG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; |