46 const float merge_distance,
52 evaluator.add(selection_field);
55 const IndexMask selection = evaluator.get_evaluated_as_mask(0);
56 if (selection.is_empty()) {
61 src_points, merge_distance, selection, attribute_filter);
65 const float merge_distance,
78 const float merge_distance,
83 evaluator.
add(selection_field);
86 const IndexMask selection = evaluator.get_evaluated_as_mask(0);
87 if (selection.is_empty()) {
102 const float merge_distance =
params.extract_input<
float>(
"Distance");
107 *pointcloud, merge_distance, selection,
params.get_attribute_filter(
"Geometry"));
113 std::optional<Mesh *>
result;
130 params.set_output(
"Geometry", std::move(geometry_set));
140 "Merge all close selected points, whether or not they are connected"},
145 "Only merge mesh vertices along existing edges. This method can be much faster"},
146 {0,
nullptr, 0,
nullptr,
nullptr},
165 "NodeGeometryMergeByDistance",
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define BLI_assert_unreachable()
GeometryNodeMergeByDistanceMode
@ GEO_NODE_MERGE_BY_DISTANCE_MODE_ALL
@ GEO_NODE_MERGE_BY_DISTANCE_MODE_CONNECTED
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
int add(GField field, GVArray *varray_ptr)
int add_with_destination(GField field, GVMutableArray dst)
local_group_size(16, 16) .push_constant(Type b
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
std::optional< Mesh * > mesh_merge_by_distance_connected(const Mesh &mesh, Span< bool > selection, float merge_distance, bool only_loose_edges)
PointCloud * point_merge_by_distance(const PointCloud &src_points, const float merge_distance, const IndexMask &selection, const bke::AttributeFilter &attribute_filter)
std::optional< Mesh * > mesh_merge_by_distance_all(const Mesh &mesh, const IndexMask &selection, float merge_distance)
static std::optional< Mesh * > mesh_merge_by_distance_connected(const Mesh &mesh, const float merge_distance, const Field< bool > &selection_field)
static void node_declare(NodeDeclarationBuilder &b)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static PointCloud * pointcloud_merge_by_distance(const PointCloud &src_points, const float merge_distance, const Field< bool > &selection_field, const AttributeFilter &attribute_filter)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
static void node_rna(StructRNA *srna)
static void node_init(bNodeTree *, bNode *node)
static std::optional< Mesh * > mesh_merge_by_distance_all(const Mesh &mesh, const float merge_distance, const Field< bool > &selection_field)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_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[]
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const PointCloud * get_pointcloud() const
const Mesh * get_mesh() const
void modify_geometry_sets(ForeachSubGeometryCallback callback)
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare