10 b.add_input<
decl::Bool>(
N_(
"Selection")).default_value(
true).hide_value().supports_field();
11 b.add_input<
decl::Int>(
N_(
"Material Index")).supports_field().min(0);
20 if (domain_size == 0) {
31 evaluator.add_with_destination(index_field,
indices.varray);
48 params.set_output(
"Geometry", std::move(geometry_set));
@ GEO_COMPONENT_TYPE_MESH
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SET_MATERIAL_INDEX
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
GAttributeWriter lookup_or_add_for_write(const AttributeIDRef &attribute_id, const eAttrDomain domain, const eCustomDataType data_type, const AttributeInit &initializer=AttributeInitDefault())
void set_selection(Field< bool > selection)
ccl_gpu_kernel_postfix int ccl_global int * indices
static void node_declare(NodeDeclarationBuilder &b)
static void set_material_index_in_component(GeometryComponent &component, const Field< bool > &selection_field, const Field< int > &index_field)
static void node_geo_exec(GeoNodeExecParams params)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_set_material_index()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
void modify_geometry_sets(ForeachSubGeometryCallback callback)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare