diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-29 22:04:25 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-29 22:04:25 +0300 |
commit | 35124acd1973725843530d2dd8b805f717fec581 (patch) | |
tree | 0e9034a9c59c324008cbeb1ab2cd051c08ede62f /source/blender/makesrna/intern/rna_nodetree.c | |
parent | c2001ec27597b22509a94cfe759d7cb9daa3cd6d (diff) |
Geometry Nodes: Domain Size Node
The Domain Size node has a single geometry input and a selection for
the component type. Based on the component chosen, outputs containing
single values for the related domains are shown.
Mesh:
- Point Count
- Edge Count
- Face Count
- Face Corner Count
Curve:
- Point Count
- Spline Count
Point Cloud:
- Point Count
Instances:
- Instance Count
Differential Revision: https://developer.blender.org/D13365
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index aef3823338b..2db517d6b58 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -39,6 +39,7 @@ #include "BKE_animsys.h" #include "BKE_attribute.h" #include "BKE_cryptomatte.h" +#include "BKE_geometry_set.h" #include "BKE_image.h" #include "BKE_node.h" #include "BKE_texture.h" @@ -9166,6 +9167,16 @@ static void def_geo_boolean(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); } +static void def_geo_attribute_domain_size(StructRNA *srna) +{ + PropertyRNA *prop = RNA_def_property(srna, "component", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, rna_enum_geometry_component_type_items); + RNA_def_property_enum_default(prop, GEO_COMPONENT_TYPE_MESH); + RNA_def_property_ui_text(prop, "Component", ""); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update"); +} + static void def_geo_curve_primitive_bezier_segment(StructRNA *srna) { static const EnumPropertyItem mode_items[] = { |