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:
authorHans Goudey <h.goudey@me.com>2021-06-16 00:38:28 +0300
committerHans Goudey <h.goudey@me.com>2021-06-16 00:38:28 +0300
commit143a81ccceaf7d3abccc5a9dd4bb3520813dd222 (patch)
treef3b354dd40d018eb90d54936ac72abeb1f837e9f /source/blender/makesrna/intern
parentc29afa5156596addf2b9aa61d2f58da6db0b4ec4 (diff)
Geometry Nodes: Allow int attribute input fields with single value
Just like the way we often have a choice between an attribute input and a single float, this adds the ability to choose between attribute and integer input sockets, useful for D11421.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 87bfb554611..f996f60a166 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -464,6 +464,10 @@ static EnumPropertyItem rna_node_geometry_mesh_circle_fill_type_items[] = {
{ \
GEO_NODE_ATTRIBUTE_INPUT_COLOR, "COLOR", 0, "Color", "" \
}
+#define ITEM_INTEGER \
+ { \
+ GEO_NODE_ATTRIBUTE_INPUT_INTEGER, "INTEGER", 0, "Integer", "" \
+ }
#define ITEM_BOOLEAN \
{ \
GEO_NODE_ATTRIBUTE_INPUT_BOOLEAN, "BOOLEAN", 0, "Boolean", "" \
@@ -475,6 +479,7 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_any[]
ITEM_FLOAT,
ITEM_VECTOR,
ITEM_COLOR,
+ ITEM_INTEGER,
ITEM_BOOLEAN,
{0, NULL, 0, NULL, NULL},
};
@@ -497,6 +502,11 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_float
ITEM_FLOAT,
{0, NULL, 0, NULL, NULL},
};
+static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_int[] = {
+ ITEM_ATTRIBUTE,
+ ITEM_INTEGER,
+ {0, NULL, 0, NULL, NULL},
+};
static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_no_boolean[] = {
ITEM_ATTRIBUTE,
ITEM_FLOAT,