Blender V5.3
blender::LayerTypeInfo Struct Reference

Public Attributes

int size = 0
int alignment = 0
const char * structname = nullptr
int structnum = 0
const char * defaultname = nullptr
cd_copy copy = nullptr
cd_free free = nullptr
cd_interp interp = nullptr
void(*) swap (void *data, const int *corner_indices) = nullptr
cd_set_default_value set_default_value = nullptr
void(*) construct (void *data, int count) = nullptr
cd_validate validate = nullptr
bool(*) equal (const void *data1, const void *data2) = nullptr
void(*) multiply (void *data, float fac) = nullptr
void(*) initminmax (void *min, void *max) = nullptr
void(*) add (void *data1, const void *data2) = nullptr
void(*) dominmax (const void *data1, void *min, void *max) = nullptr
void(*) copyvalue (const void *source, void *dest, int mixmode, const float mixfactor) = nullptr
bool(*) read (CDataFile *cdf, void *data, int count) = nullptr
bool(*) write (CDataFile *cdf, const void *data, int count) = nullptr
size_t(*) filesize (CDataFile *cdf, const void *data, int count) = nullptr
int(*) layers_max () = nullptr

Detailed Description

Definition at line 115 of file customdata.cc.

Member Data Documentation

◆ add

void(*) blender::LayerTypeInfo::add(void *data1, const void *data2) = nullptr

◆ alignment

int blender::LayerTypeInfo::alignment = 0

◆ construct

void(*) blender::LayerTypeInfo::construct(void *data, int count) = nullptr

Construct and fill a valid value for the type. Necessary for non-trivial types. Memory pointed to by data is expected to be uninitialized.

Definition at line 171 of file customdata.cc.

Referenced by blender::customData_add_layer__internal(), and blender::CustomData_realloc().

◆ copy

◆ copyvalue

void(*) blender::LayerTypeInfo::copyvalue(const void *source, void *dest, int mixmode, const float mixfactor) = nullptr

Definition at line 182 of file customdata.cc.

Referenced by blender::CustomData_data_mix_value().

◆ defaultname

◆ dominmax

void(*) blender::LayerTypeInfo::dominmax(const void *data1, void *min, void *max) = nullptr

◆ equal

bool(*) blender::LayerTypeInfo::equal(const void *data1, const void *data2) = nullptr

Functions necessary for geometry collapse.

Definition at line 177 of file customdata.cc.

Referenced by blender::CustomData_data_equals(), and blender::CustomData_layer_has_math().

◆ filesize

size_t(*) blender::LayerTypeInfo::filesize(CDataFile *cdf, const void *data, int count) = nullptr

A function to determine file size.

Definition at line 191 of file customdata.cc.

Referenced by blender::CustomData_external_write().

◆ free

◆ initminmax

void(*) blender::LayerTypeInfo::initminmax(void *min, void *max) = nullptr

◆ interp

cd_interp blender::LayerTypeInfo::interp = nullptr

a function to interpolate between count source elements of this layer's data and store the result in dest if weights == null they should default to 1

weights gives the weight for each element in sources count gives the number of elements in sources

Note
in some cases dest pointer is in sources so all functions have to take this into account and delay applying changes while reading from sources. See #32395.

Definition at line 157 of file customdata.cc.

Referenced by blender::CustomData_bmesh_interp(), blender::CustomData_bmesh_interp_n(), blender::customdata_data_transfer_interp_generic(), blender::customdata_data_transfer_interp_normal_normals(), blender::CustomData_interp(), and blender::CustomData_layer_has_interp().

◆ layers_max

int(*) blender::LayerTypeInfo::layers_max() = nullptr

A function to determine max allowed number of layers, should be null or return -1 if no limit.

Definition at line 197 of file customdata.cc.

Referenced by blender::CustomData_layertype_layers_max().

◆ multiply

void(*) blender::LayerTypeInfo::multiply(void *data, float fac) = nullptr

◆ read

bool(*) blender::LayerTypeInfo::read(CDataFile *cdf, void *data, int count) = nullptr

A function to read data from a cdf file.

Definition at line 185 of file customdata.cc.

Referenced by blender::CustomData_external_read().

◆ set_default_value

cd_set_default_value blender::LayerTypeInfo::set_default_value = nullptr

Set values to the type's default. If undefined, the default is assumed to be zeroes. Memory pointed to by data is expected to be uninitialized.

Definition at line 166 of file customdata.cc.

Referenced by blender::customData_add_layer__internal(), blender::CustomData_bmesh_copy_map_calc(), blender::CustomData_data_set_default_value(), blender::CustomData_layer_ensure_data_exists(), and blender::CustomData_realloc().

◆ size

◆ structname

const char* blender::LayerTypeInfo::structname = nullptr

name of the struct used, for file writing

Definition at line 120 of file customdata.cc.

Referenced by blender::get_type_file_write_info().

◆ structnum

int blender::LayerTypeInfo::structnum = 0

number of structs per element, for file writing

Definition at line 122 of file customdata.cc.

Referenced by blender::CustomData_verify_versions(), and blender::get_type_file_write_info().

◆ swap

void(*) blender::LayerTypeInfo::swap(void *data, const int *corner_indices) = nullptr

a function to swap the data in corners of the element

Definition at line 160 of file customdata.cc.

Referenced by blender::CustomData_swap_corners().

◆ validate

cd_validate blender::LayerTypeInfo::validate = nullptr

A function used by mesh validating code, must ensures passed item has valid data.

Definition at line 174 of file customdata.cc.

◆ write

bool(*) blender::LayerTypeInfo::write(CDataFile *cdf, const void *data, int count) = nullptr

A function to write data to a cdf file.

Definition at line 188 of file customdata.cc.

Referenced by blender::CustomData_external_write().


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