Blender
V3.3
|
#include <attribute_access_intern.hh>
Public Member Functions | |
BuiltinCustomDataLayerProvider (std::string attribute_name, const eAttrDomain domain, const eCustomDataType attribute_type, const eCustomDataType stored_type, const CreatableEnum creatable, const WritableEnum writable, const DeletableEnum deletable, const CustomDataAccessInfo custom_data_access, const AsReadAttribute as_read_attribute, const AsWriteAttribute as_write_attribute, const UpdateOnChange update_on_write) | |
GVArray | try_get_for_read (const void *owner) const final |
GAttributeWriter | try_get_for_write (void *owner) const final |
bool | try_delete (void *owner) const final |
bool | try_create (void *owner, const AttributeInit &initializer) const final |
bool | exists (const void *owner) const final |
![]() | |
BuiltinAttributeProvider (std::string name, const eAttrDomain domain, const eCustomDataType data_type, const CreatableEnum createable, const WritableEnum writable, const DeletableEnum deletable) | |
StringRefNull | name () const |
eAttrDomain | domain () const |
eCustomDataType | data_type () const |
Additional Inherited Members | |
![]() | |
enum | CreatableEnum { Creatable , NonCreatable } |
enum | WritableEnum { Writable , Readonly } |
enum | DeletableEnum { Deletable , NonDeletable } |
![]() | |
const std::string | name_ |
const eAttrDomain | domain_ |
const eCustomDataType | data_type_ |
const CreatableEnum | createable_ |
const WritableEnum | writable_ |
const DeletableEnum | deletable_ |
This provider is used to provide access to builtin attributes. It supports making internal types available as different types. For example, the vertex position attribute is stored as part of the MVert struct, but is exposed as float3 attribute.
It also supports named builtin attributes, and will look up attributes in CustomData by name if the stored type is the same as the attribute type.
Definition at line 222 of file attribute_access_intern.hh.
|
inline |
Definition at line 235 of file attribute_access_intern.hh.
Implements blender::bke::BuiltinAttributeProvider.
Definition at line 422 of file attribute_access.cc.
References CustomData_get_layer(), CustomData_get_layer_named(), blender::bke::CustomDataAccessInfo::get_const_custom_data, and blender::bke::BuiltinAttributeProvider::name_.
|
finalvirtual |
Implements blender::bke::BuiltinAttributeProvider.
Definition at line 385 of file attribute_access.cc.
References blender::bke::add_builtin_type_custom_data_layer_from_init(), blender::bke::add_custom_data_layer_from_attribute_init(), blender::bke::BuiltinAttributeProvider::Creatable, blender::bke::BuiltinAttributeProvider::createable_, CustomData_get_layer(), CustomData_get_layer_named(), blender::bke::BuiltinAttributeProvider::data_type_, blender::bke::CustomDataAccessInfo::get_custom_data, blender::bke::CustomDataAccessInfo::get_element_num, blender::bke::BuiltinAttributeProvider::name_, and blender::bke::CustomDataAccessInfo::update_custom_data_pointers.
Implements blender::bke::BuiltinAttributeProvider.
Definition at line 345 of file attribute_access.cc.
References CustomData_free_layer(), CustomData_free_layer_named(), CustomData_get_layer_index(), blender::bke::BuiltinAttributeProvider::Deletable, blender::bke::BuiltinAttributeProvider::deletable_, blender::bke::CustomDataAccessInfo::get_custom_data, blender::bke::CustomDataAccessInfo::get_element_num, blender::bke::BuiltinAttributeProvider::name_, update(), and blender::bke::CustomDataAccessInfo::update_custom_data_pointers.
|
finalvirtual |
Implements blender::bke::BuiltinAttributeProvider.
Definition at line 258 of file attribute_access.cc.
References data, blender::bke::CustomDataAccessInfo::get_const_custom_data, blender::bke::CustomDataAccessInfo::get_element_num, CustomData::layers, blender::bke::BuiltinAttributeProvider::name_, and CustomData::totlayer.
|
finalvirtual |
Implements blender::bke::BuiltinAttributeProvider.
Definition at line 288 of file attribute_access.cc.
References CustomData_duplicate_referenced_layer(), CustomData_duplicate_referenced_layer_named(), data, blender::bke::BuiltinAttributeProvider::domain_, blender::bke::CustomDataAccessInfo::get_custom_data, blender::bke::CustomDataAccessInfo::get_element_num, CustomData::layers, blender::bke::BuiltinAttributeProvider::name_, CustomData::totlayer, update(), blender::bke::CustomDataAccessInfo::update_custom_data_pointers, void, blender::bke::BuiltinAttributeProvider::Writable, and blender::bke::BuiltinAttributeProvider::writable_.