Blender  V2.93
Public Types | Public Member Functions | Protected Attributes | List of all members
blender::bke::BuiltinAttributeProvider Class Referenceabstract

#include <attribute_access_intern.hh>

Inherited by blender::bke::BuiltinCustomDataLayerProvider, and blender::bke::NormalAttributeProvider.

Public Types

enum  CreatableEnum { Creatable , NonCreatable }
 
enum  WritableEnum { Writable , Readonly }
 
enum  DeletableEnum { Deletable , NonDeletable }
 

Public Member Functions

 BuiltinAttributeProvider (std::string name, const AttributeDomain domain, const CustomDataType data_type, const CreatableEnum createable, const WritableEnum writable, const DeletableEnum deletable)
 
virtual ReadAttributePtr try_get_for_read (const GeometryComponent &component) const =0
 
virtual WriteAttributePtr try_get_for_write (GeometryComponent &component) const =0
 
virtual bool try_delete (GeometryComponent &component) const =0
 
virtual bool try_create (GeometryComponent &UNUSED(component)) const =0
 
virtual bool exists (const GeometryComponent &component) const =0
 
StringRefNull name () const
 
AttributeDomain domain () const
 
CustomDataType data_type () const
 

Protected Attributes

const std::string name_
 
const AttributeDomain domain_
 
const CustomDataType data_type_
 
const CreatableEnum createable_
 
const WritableEnum writable_
 
const DeletableEnum deletable_
 

Detailed Description

A BuiltinAttributeProvider is responsible for exactly one attribute on a geometry component. The attribute is identified by its name and has a fixed domain and type. Builtin attributes do not follow the same loose rules as other attributes, because they are mapped to internal "legacy" data structures. For example, some builtin attributes cannot be deleted.

Definition at line 207 of file attribute_access_intern.hh.

Member Enumeration Documentation

◆ CreatableEnum

Enumerator
Creatable 
NonCreatable 

Definition at line 210 of file attribute_access_intern.hh.

◆ DeletableEnum

Enumerator
Deletable 
NonDeletable 

Definition at line 218 of file attribute_access_intern.hh.

◆ WritableEnum

Enumerator
Writable 
Readonly 

Definition at line 214 of file attribute_access_intern.hh.

Constructor & Destructor Documentation

◆ BuiltinAttributeProvider()

blender::bke::BuiltinAttributeProvider::BuiltinAttributeProvider ( std::string  name,
const AttributeDomain  domain,
const CustomDataType  data_type,
const CreatableEnum  createable,
const WritableEnum  writable,
const DeletableEnum  deletable 
)
inline

Definition at line 232 of file attribute_access_intern.hh.

Member Function Documentation

◆ data_type()

CustomDataType blender::bke::BuiltinAttributeProvider::data_type ( ) const
inline

Definition at line 263 of file attribute_access_intern.hh.

Referenced by GeometryComponent::attribute_try_create().

◆ domain()

AttributeDomain blender::bke::BuiltinAttributeProvider::domain ( ) const
inline

Definition at line 258 of file attribute_access_intern.hh.

Referenced by GeometryComponent::attribute_try_create().

◆ exists()

virtual bool blender::bke::BuiltinAttributeProvider::exists ( const GeometryComponent component) const
pure virtual

◆ name()

StringRefNull blender::bke::BuiltinAttributeProvider::name ( ) const
inline

Definition at line 253 of file attribute_access_intern.hh.

◆ try_create()

virtual bool blender::bke::BuiltinAttributeProvider::try_create ( GeometryComponent UNUSEDcomponent) const
pure virtual

◆ try_delete()

virtual bool blender::bke::BuiltinAttributeProvider::try_delete ( GeometryComponent component) const
pure virtual

◆ try_get_for_read()

virtual ReadAttributePtr blender::bke::BuiltinAttributeProvider::try_get_for_read ( const GeometryComponent component) const
pure virtual

◆ try_get_for_write()

virtual WriteAttributePtr blender::bke::BuiltinAttributeProvider::try_get_for_write ( GeometryComponent component) const
pure virtual

Member Data Documentation

◆ createable_

const CreatableEnum blender::bke::BuiltinAttributeProvider::createable_
protected

◆ data_type_

const CustomDataType blender::bke::BuiltinAttributeProvider::data_type_
protected

Definition at line 226 of file attribute_access_intern.hh.

◆ deletable_

const DeletableEnum blender::bke::BuiltinAttributeProvider::deletable_
protected

◆ domain_

const AttributeDomain blender::bke::BuiltinAttributeProvider::domain_
protected

◆ name_

const std::string blender::bke::BuiltinAttributeProvider::name_
protected

Definition at line 224 of file attribute_access_intern.hh.

◆ writable_

const WritableEnum blender::bke::BuiltinAttributeProvider::writable_
protected

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