diff options
author | Dalai Felinto <dalai@blender.org> | 2020-12-17 20:37:04 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2020-12-18 15:03:27 +0300 |
commit | f43561eae6826eead2e5e78bc8792b3c15dda6ae (patch) | |
tree | 8676fcba093e97c77224390760c7cb7c76359b48 /source/blender/makesrna/intern/rna_nodetree.c | |
parent | b342e089c3fb5cf83d6b3715f0658ed217a8c469 (diff) |
Function Nodes: Input Vector
Ref: T82651
Normally people use "Combine XYZ" to input a vector, but it is more
interesting to have an explicit vector input.
So this is basically "Combine XYZ" without any input sockets, the values
are stored in the node itself.
Differential Revision: https://developer.blender.org/D9885
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 d624154ddc7..25bfc70ef8f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -4480,6 +4480,19 @@ static void def_texture(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } +static void def_fn_input_vector(StructRNA *srna) +{ + PropertyRNA *prop; + + RNA_def_struct_sdna_from(srna, "NodeInputVector", "storage"); + + prop = RNA_def_property(srna, "vector", PROP_FLOAT, PROP_XYZ); + RNA_def_property_array(prop, 3); + RNA_def_property_float_sdna(prop, NULL, "vector"); + RNA_def_property_ui_text(prop, "Vector", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); +} + /* -- Shader Nodes ---------------------------------------------------------- */ static void def_sh_output(StructRNA *srna) |