19 b.add_input<
decl::Bool>(
N_(
"Selection")).default_value(
true).hide_value().supports_field();
28 uiItemR(layout,
ptr,
"mode", 0,
"", ICON_NONE);
39 const float merge_distance,
45 evaluator.add(selection_field);
48 const IndexMask selection = evaluator.get_evaluated_as_mask(0);
57 const float merge_distance,
64 evaluator.add_with_destination(selection_field, selection.
as_mutable_span());
72 const float merge_distance,
78 evaluator.add(selection_field);
81 const IndexMask selection = evaluator.get_evaluated_as_mask(0);
98 const float merge_distance =
params.extract_input<
float>(
"Distance");
100 geometry_set.modify_geometry_sets([&](
GeometrySet &geometry_set) {
110 std::optional<Mesh *>
result;
127 params.set_output(
"Geometry", std::move(geometry_set));
141 "NodeGeometryMergeByDistance",
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
#define GEO_NODE_MERGE_BY_DISTANCE
#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)
#define BLI_assert_unreachable()
static uint8 component(Color32 c, uint i)
GeometryNodeMergeByDistanceMode
@ GEO_NODE_MERGE_BY_DISTANCE_MODE_ALL
@ GEO_NODE_MERGE_BY_DISTANCE_MODE_CONNECTED
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
int attribute_domain_size(eAttrDomain domain) const
const Mesh * get_for_read() const
const PointCloud * get_for_read() const
MutableSpan< T > as_mutable_span()
std::optional< Mesh * > mesh_merge_by_distance_connected(const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges)
std::optional< Mesh * > mesh_merge_by_distance_all(const Mesh &mesh, IndexMask selection, float merge_distance)
PointCloud * point_merge_by_distance(const PointCloud &src_points, const float merge_distance, const IndexMask selection)
static void node_declare(NodeDeclarationBuilder &b)
static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static std::optional< Mesh * > mesh_merge_by_distance_connected(const MeshComponent &mesh_component, const float merge_distance, const Field< bool > &selection_field)
static PointCloud * pointcloud_merge_by_distance(const PointCloudComponent &src_points, const float merge_distance, const Field< bool > &selection_field)
static std::optional< Mesh * > mesh_merge_by_distance_all(const MeshComponent &mesh_component, const float merge_distance, const Field< bool > &selection_field)
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_merge_by_distance()
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 replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const GeometryComponent * get_component_for_read(GeometryComponentType component_type) const
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
bool has_pointcloud() const
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
NodeDeclareFunction declare