|
Blender V5.3
|
#include <BKE_attribute_storage.hh>
Classes | |
| struct | ArrayData |
| struct | SingleData |
Public Types | |
| using | DataVariant = std::variant<ArrayData, SingleData> |
Public Member Functions | |
| StringRefNull | name () const |
| AttrDomain | domain () const |
| AttrType | data_type () const |
| AttrStorageType | storage_type () const |
| const DataVariant & | data () const |
| DataVariant & | data_for_write () |
| void | assign_data (DataVariant &&data) |
Public Attributes | |
| friend | AttributeStorage |
Data and metadata for a single geometry attribute.
Definition at line 42 of file BKE_attribute_storage.hh.
| using blender::bke::Attribute::DataVariant = std::variant<ArrayData, SingleData> |
Definition at line 70 of file BKE_attribute_storage.hh.
|
inline |
Replace the attribute's data without first making the existing data mutable.
Definition at line 312 of file BKE_attribute_storage.hh.
References data().
Referenced by blender::bke::ensure_array_storage(), blender::bke::curves::get_curves_accessor_functions(), blender::bke::greasepencil::get_grease_pencil_accessor_functions(), blender::bke::get_instances_accessor_functions(), blender::bke::get_mesh_accessor_functions(), blender::bke::get_pointcloud_accessor_functions(), and blender::bke::AttributeStorage::resize().
|
inline |
Low level access to the data stored for the attribute. The variant's type will correspond to the storage type.
Definition at line 296 of file BKE_attribute_storage.hh.
Referenced by assign_data(), blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_write(), data_for_write(), blender::bke::ensure_array_storage(), blender::bke::Attribute::SingleData::from_value(), blender::bke::get_span_attribute(), blender::bke::get_varray_attribute(), blender::bke::mesh_skin_to_legacy(), blender::mesh_to_bm_copy_info_calc(), blender::bke::read_attr_data(), blender::bke::AttributeStorage::resize(), and blender::ed::pointcloud::undo::step_decode().
| Attribute::DataVariant & Attribute::data_for_write | ( | ) |
The same as data(), but if the attribute data is shared initially, it will be unshared and made mutable.
Definition at line 120 of file attribute_storage.cc.
References blender::bke::attribute_type_to_cpp_type(), blender::BLI_assert(), blender::array_utils::copy(), blender::bke::Attribute::ArrayData::data, data(), blender::GVArray::from_span(), blender::bke::Attribute::ArrayData::from_uninitialized(), blender::bke::Attribute::SingleData::from_value(), blender::GMutableSpan::GMutableSpan(), and blender::GPointer::GPointer().
Referenced by attr_create_generic(), attr_create_motion_from_velocity(), attr_create_pointiness(), attr_create_subd_uv_map(), attr_create_uv_map(), create_mesh(), blender::bke::get_mutable_attribute(), and blender::bke::LegacyMeshInterpolator::LegacyMeshInterpolator().
|
inline |
The data type exposed to the user. Depending on the storage type, the actual internal values may not be the same type.
Definition at line 291 of file BKE_attribute_storage.hh.
Referenced by blender::bke::AttributeStorage::add(), blender::bke::attribute_storage_blend_write_prepare(), blender::BKE_attribute_rename(), blender::BKE_attributes_length(), blender::bke::AttributeStorage::blend_read(), blender::bke::AttributeStorage::blend_write(), blender::bke::ensure_array_storage(), blender::bke::curves::get_curves_accessor_functions(), blender::bke::greasepencil::get_grease_pencil_accessor_functions(), blender::bke::get_instances_accessor_functions(), blender::bke::get_mesh_accessor_functions(), blender::bke::get_pointcloud_accessor_functions(), blender::bke::get_varray_attribute(), blender::bke::LegacyMeshInterpolator::LegacyMeshInterpolator(), blender::bke::mesh_skin_to_legacy(), blender::mesh_to_bm_copy_info_calc(), and blender::bke::AttributeStorage::resize().
|
inline |
Which part of a geometry the attribute corresponds to.
Definition at line 286 of file BKE_attribute_storage.hh.
Referenced by blender::bke::AttributeStorage::add(), blender::bke::attribute_storage_blend_write_prepare(), blender::BKE_attribute_rename(), blender::bke::AttributeStorage::blend_read(), blender::bke::ensure_array_storage(), blender::bke::curves::get_curves_accessor_functions(), blender::bke::greasepencil::get_grease_pencil_accessor_functions(), blender::bke::get_instances_accessor_functions(), blender::bke::get_mesh_accessor_functions(), blender::bke::get_pointcloud_accessor_functions(), blender::bke::get_span_attribute(), blender::bke::get_varray_attribute(), blender::bke::LegacyMeshInterpolator::LegacyMeshInterpolator(), blender::bke::mesh_skin_to_legacy(), blender::mesh_to_bm_copy_info_calc(), and blender::bke::AttributeStorage::resize().
|
inline |
Unique name across all domains.
The C++ wrapper needs to be the same size as the DNA struct.
Definition at line 281 of file BKE_attribute_storage.hh.
Referenced by blender::bke::AttributeStorage::add(), blender::bke::attribute_storage_blend_write_prepare(), blender::BKE_attribute_rename(), blender::BKE_attributes_length(), blender::bke::AttributeStorage::blend_read(), blender::bke::AttributeStorage::blend_write(), blender::ed::geometry::geometry_attribute_add_exec(), blender::bke::AttributeStorage::index_of(), blender::bke::AttributeStorage::lookup(), blender::bke::AttributeStorage::lookup(), blender::bke::mesh_skin_to_legacy(), blender::bke::AttributeStorage::remove(), and blender::bke::AttributeStorage::unique_name_calc().
|
inline |
The method used to store the data. This gives flexibility to optimize the internal storage even though conceptually the attribute is an array of values.
Definition at line 301 of file BKE_attribute_storage.hh.
References blender::bke::Array, and blender::bke::Single.
Referenced by blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), blender::bke::AttributeStorage::blend_write(), blender::bke::ensure_array_storage(), blender::bke::get_varray_attribute(), blender::bke::LegacyMeshInterpolator::LegacyMeshInterpolator(), blender::bke::mesh_skin_to_legacy(), blender::mesh_to_bm_copy_info_calc(), and blender::bke::AttributeStorage::resize().
| friend blender::bke::Attribute::AttributeStorage |
Definition at line 71 of file BKE_attribute_storage.hh.