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
This commit is contained in:
2015-12-29 14:42:49 +01:00
parent 1991ee1738
commit 5c682a901b
9 changed files with 66 additions and 10 deletions

View File

@@ -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)