Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_pointcloud.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_pointcloud.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
index 4953da8a5ee..34cc99d2f92 100644
--- a/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
+++ b/source/blender/blenkernel/intern/geometry_component_pointcloud.cc
@@ -111,7 +111,6 @@ namespace blender::bke {
*/
static ComponentAttributeProviders create_attribute_providers_for_point_cloud()
{
- static auto update_custom_data_pointers = [](void * /*owner*/) {};
static CustomDataAccessInfo point_access = {
[](void *owner) -> CustomData * {
PointCloud *pointcloud = static_cast<PointCloud *>(owner);
@@ -124,8 +123,7 @@ static ComponentAttributeProviders create_attribute_providers_for_point_cloud()
[](const void *owner) -> int {
const PointCloud *pointcloud = static_cast<const PointCloud *>(owner);
return pointcloud->totpoint;
- },
- update_custom_data_pointers};
+ }};
static BuiltinCustomDataLayerProvider position("position",
ATTR_DOMAIN_POINT,
@@ -182,10 +180,10 @@ static AttributeAccessorFunctions get_pointcloud_accessor_functions()
return 0;
}
};
- fn.domain_supported = [](const void *UNUSED(owner), const eAttrDomain domain) {
+ fn.domain_supported = [](const void * /*owner*/, const eAttrDomain domain) {
return domain == ATTR_DOMAIN_POINT;
};
- fn.adapt_domain = [](const void *UNUSED(owner),
+ fn.adapt_domain = [](const void * /*owner*/,
const blender::GVArray &varray,
const eAttrDomain from_domain,
const eAttrDomain to_domain) {
@@ -203,18 +201,20 @@ static const AttributeAccessorFunctions &get_pointcloud_accessor_functions_ref()
return fn;
}
-AttributeAccessor pointcloud_attributes(const PointCloud &pointcloud)
+} // namespace blender::bke
+
+blender::bke::AttributeAccessor PointCloud::attributes() const
{
- return AttributeAccessor(&pointcloud, get_pointcloud_accessor_functions_ref());
+ return blender::bke::AttributeAccessor(this,
+ blender::bke::get_pointcloud_accessor_functions_ref());
}
-MutableAttributeAccessor pointcloud_attributes_for_write(PointCloud &pointcloud)
+blender::bke::MutableAttributeAccessor PointCloud::attributes_for_write()
{
- return MutableAttributeAccessor(&pointcloud, get_pointcloud_accessor_functions_ref());
+ return blender::bke::MutableAttributeAccessor(
+ this, blender::bke::get_pointcloud_accessor_functions_ref());
}
-} // namespace blender::bke
-
std::optional<blender::bke::AttributeAccessor> PointCloudComponent::attributes() const
{
return blender::bke::AttributeAccessor(pointcloud_,