Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmarSquircleArt <omar.squircleart@gmail.com>2019-09-04 18:54:32 +0300
committerOmarSquircleArt <omar.squircleart@gmail.com>2019-09-04 18:54:32 +0300
commit23564583a4988778b4c43496fd21818b286f6ba1 (patch)
tree3dc149c4e5c26ea2aac460ed582cb31def988470 /source/blender/makesrna/intern/rna_nodetree.c
parent45d4c925799e94c6d442a9a9066af2d3305724e1 (diff)
Shading: Extend Noise node to other dimenstions.
This patch extends perlin noise to operate in 1D, 2D, 3D, and 4D space. The noise code has also been refactored to be more readable. The Color output and distortion patterns changed, so this patch breaks backward compatibility. This is due to the fact that we now use random offsets as noise seeds, as opposed to swizzling and constants offsets. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5560
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 0909aa42a4d..988533e0f0e 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -4346,8 +4346,17 @@ static void def_sh_tex_gradient(StructRNA *srna)
static void def_sh_tex_noise(StructRNA *srna)
{
+ PropertyRNA *prop;
+
RNA_def_struct_sdna_from(srna, "NodeTexNoise", "storage");
def_sh_tex(srna);
+
+ prop = RNA_def_property(srna, "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(
+ prop, "Dimensions", "The dimensions of the space to evaluate the noise in");
+ RNA_def_property_update(prop, 0, "rna_ShaderNode_socket_update");
}
static void def_sh_tex_checker(StructRNA *srna)
@@ -4516,7 +4525,7 @@ static void def_sh_tex_white_noise(StructRNA *srna)
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(
- prop, "Dimensions", "The number of dimensions to evaluate the noise in");
+ prop, "Dimensions", "The dimensions of the space to evaluate the noise in");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_ShaderNode_socket_update");
}