|
Blender V5.3
|
#include <BKE_attribute_storage.hh>
Inherits blender::AttributeStorage.
Classes | |
| struct | BlendWriteData |
| class | Iterator |
| class | MutableIterator |
Additional Inherited Members | |
| Public Attributes inherited from blender::AttributeStorage | |
| struct Attribute * | dna_attributes = nullptr |
| int | dna_attributes_num = 0 |
| char | _pad [4] = {} |
| bke::AttributeStorageRuntime * | runtime = nullptr |
Definition at line 140 of file BKE_attribute_storage.hh.
| blender::bke::AttributeStorage::AttributeStorage | ( | ) |
Definition at line 148 of file attribute_storage.cc.
References blender::AttributeStorage::_pad, blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, and blender::AttributeStorage::runtime.
Referenced by AttributeStorage(), AttributeStorage(), blender::bke::CurvesGeometry::CurvesGeometry(), blender::bke::CurvesGeometry::CurvesGeometry(), operator=(), and operator=().
| blender::bke::AttributeStorage::AttributeStorage | ( | const AttributeStorage & | other | ) |
Definition at line 156 of file attribute_storage.cc.
References attribute, AttributeStorage(), blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, and blender::AttributeStorage::runtime.
| blender::bke::AttributeStorage::AttributeStorage | ( | AttributeStorage && | other | ) |
Definition at line 177 of file attribute_storage.cc.
References AttributeStorage(), blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, and blender::AttributeStorage::runtime.
| blender::bke::AttributeStorage::~AttributeStorage | ( | ) |
Definition at line 194 of file attribute_storage.cc.
References blender::AttributeStorage::runtime.
Referenced by blender::pointcloud_free_data(), and blender::bke::CurvesGeometry::~CurvesGeometry().
| Attribute & blender::bke::AttributeStorage::add | ( | std::string | name, |
| bke::AttrDomain | domain, | ||
| bke::AttrType | data_type, | ||
| Attribute::DataVariant | data ) |
Add an attribute with the given name, which must not already be used by an existing attribute or this will invoke undefined behavior.
Definition at line 238 of file attribute_storage.cc.
References attribute, blender::BLI_assert(), blender::data, blender::bke::Attribute::data_type(), blender::bke::Attribute::domain(), lookup(), blender::bke::Attribute::name(), and blender::AttributeStorage::runtime.
Referenced by blender::bke::CurvesGeometry::fill_curve_types(), and blender::ed::geometry::geometry_attribute_add_exec().
| Attribute & blender::bke::AttributeStorage::at_index | ( | int | index | ) |
Return the attribute at the given index.
Definition at line 204 of file attribute_storage.cc.
References blender::AttributeStorage::runtime.
| const Attribute & blender::bke::AttributeStorage::at_index | ( | int | index | ) | const |
Definition at line 208 of file attribute_storage.cc.
References blender::AttributeStorage::runtime.
|
inline |
Definition at line 327 of file BKE_attribute_storage.hh.
References blender::bke::AttributeStorage::MutableIterator::MutableIterator(), and blender::AttributeStorage::runtime.
|
inline |
Definition at line 317 of file BKE_attribute_storage.hh.
References blender::bke::AttributeStorage::Iterator::Iterator(), and blender::AttributeStorage::runtime.
| void blender::bke::AttributeStorage::blend_read | ( | BlendDataReader & | reader | ) |
Read data owned by the AttributeStorage struct. This works by converting the DNA-specific types stored in the files to the runtime data structures.
Definition at line 508 of file attribute_storage.cc.
References attribute, BLI_SCOPED_DEFER, blender::BLO_read_array_and_validate_size(), blender::BLO_read_string(), CLOG_ERROR, blender::data, blender::bke::Attribute::data_type(), blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, blender::bke::Attribute::domain(), blender::IndexRange::IndexRange(), blender::LOG, blender::bke::Attribute::name(), blender::bke::read_attr_data(), blender::bke::read_attr_domain(), blender::AttributeStorage::runtime, and blender::bke::Attribute::storage_type().
Referenced by blender::bke::CurvesGeometry::blend_read(), and blender::pointcloud_blend_read_data().
| void blender::bke::AttributeStorage::blend_write | ( | BlendWriter & | writer, |
| const BlendWriteData & | write_data ) |
Write the prepared data and the data stored in the DNA fields in the AttributeStorage struct.
Definition at line 675 of file attribute_storage.cc.
References blender::bke::Array, blender::bke::AttributeStorage::BlendWriteData::attributes, blender::AttributeArray::data, blender::AttributeSingle::data, blender::bke::Attribute::data(), blender::bke::Attribute::data_type(), blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, blender::bke::Attribute::name(), blender::AttributeArray::sharing_info, blender::AttributeSingle::sharing_info, blender::bke::Single, blender::AttributeArray::size, blender::bke::Attribute::storage_type(), blender::bke::write_shared_array(), blender::BlendWriter::write_string(), blender::BlendWriter::write_struct(), and blender::BlendWriter::write_struct_array_by_name().
Referenced by blender::bke::CurvesGeometry::blend_write(), and blender::pointcloud_blend_write().
| int blender::bke::AttributeStorage::count | ( | ) | const |
Return the number of attributes.
Definition at line 199 of file attribute_storage.cc.
References blender::AttributeStorage::runtime.
| void blender::bke::AttributeStorage::count_memory | ( | MemoryCounter & | memory | ) | const |
Definition at line 476 of file attribute_storage.cc.
References blender::memory_counter::MemoryCounter::add_shared(), blender::bke::attribute_type_to_cpp_type(), blender::data, and blender::AttributeStorage::runtime.
Referenced by blender::bke::CurvesGeometry::count_memory().
|
inline |
Definition at line 335 of file BKE_attribute_storage.hh.
References blender::bke::AttributeStorage::MutableIterator::MutableIterator(), and blender::AttributeStorage::runtime.
|
inline |
Definition at line 322 of file BKE_attribute_storage.hh.
References blender::bke::AttributeStorage::Iterator::Iterator(), and blender::AttributeStorage::runtime.
| void blender::bke::AttributeStorage::foreach_working_space_color | ( | const IDTypeForeachColorFunctionCallback & | fn | ) |
Iterate over every color to change it to another color-space.
Definition at line 714 of file attribute_storage.cc.
References attribute, blender::bke::ColorFloat, blender::data, and blender::AttributeStorage::runtime.
Referenced by blender::pointcloud_foreach_working_space_color().
| int blender::bke::AttributeStorage::index_of | ( | StringRef | name | ) | const |
Return the index of the attribute with the given name, or -1 if not found.
Definition at line 213 of file attribute_storage.cc.
References blender::bke::Attribute::name(), and blender::AttributeStorage::runtime.
Referenced by blender::BKE_attributes_active_set().
Try to find the attribute with a given name. The non-const overload does not make the attribute data itself mutable.
Definition at line 228 of file attribute_storage.cc.
References attribute, blender::bke::Attribute::name(), and blender::AttributeStorage::runtime.
Referenced by add(), blender::BKE_attribute_rename(), blender::bke::CurvesGeometry::fill_curve_types(), blender::bke::LegacyMeshInterpolator::LegacyMeshInterpolator(), rename(), and unique_name_calc().
Definition at line 218 of file attribute_storage.cc.
References attribute, blender::bke::Attribute::name(), and blender::AttributeStorage::runtime.
| AttributeStorage & blender::bke::AttributeStorage::operator= | ( | AttributeStorage && | other | ) |
Definition at line 184 of file attribute_storage.cc.
References AttributeStorage().
| AttributeStorage & blender::bke::AttributeStorage::operator= | ( | const AttributeStorage & | other | ) |
Definition at line 167 of file attribute_storage.cc.
References AttributeStorage().
Definition at line 277 of file attribute_storage.cc.
References blender::BLI_assert(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), and blender::AttributeStorage::runtime.
Definition at line 270 of file attribute_storage.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and blender::AttributeStorage::runtime.
| bool blender::bke::AttributeStorage::remove | ( | StringRef | name | ) |
Attempt to remove the attribute with the given name, returning true if successful. Should not be called while iterating over attributes.
Definition at line 255 of file attribute_storage.cc.
References attribute, blender::bke::Attribute::name(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove(), blender::AttributeStorage::runtime, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::bke::CurvesGeometry::blend_read().
| void blender::bke::AttributeStorage::rename | ( | Attribute & | attr, |
| std::string | new_name ) |
Definition at line 301 of file attribute_storage.cc.
References attribute, blender::BLI_assert(), blender::AttributeStorage::runtime, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Definition at line 323 of file attribute_storage.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::begin(), blender::BLI_assert(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::BaseIteratorRange< SubIterator >::end(), and blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::keys().
| void blender::bke::AttributeStorage::rename | ( | StringRef | old_name, |
| std::string | new_name ) |
Change the name of a single existing attribute.
Definition at line 317 of file attribute_storage.cc.
References blender::BLI_assert(), lookup(), and rename().
Referenced by blender::BKE_attribute_rename(), and rename().
| void blender::bke::AttributeStorage::resize | ( | AttrDomain | domain, |
| int64_t | new_size ) |
Resize the data for a given domain. New values will be default initialized (meaning no zero initialization for trivial types).
Definition at line 348 of file attribute_storage.cc.
References blender::bke::Array, blender::bke::Attribute::assign_data(), blender::bke::attribute_type_to_cpp_type(), blender::CPPType::copy_construct_n(), blender::bke::Attribute::data(), blender::data, blender::bke::Attribute::data_type(), blender::Default, blender::CPPType::default_construct_n(), blender::bke::Attribute::domain(), blender::bke::Attribute::ArrayData::from_uninitialized(), POINTER_OFFSET, PRF_scope_with_name, blender::bke::Single, blender::CPPType::size, and blender::bke::Attribute::storage_type().
Referenced by blender::pointcloud_resize(), and blender::bke::CurvesGeometry::resize().
| std::string blender::bke::AttributeStorage::unique_name_calc | ( | StringRef | name | ) | const |
Return a possibly changed version of the input name that is unique within existing names.
Definition at line 292 of file attribute_storage.cc.
References blender::BLI_uniquename_cb(), DATA_, blender::blender::StringRefBase::is_empty(), lookup(), and blender::bke::Attribute::name().