41 evaluator.
add(std::move(position_field));
42 evaluator.
add(std::move(radius_field));
64 GeometryComponent::Type::PointCloud,
67 attributes_to_propagate);
69 attributes_to_propagate.
remove(
"position");
70 attributes_to_propagate.
remove(
"radius");
72 for (
const auto item : attributes_to_propagate.
items()) {
81 dst_attributes.
add(
id, AttrDomain::Point, type,
init);
85 id, AttrDomain::Point, type);
101 params.get_attribute_filter(
"Points"));
102 geometry_set.
keep_only({GeometryComponent::Type::PointCloud, GeometryComponent::Type::Edit});
103 params.set_output(
"Points", std::move(geometry_set));
106 params.set_default_remaining_outputs();
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_INSTANCES_TO_POINTS
General operations for point clouds.
PointCloud * BKE_pointcloud_new_nomain(int totpoint)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const void * data() const
GSpan get_internal_span() const
bool remove(const Key &key)
ItemIterator items() const
GAttributeReader lookup(const StringRef attribute_id) const
bke::AttributeAccessor attributes() const
int instances_num() 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)
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
local_group_size(16, 16) .push_constant(Type b
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096)
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)
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
static void init(bNodeTree *, bNode *node)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
const ImplicitSharingInfo * sharing_info
void keep_only(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, AttributeKind > &r_attributes) const
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Instances * get_instances() const
bool has_instances() const
MutableVArraySpan< T > span
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare