Blender  V3.3
Public Attributes | List of all members
blender::bke::AttributeAccessorFunctions Struct Reference

#include <BKE_attribute.hh>

Public Attributes

bool(* contains )(const void *owner, const AttributeIDRef &attribute_id)
 
std::optional< AttributeMetaData >(* lookup_meta_data )(const void *owner, const AttributeIDRef &attribute_id)
 
bool(* domain_supported )(const void *owner, eAttrDomain domain)
 
int(* domain_size )(const void *owner, eAttrDomain domain)
 
bool(* is_builtin )(const void *owner, const AttributeIDRef &attribute_id)
 
GAttributeReader(* lookup )(const void *owner, const AttributeIDRef &attribute_id)
 
GVArray(* adapt_domain )(const void *owner, const GVArray &varray, eAttrDomain from_domain, eAttrDomain to_domain)
 
bool(* for_all )(const void *owner, FunctionRef< bool(const AttributeIDRef &, const AttributeMetaData &)> fn)
 
GAttributeWriter(* lookup_for_write )(void *owner, const AttributeIDRef &attribute_id)
 
bool(* remove )(void *owner, const AttributeIDRef &attribute_id)
 
bool(* add )(void *owner, const AttributeIDRef &attribute_id, eAttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer)
 

Detailed Description

Core functions which make up the attribute API. They should not be called directly, but through #AttributesAccessor or #MutableAttributesAccessor.

This is similar to a virtual function table. A struct of function pointers is used instead, because this way the attribute accessors can be trivial and can be passed around by value. This makes it easy to return the attribute accessor for a geometry from a function.

Definition at line 319 of file BKE_attribute.hh.

Member Data Documentation

◆ adapt_domain

GVArray(* blender::bke::AttributeAccessorFunctions::adapt_domain) (const void *owner, const GVArray &varray, eAttrDomain from_domain, eAttrDomain to_domain)

◆ add

bool(* blender::bke::AttributeAccessorFunctions::add) (void *owner, const AttributeIDRef &attribute_id, eAttrDomain domain, eCustomDataType data_type, const AttributeInit &initializer)

Definition at line 336 of file BKE_attribute.hh.

Referenced by blender::bke::MutableAttributeAccessor::add().

◆ contains

bool(* blender::bke::AttributeAccessorFunctions::contains) (const void *owner, const AttributeIDRef &attribute_id)

Definition at line 320 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::contains().

◆ domain_size

int(* blender::bke::AttributeAccessorFunctions::domain_size) (const void *owner, eAttrDomain domain)

◆ domain_supported

bool(* blender::bke::AttributeAccessorFunctions::domain_supported) (const void *owner, eAttrDomain domain)

◆ for_all

bool(* blender::bke::AttributeAccessorFunctions::for_all) (const void *owner, FunctionRef< bool(const AttributeIDRef &, const AttributeMetaData &)> fn)

Definition at line 331 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::for_all().

◆ is_builtin

bool(* blender::bke::AttributeAccessorFunctions::is_builtin) (const void *owner, const AttributeIDRef &attribute_id)

Definition at line 325 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::is_builtin().

◆ lookup

GAttributeReader(* blender::bke::AttributeAccessorFunctions::lookup) (const void *owner, const AttributeIDRef &attribute_id)

Definition at line 326 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::lookup().

◆ lookup_for_write

GAttributeWriter(* blender::bke::AttributeAccessorFunctions::lookup_for_write) (void *owner, const AttributeIDRef &attribute_id)

◆ lookup_meta_data

std::optional<AttributeMetaData>(* blender::bke::AttributeAccessorFunctions::lookup_meta_data) (const void *owner, const AttributeIDRef &attribute_id)

Definition at line 320 of file BKE_attribute.hh.

Referenced by blender::bke::AttributeAccessor::lookup_meta_data().

◆ remove

bool(* blender::bke::AttributeAccessorFunctions::remove) (void *owner, const AttributeIDRef &attribute_id)

Definition at line 335 of file BKE_attribute.hh.

Referenced by blender::bke::MutableAttributeAccessor::remove().


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