Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/geometry_component_pointcloud.cc
| Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | static BuiltinCustomDataLayerProvider radius("radius", | ||||
| CD_PROP_FLOAT, | CD_PROP_FLOAT, | ||||
| BuiltinAttributeProvider::Creatable, | BuiltinAttributeProvider::Creatable, | ||||
| BuiltinAttributeProvider::Writable, | BuiltinAttributeProvider::Writable, | ||||
| BuiltinAttributeProvider::Deletable, | BuiltinAttributeProvider::Deletable, | ||||
| point_access, | point_access, | ||||
| make_array_read_attribute<float>, | make_array_read_attribute<float>, | ||||
| make_array_write_attribute<float>, | make_array_write_attribute<float>, | ||||
| nullptr); | nullptr); | ||||
| static BuiltinNamedCustomDataLayerProvider random_id("random_id", | |||||
| ATTR_DOMAIN_POINT, | |||||
| CD_PROP_INT32, | |||||
| BuiltinAttributeProvider::Creatable, | |||||
| BuiltinAttributeProvider::Deletable, | |||||
| point_access, | |||||
| make_array_read_attribute<int>, | |||||
| make_array_write_attribute<int>, | |||||
| nullptr); | |||||
| static CustomDataAttributeProvider point_custom_data(ATTR_DOMAIN_POINT, point_access); | static CustomDataAttributeProvider point_custom_data(ATTR_DOMAIN_POINT, point_access); | ||||
| return ComponentAttributeProviders({&position, &radius}, {&point_custom_data}); | return ComponentAttributeProviders({&position, &radius, &random_id}, {&point_custom_data}); | ||||
| } | } | ||||
| } // namespace blender::bke | } // namespace blender::bke | ||||
| const blender::bke::ComponentAttributeProviders *PointCloudComponent::get_attribute_providers() | const blender::bke::ComponentAttributeProviders *PointCloudComponent::get_attribute_providers() | ||||
| const | const | ||||
| { | { | ||||
| static blender::bke::ComponentAttributeProviders providers = | static blender::bke::ComponentAttributeProviders providers = | ||||
| blender::bke::create_attribute_providers_for_point_cloud(); | blender::bke::create_attribute_providers_for_point_cloud(); | ||||
| return &providers; | return &providers; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||