24 .evaluated_geometry_field();
26 .evaluated_geometry_field()
32 .evaluated_geometry_field();
47 evaluator.
add(std::move(position_field));
48 evaluator.
add(std::move(radius_field));
62 if (
const std::optional<float> radius_single = radii.get_if_single()) {
63 dst_attributes.
add<
float>(
68 "radius", AttrDomain::Point);
82 if (
ELEM(name,
"position",
"radius")) {
93 dst_attributes.
add(name, AttrDomain::Point, type,
init);
101 dst_attributes.
add(name, AttrDomain::Point, type,
init);
105 name, AttrDomain::Point, type);
123 params.
set_output(
"Points"_ustr, std::move(geometry_set));
135 ntype.
ui_name =
"Instances to Points";
137 "Generate points at the origins of instances.\nNote: Nested instances are not affected by "
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_INSTANCES_TO_POINTS
General operations for point clouds.
#define NOD_REGISTER_NODE(REGISTER_FUNC)
CommonVArrayInfo common_info() const
const CPPType & type() const
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
bool is_builtin(const StringRef name) const
GAttributeReader get() const
bke::AttributeAccessor attributes() const
int instances_num() const
bool add(const StringRef name, const AttrDomain domain, const AttrType data_type, const AttributeInit &initializer)
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef name, AttrDomain domain, AttrType data_type)
void set_selection(Field< bool > selection)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_selection_as_mask() const
const GVArray & get_evaluated(const int field_index) const
NodeAttributeFilter get_attribute_filter(const UString output_identifier) const
T extract_input(const UString identifier)
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
NodeDefaultInputType default_input_type
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
void node_register_type(bNodeType &ntype)
static void node_register()
static void node_geo_exec(GeoNodeExecParams params)
static void convert_instances_to_points(GeometrySet &geometry_set, Field< float3 > position_field, Field< float > radius_field, Field< bool > selection_field, const AttributeFilter &attribute_filter)
static void node_declare(NodeDeclarationBuilder &b)
@ NODE_DEFAULT_INPUT_POSITION_FIELD
PointCloud * BKE_pointcloud_new_nomain(PointCloudType type, int totpoint)
VecBase< float, 3 > float3
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
bool allow_skip(const StringRef name) const
const ImplicitSharingInfo * sharing_info
void keep_only(Span< GeometryComponent::Type > component_types)
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Instances * get_instances() const
bool has_instances() const
MutableVArraySpan< T > span
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare