Fix: Rename the dimensions property in Noise nodes.

The `dimensions` property of the noise nodes has been renamed to
`noise_dimensions` because it conflicted with and overwrote the
`dimensions` property of the base node.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5705
This commit is contained in:
OmarSquircleArt 2019-09-06 16:06:02 +02:00
parent d83f62e185
commit 61cc604da7
3 changed files with 6 additions and 6 deletions

View File

@ -778,7 +778,7 @@ static ShaderNode *add_node(Scene *scene,
else if (b_node.is_a(&RNA_ShaderNodeTexNoise)) {
BL::ShaderNodeTexNoise b_noise_node(b_node);
NoiseTextureNode *noise = new NoiseTextureNode();
noise->dimensions = b_noise_node.dimensions();
noise->dimensions = b_noise_node.noise_dimensions();
BL::TexMapping b_texture_mapping(b_noise_node.texture_mapping());
get_tex_mapping(&noise->tex_mapping, b_texture_mapping);
node = noise;
@ -831,7 +831,7 @@ static ShaderNode *add_node(Scene *scene,
else if (b_node.is_a(&RNA_ShaderNodeTexWhiteNoise)) {
BL::ShaderNodeTexWhiteNoise b_tex_white_noise_node(b_node);
WhiteNoiseTextureNode *white_noise_node = new WhiteNoiseTextureNode();
white_noise_node->dimensions = b_tex_white_noise_node.dimensions();
white_noise_node->dimensions = b_tex_white_noise_node.noise_dimensions();
node = white_noise_node;
}
else if (b_node.is_a(&RNA_ShaderNodeNormalMap)) {

View File

@ -920,7 +920,7 @@ static void node_shader_buts_tex_voronoi(uiLayout *layout, bContext *UNUSED(C),
static void node_shader_buts_tex_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "dimensions", 0, "", ICON_NONE);
uiItemR(layout, ptr, "noise_dimensions", 0, "", ICON_NONE);
}
static void node_shader_buts_tex_pointdensity(uiLayout *layout,
@ -1164,7 +1164,7 @@ static void node_shader_buts_ambient_occlusion(uiLayout *layout,
static void node_shader_buts_white_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "dimensions", 0, "", ICON_NONE);
uiItemR(layout, ptr, "noise_dimensions", 0, "", ICON_NONE);
}
/* only once called */

View File

@ -4309,7 +4309,7 @@ static void def_sh_tex_noise(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexNoise", "storage");
def_sh_tex(srna);
prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE);
prop = RNA_def_property(srna, "noise_dimensions", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dimensions");
RNA_def_property_enum_items(prop, rna_enum_node_tex_dimensions_items);
RNA_def_property_ui_text(
@ -4479,7 +4479,7 @@ static void def_sh_tex_white_noise(StructRNA *srna)
{
PropertyRNA *prop;
prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE);
prop = RNA_def_property(srna, "noise_dimensions", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, rna_enum_node_tex_dimensions_items);
RNA_def_property_ui_text(