diff options
Diffstat (limited to 'source/blender/geometry/intern/point_merge_by_distance.cc')
-rw-r--r-- | source/blender/geometry/intern/point_merge_by_distance.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/geometry/intern/point_merge_by_distance.cc b/source/blender/geometry/intern/point_merge_by_distance.cc index 42fac849667..81f57f785a3 100644 --- a/source/blender/geometry/intern/point_merge_by_distance.cc +++ b/source/blender/geometry/intern/point_merge_by_distance.cc @@ -17,7 +17,7 @@ PointCloud *point_merge_by_distance(const PointCloud &src_points, const float merge_distance, const IndexMask selection) { - const bke::AttributeAccessor src_attributes = bke::pointcloud_attributes(src_points); + const bke::AttributeAccessor src_attributes = src_points.attributes(); VArraySpan<float3> positions = src_attributes.lookup_or_default<float3>( "position", ATTR_DOMAIN_POINT, float3(0)); const int src_size = positions.size(); @@ -41,8 +41,7 @@ PointCloud *point_merge_by_distance(const PointCloud &src_points, /* Create the new point cloud and add it to a temporary component for the attribute API. */ const int dst_size = src_size - duplicate_count; PointCloud *dst_pointcloud = BKE_pointcloud_new_nomain(dst_size); - bke::MutableAttributeAccessor dst_attributes = bke::pointcloud_attributes_for_write( - *dst_pointcloud); + bke::MutableAttributeAccessor dst_attributes = dst_pointcloud->attributes_for_write(); /* By default, every point is just "merged" with itself. Then fill in the results of the merge * finding, converting from indices into the selection to indices into the full input point |