24 b.add_input<
decl::Bool>(
N_(
"Selection")).default_value(
true).supports_field().hide_value();
36 uiItemR(layout,
ptr,
"mode", 0,
"", ICON_NONE);
53 src.materialize_compressed_to_uninitialized(mask.slice(range), dst.slice(range).data());
64 if (mesh_component ==
nullptr) {
75 evaluator.set_selection(selection_field);
79 evaluator.add(position_field);
80 evaluator.add(radius_field);
82 const IndexMask selection = evaluator.get_evaluated_selection_as_mask();
92 evaluator.get_evaluated(0), selection, position.
span);
98 evaluator.get_evaluated(1), selection, radius.
span);
104 attributes.
remove(
"position");
132 [](
float value) {
return std::max(0.0f, value); },
134 auto max_zero_op = std::make_shared<FieldOperation>(
136 Field<float> positive_radius(std::move(max_zero_op), 0);
162 params.set_output(
"Points", std::move(geometry_set));
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
#define GEO_NODE_MESH_TO_POINTS
#define NODE_STORAGE_FUNCS(StorageT)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
#define NODE_CLASS_GEOMETRY
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
void nodeRegisterType(struct bNodeType *ntype)
General operations for point clouds.
struct PointCloud * BKE_pointcloud_new_nomain(int totpoint)
GeometryNodeMeshToPointsMode
@ GEO_NODE_MESH_TO_POINTS_FACES
@ GEO_NODE_MESH_TO_POINTS_VERTICES
@ GEO_NODE_MESH_TO_POINTS_CORNERS
@ GEO_NODE_MESH_TO_POINTS_EDGES
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
int attribute_domain_size(eAttrDomain domain) const
std::optional< blender::bke::AttributeAccessor > attributes() const final
const CPPType & type() const
bool remove(const Key &key)
ItemIterator items() const
SyclQueue void void * src
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static int domain_num(const CurvesGeometry &curves, const eAttrDomain domain)
AttributeAccessor pointcloud_attributes(const PointCloud &pointcloud)
MutableAttributeAccessor pointcloud_attributes_for_write(PointCloud &pointcloud)
static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void geometry_set_mesh_to_points(GeometrySet &geometry_set, Field< float3 > &position_field, Field< float > &radius_field, Field< bool > &selection_field, const eAttrDomain domain)
static void materialize_compressed_to_uninitialized_threaded(const GVArray &src, const IndexMask mask, GMutableSpan dst)
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node)
void register_node_type_geo_mesh_to_points()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_standard_storage(bNodeTree *UNUSED(dest_ntree), bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
void keep_only_during_modify(const blender::Span< GeometryComponentType > component_types)
const GeometryComponent * get_component_for_read(GeometryComponentType component_type) const
void gather_attributes_for_propagation(blender::Span< GeometryComponentType > component_types, GeometryComponentType dst_component_type, bool include_instances, blender::Map< blender::bke::AttributeIDRef, blender::bke::AttributeKind > &r_attributes) const
void modify_geometry_sets(ForeachSubGeometryCallback callback)
void remove_geometry_during_modify()
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare