22 AttrDomain::Instance :
25 if (domain_size == 0) {
37 if (attributes.contains(
"id")) {
39 evaluator.add_with_destination(id_field, id_attribute.
varray);
44 evaluator.add(id_field);
46 const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
47 const VArray<int> result_ids = evaluator.get_evaluated<
int>(0);
50 result_ids.
materialize(selection, id_attribute.span);
51 id_attribute.finish();
66 if (geometry_set.
has(type)) {
71 params.set_output(
"Geometry", std::move(geometry_set));
#define NODE_CLASS_GEOMETRY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void materialize(MutableSpan< T > r_span) const
int attribute_domain_size(AttrDomain domain) const
virtual std::optional< MutableAttributeAccessor > attributes_for_write()
void set_selection(Field< bool > selection)
local_group_size(16, 16) .push_constant(Type b
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)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
VMutableArray< T > varray
GeometryComponent & get_component_for_write(GeometryComponent::Type component_type)
bool has(const GeometryComponent::Type component_type) const
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare