18 b.add_input<
decl::Geometry>(
"Points").supported_type(GeometryComponent::Type::PointCloud);
29 if (points ==
nullptr) {
40 selection_evaluator.
add(selection_field);
46 GeometryComponent::Type::Mesh,
72 dst_attributes.
add(
id, AttrDomain::Point, data_type,
init);
76 id, AttrDomain::Point, data_type);
82 mesh->tag_loose_edges_none();
83 mesh->tag_overlapping_none();
96 geometry_set, selection_field,
params.get_attribute_filter(
"Mesh"));
99 params.set_output(
"Mesh", std::move(geometry_set));
107 ntype.
ui_name =
"Points to Vertices";
108 ntype.
ui_description =
"Generate a mesh vertex for each point cloud point";
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_free_layer_named(CustomData *data, blender::StringRef name)
Mesh * BKE_mesh_new_nomain(int verts_num, int edges_num, int faces_num, int corners_num)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_POINTS_TO_VERTICES
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const void * data() const
GSpan get_internal_span() const
ItemIterator items() const &
GAttributeReader lookup(const StringRef attribute_id) const
bool add(const StringRef attribute_id, const AttrDomain domain, const eCustomDataType data_type, const AttributeInit &initializer)
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_as_mask(int field_index)
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096)
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void geometry_set_points_to_vertices(GeometrySet &geometry_set, Field< bool > &selection_field, const AttributeFilter &attribute_filter)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
static void init(bNodeTree *, bNode *node)
const ImplicitSharingInfo * sharing_info
void keep_only_during_modify(Span< GeometryComponent::Type > component_types)
void gather_attributes_for_propagation(Span< GeometryComponent::Type > component_types, GeometryComponent::Type dst_component_type, bool include_instances, const AttributeFilter &attribute_filter, Map< StringRef, AttributeDomainAndType > &r_attributes) const
const PointCloud * get_pointcloud() const
void modify_geometry_sets(ForeachSubGeometryCallback callback)
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void remove_geometry_during_modify()
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare