Blender
V3.3
|
#include <BKE_attribute.hh>
Public Member Functions | |
AttributeInitMove (void *data) | |
![]() | |
AttributeInit (const Type type) | |
Public Attributes | |
void * | data = nullptr |
![]() | |
Type | type |
Additional Inherited Members | |
![]() | |
enum class | Type { Default , VArray , MoveArray } |
Create an attribute with a by passing ownership of a pre-allocated contiguous array of data. Sometimes data is created before a geometry component is available. In that case, it's preferable to move data directly to the created attribute to avoid a new allocation and a copy.
Note that this will only have a benefit for attributes that are stored directly as contiguous arrays, so not for some built-in attributes.
The array must be allocated with MEM_*, since attribute_try_create
will free the array if it can't be used directly, and that is generally how Blender expects custom data to be allocated.
Definition at line 120 of file BKE_attribute.hh.
|
inline |
Definition at line 123 of file BKE_attribute.hh.
void* blender::bke::AttributeInitMove::data = nullptr |
Definition at line 121 of file BKE_attribute.hh.