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-04-02 20:03:27 +0300
committerHans Goudey <h.goudey@me.com>2021-04-02 20:03:27 +0300
commit0e8fa1d44bd0b84e090febde2224635cb6be9f69 (patch)
tree9cb3986969b8b5a7528a60ae236229e081450ea4 /source/blender/makesrna
parentbd9c4794751ec7d4ad4989c43e47cb00e21cf1e5 (diff)
Geometry Nodes: Allow float input for point scale node
This allows easily changing the scale attribute with a uniform scale within a single simple node.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 1ef0658f889..609b0d53a6d 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -453,6 +453,12 @@ static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_vecto
ITEM_VECTOR,
{0, NULL, 0, NULL, NULL},
};
+static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_float_vector[] = {
+ ITEM_ATTRIBUTE,
+ ITEM_FLOAT,
+ ITEM_VECTOR,
+ {0, NULL, 0, NULL, NULL},
+};
static const EnumPropertyItem rna_node_geometry_attribute_input_type_items_float[] = {
ITEM_ATTRIBUTE,
ITEM_FLOAT,
@@ -9277,7 +9283,7 @@ static void def_geo_point_scale(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeGeometryPointScale", "storage");
prop = RNA_def_property(srna, "input_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_vector);
+ RNA_def_property_enum_items(prop, rna_node_geometry_attribute_input_type_items_float_vector);
RNA_def_property_ui_text(prop, "Input Type", "");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
}