diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-05 00:17:13 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-05 00:17:13 +0300 |
commit | baaa89a0bc54a659f9ddbc34cce21d6920c0f6a6 (patch) | |
tree | f5337407abc1e1e832612cc7643d508ed021eb37 /source/blender/makesrna/intern/rna_texture.c | |
parent | f098f6df767aa62ffe0a7db6635ead058770d92f (diff) |
Shading: Rewrite Mapping node with dynamic inputs.
This patch rewrites the Mapping node to support dynamic inputs. The
Max and Min options have been removed. They can be added as Min and
Max Vector Math nodes manually.
Texture nodes still use the old matrix-based mapping. A new SVM node
`NODE_TEXTURE_MAPPING` has been added to preserve this functionality.
Similarly, in GLSL, a `mapping_mat4` function has been added.
Reviewers: brecht, JacquesLucke
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 2015356d071..2fc0e2bdf2d 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -465,18 +465,6 @@ static void rna_def_texmapping(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem prop_vect_type_items[] = { - {TEXMAP_TYPE_TEXTURE, - "TEXTURE", - 0, - "Texture", - "Transform a texture by inverse mapping the texture coordinate"}, - {TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"}, - {TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"}, - {TEXMAP_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem prop_xyz_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, @@ -493,7 +481,7 @@ static void rna_def_texmapping(BlenderRNA *brna) prop = RNA_def_property(srna, "vector_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, prop_vect_type_items); + RNA_def_property_enum_items(prop, rna_enum_mapping_type_items); RNA_def_property_ui_text(prop, "Type", "Type of vector that the mapping transforms"); RNA_def_property_update(prop, 0, "rna_Texture_mapping_update"); |