Blender V4.3
blender::bke::AttributeInitMoveArray Struct Reference

#include <BKE_attribute.hh>

Inherits blender::bke::AttributeInit.

Public Member Functions

 AttributeInitMoveArray (void *data)
 
- Public Member Functions inherited from blender::bke::AttributeInit
 AttributeInit (const Type type)
 

Public Attributes

void * data = nullptr
 
- Public Attributes inherited from blender::bke::AttributeInit
Type type
 

Additional Inherited Members

- Public Types inherited from blender::bke::AttributeInit
enum class  Type {
  Construct , DefaultValue , VArray , MoveArray ,
  Shared
}
 

Detailed Description

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.

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 125 of file BKE_attribute.hh.

Constructor & Destructor Documentation

◆ AttributeInitMoveArray()

blender::bke::AttributeInitMoveArray::AttributeInitMoveArray ( void * data)
inline

Definition at line 128 of file BKE_attribute.hh.

Member Data Documentation

◆ data

void* blender::bke::AttributeInitMoveArray::data = nullptr

Definition at line 126 of file BKE_attribute.hh.


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