diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-12 18:42:13 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-09-12 18:42:13 +0300 |
commit | 2ea82e86ca60c1c268c6074ecba10524cebd97ed (patch) | |
tree | bf355c2a930f584685f68a833ce620ad15e63a70 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | f80018b5f7497d7ed0fe79783c4cd76f05ec1c7c (diff) |
Shading: Add Vertex Color node.
This patch adds a new Vertex Color node. The node also returns the alpha
of the vertex color layer as an output.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5767
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 3d90d566315..913324e4997 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4867,6 +4867,19 @@ static void def_sh_uvmap(StructRNA *srna) RNA_def_struct_sdna_from(srna, "bNode", NULL); } +static void def_sh_vertex_color(StructRNA *srna) +{ + PropertyRNA *prop; + + RNA_def_struct_sdna_from(srna, "NodeShaderVertexColor", "storage"); + + prop = RNA_def_property(srna, "layer_name", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Vertex Color", "Vertex Color"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + RNA_def_struct_sdna_from(srna, "bNode", NULL); +} + static void def_sh_uvalongstroke(StructRNA *srna) { PropertyRNA *prop; |