diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-24 11:21:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-24 11:21:40 +0300 |
commit | fa6bdfd622999fa5f0550f879716a904991b33a6 (patch) | |
tree | 697008759db5918e54e82e77c32009ed9c398afa /source | |
parent | 31cc60e76bfa81783e61a7b01586de9547de0174 (diff) |
Cycles: Support per-render layer world AO settings
This is sort of extension of existing Use Environment option which now allows to
disable AO on the render layer basis.
Useful in cases like disabling AO for the background because it might make it
too flat and so.
Reviewers: juicyfruit, dingto, brecht
Reviewed By: brecht
Subscribers: eyecandy, venomgfx
Differential Revision: https://developer.blender.org/D1633
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 02a68aa84ed..2d0a4820a51 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -204,7 +204,8 @@ typedef struct SceneRenderLayer { #define SCE_LAY_SKY 16 #define SCE_LAY_STRAND 32 #define SCE_LAY_FRS 64 - /* flags between 128 and 0x8000 are set to 1 already, for future options */ +#define SCE_LAY_AO 128 + /* flags between 256 and 0x8000 are set to 1 already, for future options */ #define SCE_LAY_ALL_Z 0x8000 #define SCE_LAY_XOR 0x10000 diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d959fd08009..30112885b33 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2782,6 +2782,12 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); + prop = RNA_def_property(srna, "use_ao", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_AO); + RNA_def_property_ui_text(prop, "AO", "Render AO in this Layer"); + if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); + else RNA_def_property_clear_flag(prop, PROP_EDITABLE); + prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE); RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)"); |