diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2015-12-29 16:42:49 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2016-01-02 01:25:37 +0300 |
commit | 5c682a901b2ae9acf656f19e5f9b470d957d71cc (patch) | |
tree | 18ffa9d0ed4164ce601c285c700642a26a3c6eb9 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | 1991ee173865ed79a78b50afc3f7a46af472e9dd (diff) |
Cycles: Add Saw option to the wave texture
This commit adds "Bands Saw" and "Rings Saw" to the options for the Wave texture node in Cycles, behaving similar to the Saw option in BI textures.
Requested by @cekuhnen on BA.
Reviewers: dingto, sergey
Subscribers: cekuhnen
Differential Revision: https://developer.blender.org/D1699
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c10fe52bb29..984ecbe96ac 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3858,6 +3858,12 @@ static void def_sh_tex_wave(StructRNA *srna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem prop_wave_profile_items[] = { + {SHD_WAVE_PROFILE_SIN, "SIN", 0, "Sine", "Use a standard sine profile"}, + {SHD_WAVE_PROFILE_SAW, "SAW", 0, "Saw", "Use a sawtooth profile"}, + {0, NULL, 0, NULL, NULL} + }; + PropertyRNA *prop; RNA_def_struct_sdna_from(srna, "NodeTexWave", "storage"); @@ -3868,6 +3874,12 @@ static void def_sh_tex_wave(StructRNA *srna) RNA_def_property_enum_items(prop, prop_wave_type_items); RNA_def_property_ui_text(prop, "Wave Type", ""); RNA_def_property_update(prop, 0, "rna_Node_update"); + + prop = RNA_def_property(srna, "wave_profile", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "wave_profile"); + RNA_def_property_enum_items(prop, prop_wave_profile_items); + RNA_def_property_ui_text(prop, "Wave Profile", ""); + RNA_def_property_update(prop, 0, "rna_Node_update"); } static void def_sh_tex_coord(StructRNA *srna) |