Blender V5.0
blender::bke::Attribute Class Reference

#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 DataVariantdata () const
DataVariantdata_for_write ()
void assign_data (DataVariant &&data)

Public Attributes

friend AttributeStorage

Detailed Description

Data and metadata for a single geometry attribute.

Definition at line 33 of file BKE_attribute_storage.hh.

Member Typedef Documentation

◆ DataVariant

Definition at line 61 of file BKE_attribute_storage.hh.

Member Function Documentation

◆ assign_data()

void Attribute::assign_data ( DataVariant && data)
inline

Replace the attribute's data without first making the existing data mutable.

Definition at line 244 of file BKE_attribute_storage.hh.

References data().

Referenced by blender::geometry::reorder_attribute_domain(), reorder_attribute_domain(), blender::geometry::reorder_attribute_groups(), blender::bke::AttributeStorage::resize(), and shrink_attribute_storage().

◆ data()

◆ data_for_write()

◆ data_type()

◆ domain()

◆ name()

StringRefNull Attribute::name ( ) const
inline

Unique name across all domains.

Note
Compared to CustomData, which doesn't enforce uniqueness, across domains on its own, this is enforced by asserts when adding attributes. See #unique_name_calc() (which is also called during the conversion process).

The C++ wrapper needs to be the same size as the DNA struct.

Definition at line 224 of file BKE_attribute_storage.hh.

Referenced by blender::bke::attribute_storage_blend_write_prepare(), blender::bke::attribute_to_writer(), BKE_attributes_active_name_get(), blender::bke::convert_storage_to_customdata(), blender::ed::geometry::geometry_attribute_add_exec(), blender::bke::curves::get_curves_accessor_functions(), blender::bke::greasepencil::get_grease_pencil_accessor_functions(), blender::bke::get_instances_accessor_functions(), and blender::bke::get_pointcloud_accessor_functions().

◆ storage_type()

Member Data Documentation

◆ AttributeStorage

friend blender::bke::Attribute::AttributeStorage

The documentation for this class was generated from the following files: