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:
authorDorian <BD3D>2021-10-22 15:59:15 +0300
committerJacques Lucke <jacques@blender.org>2021-10-22 16:01:28 +0300
commit781289e31fbec004584b3789c801d1db012dfaa4 (patch)
tree9594fb70a46472f202b36e75a662970714f1ed00 /source/blender/makesrna
parent01e2a532f55ee2de3bfd1c0d97d063976546a036 (diff)
Geometry Nodes: add Boolean and Integer Input nodes
These nodes just output a single value of their respective types, making it possible to control multiple inputs with the same value. Differential Revision: https://developer.blender.org/D12932
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 438344304cf..f0508ee5317 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -5014,6 +5014,34 @@ static void def_fn_input_color(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
+static void def_fn_input_bool(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeInputBool", "storage");
+
+ prop = RNA_def_property(srna, "boolean", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "boolean", 1);
+ RNA_def_property_ui_text(
+ prop, "Boolean", "Input value used for unconnected socket");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+}
+
+static void def_fn_input_int(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeInputInt", "storage");
+
+ prop = RNA_def_property(srna, "integer", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "integer");
+ RNA_def_property_int_default(prop, 1);
+ RNA_def_property_ui_text(
+ prop, "Integer", "Input value used for unconnected socket");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+}
+
static void def_fn_input_vector(StructRNA *srna)
{
PropertyRNA *prop;