11 b.use_custom_socket_order();
12 b.allow_any_socket_order();
14 .description(
"Geometry to update the ID attribute on");
15 b.add_output<
decl::Geometry>(
"Geometry"_ustr).propagate_all_geometry().align_with_previous();
19 .evaluated_geometry_field();
29 AttrDomain::Instance :
32 if (domain_size == 0) {
39 attributes, field_context,
"id", domain, selection_field, id_field);
53 if (geometry_set.
has(type)) {
58 params.
set_output(
"Geometry"_ustr, std::move(geometry_set));
68 "Set the id attribute on the input geometry, mainly used internally for randomizing";
#define NODE_CLASS_GEOMETRY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
int attribute_domain_size(AttrDomain domain) const
virtual std::optional< MutableAttributeAccessor > attributes_for_write()
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
NodeDefaultInputType default_input_type
bool try_capture_field_on_geometry(MutableAttributeAccessor attributes, const fn::FieldContext &field_context, const StringRef name, AttrDomain domain, const fn::Field< bool > &selection, const fn::GField &field)
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void set_id_in_component(GeometryComponent &component, const Field< bool > &selection_field, const Field< int > &id_field)
@ NODE_DEFAULT_INPUT_INDEX_FIELD
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GeometryComponent & get_component_for_write(GeometryComponent::Type component_type)
bool has(const GeometryComponent::Type component_type) const
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare