diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:29:50 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:35:05 +0300 |
commit | 26481eabe1e66da2a322190f15ad600d9d69bbee (patch) | |
tree | 15a56363f559558847e2ea7becad623d6d4d550f /source/blender/makesrna/intern/rna_scene.c | |
parent | 837b5743ced83c5dfe724a8285eee504f623dbfb (diff) |
Cycles: Use Blender Settings For AOV
This patch will share the AOV settings between Cycles and Eevee.
It enable using the AOV name conflict detection of Blender. This
means that unlike how Cycles used to work it isn't possible to add an
AOV with a similar name. Conflicts with internal render pass names will
be indicated with an Warning icon.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D9774
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index af31f16f4e0..93d25c383bb 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4062,6 +4062,24 @@ static void rna_def_view_layer_eevee(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update"); } +static void rna_def_view_layer_aovs(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + /* PropertyRNA *prop; */ + + FunctionRNA *func; + PropertyRNA *parm; + + RNA_def_property_srna(cprop, "AOVs"); + srna = RNA_def_struct(brna, "AOVs", NULL); + RNA_def_struct_sdna(srna, "ViewLayer"); + RNA_def_struct_ui_text(srna, "List of AOVs", "Collection of AOVs"); + + func = RNA_def_function(srna, "add", "BKE_view_layer_add_aov"); + parm = RNA_def_pointer(func, "aov", "AOV", "", "Newly created AOV"); + RNA_def_function_return(func, parm); +} + static void rna_def_view_layer_aov(BlenderRNA *brna) { StructRNA *srna; @@ -4089,7 +4107,7 @@ static void rna_def_view_layer_aov(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update"); } -void rna_def_view_layer_common(StructRNA *srna, const bool scene) +void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool scene) { PropertyRNA *prop; @@ -4144,6 +4162,7 @@ void rna_def_view_layer_common(StructRNA *srna, const bool scene) RNA_def_property_collection_sdna(prop, NULL, "aovs", NULL); RNA_def_property_struct_type(prop, "AOV"); RNA_def_property_ui_text(prop, "Shader AOV", ""); + rna_def_view_layer_aovs(brna, prop); prop = RNA_def_property(srna, "active_aov", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "AOV"); |