diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-16 00:04:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-16 00:16:49 +0300 |
commit | 01f576e87b54159bb360cf1ed85518bb75231107 (patch) | |
tree | 0ac38f90154f8ee08a35fb88c5cf742403bbcb3c /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 469408de725353b461d073097d88b6b810c16c38 (diff) | |
parent | 799779d432309e518922d23e3a1d1b5baaece71d (diff) |
Merge branch 'master' into blender2.8
The Eevee AO node supports the new Normal socket, but ignores Distance,
Samples, Inside and Only Local settings.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 3790dffec3b..56065df45bb 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4398,6 +4398,27 @@ static void def_sh_bevel(StructRNA *srna) RNA_def_property_update(prop, 0, "rna_Node_update"); } +static void def_sh_ambient_occlusion(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "custom1"); + RNA_def_property_range(prop, 1, 128); + RNA_def_property_ui_text(prop, "Samples", "Number of rays to trace per shader evaluation"); + RNA_def_property_update(prop, 0, "rna_Node_update"); + + prop = RNA_def_property(srna, "inside", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_AO_INSIDE); + RNA_def_property_ui_text(prop, "Inside", "Trace rays towards the inside of the object"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "only_local", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "custom2", SHD_AO_LOCAL); + RNA_def_property_ui_text(prop, "Only Local", "Only consider the object itself when computing AO"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + static void def_sh_subsurface(StructRNA *srna) { static const EnumPropertyItem prop_subsurface_falloff_items[] = { |