Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

customdata.c File Reference

#include <math.h>
#include <string.h>
#include <assert.h>
#include "MEM_guardedalloc.h"
#include "DNA_meshdata_types.h"
#include "DNA_ID.h"
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_mempool.h"
#include "BLI_utildefines.h"
#include "BKE_customdata.h"
#include "BKE_customdata_file.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_utildefines.h"
#include "BKE_multires.h"

Go to the source code of this file.

Classes

struct  LayerTypeInfo

Defines

#define CUSTOMDATA_GROW   5
#define SOURCE_BUF_SIZE   100

Typedefs

typedef struct LayerTypeInfo LayerTypeInfo

Functions

static void layerCopy_mdeformvert (const void *source, void *dest, int count)
static void layerFree_mdeformvert (void *data, int count, int size)
static void linklist_free_simple (void *link)
static void layerInterp_mdeformvert (void **sources, float *weights, float *UNUSED(sub_weights), int count, void *dest)
static void layerInterp_msticky (void **sources, float *weights, float *UNUSED(sub_weights), int count, void *dest)
static void layerCopy_tface (const void *source, void *dest, int count)
static void layerInterp_tface (void **sources, float *weights, float *sub_weights, int count, void *dest)
static void layerSwap_tface (void *data, const int *corner_indices)
static void layerDefault_tface (void *data, int count)
static void layerCopy_propFloat (const void *source, void *dest, int count)
static void layerCopy_propInt (const void *source, void *dest, int count)
static void layerCopy_propString (const void *source, void *dest, int count)
static void layerCopy_origspace_face (const void *source, void *dest, int count)
static void layerInterp_origspace_face (void **sources, float *weights, float *sub_weights, int count, void *dest)
static void layerSwap_origspace_face (void *data, const int *corner_indices)
static void layerDefault_origspace_face (void *data, int count)
static void layerSwap_mdisps (void *data, const int *ci)
static void layerInterp_mdisps (void **sources, float *UNUSED(weights), float *sub_weights, int count, void *dest)
static void layerCopy_mdisps (const void *source, void *dest, int count)
static void layerValidate_mdisps (void *data, int sub_elements)
static void layerFree_mdisps (void *data, int count, int UNUSED(size))
static int layerRead_mdisps (CDataFile *cdf, void *data, int count)
static int layerWrite_mdisps (CDataFile *cdf, void *data, int count)
static size_t layerFilesize_mdisps (CDataFile *UNUSED(cdf), void *data, int count)
static void layerCopyValue_mloopcol (void *source, void *dest)
static int layerEqual_mloopcol (void *data1, void *data2)
static void layerMultiply_mloopcol (void *data, float fac)
static void layerAdd_mloopcol (void *data1, void *data2)
static void layerDoMinMax_mloopcol (void *data, void *vmin, void *vmax)
static void layerInitMinMax_mloopcol (void *vmin, void *vmax)
static void layerDefault_mloopcol (void *data, int count)
static void layerInterp_mloopcol (void **sources, float *weights, float *sub_weights, int count, void *dest)
static void layerCopyValue_mloopuv (void *source, void *dest)
static int layerEqual_mloopuv (void *data1, void *data2)
static void layerMultiply_mloopuv (void *data, float fac)
static void layerInitMinMax_mloopuv (void *vmin, void *vmax)
static void layerDoMinMax_mloopuv (void *data, void *vmin, void *vmax)
static void layerAdd_mloopuv (void *data1, void *data2)
static void layerInterp_mloopuv (void **sources, float *weights, float *sub_weights, int count, void *dest)
static void layerInterp_mcol (void **sources, float *weights, float *sub_weights, int count, void *dest)
static void layerSwap_mcol (void *data, const int *corner_indices)
static void layerDefault_mcol (void *data, int count)
static void layerInterp_bweight (void **sources, float *weights, float *UNUSED(sub_weights), int count, void *dest)
static void layerInterp_shapekey (void **sources, float *weights, float *UNUSED(sub_weights), int count, void *dest)
static const LayerTypeInfolayerType_getInfo (int type)
static const char * layerType_getName (int type)
static void customData_update_offsets (CustomData *data)
static CustomDataLayercustomData_add_layer__internal (CustomData *data, int type, int alloctype, void *layerdata, int totelem, const char *name)
void CustomData_update_typemap (CustomData *data)
void CustomData_merge (const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem)
void CustomData_copy (const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem)
static void customData_free_layer__internal (CustomDataLayer *layer, int totelem)
static void CustomData_external_free (CustomData *data)
void CustomData_free (CustomData *data, int totelem)
int CustomData_get_layer_index (const CustomData *data, int type)
int CustomData_get_layer_index_n (const struct CustomData *data, int type, int n)
int CustomData_get_named_layer_index (const CustomData *data, int type, const char *name)
int CustomData_get_active_layer_index (const CustomData *data, int type)
int CustomData_get_render_layer_index (const CustomData *data, int type)
int CustomData_get_clone_layer_index (const CustomData *data, int type)
int CustomData_get_stencil_layer_index (const CustomData *data, int type)
int CustomData_get_active_layer (const CustomData *data, int type)
int CustomData_get_render_layer (const CustomData *data, int type)
int CustomData_get_clone_layer (const CustomData *data, int type)
int CustomData_get_stencil_layer (const CustomData *data, int type)
void CustomData_set_layer_active (CustomData *data, int type, int n)
void CustomData_set_layer_render (CustomData *data, int type, int n)
void CustomData_set_layer_clone (CustomData *data, int type, int n)
void CustomData_set_layer_stencil (CustomData *data, int type, int n)
void CustomData_set_layer_active_index (CustomData *data, int type, int n)
void CustomData_set_layer_render_index (CustomData *data, int type, int n)
void CustomData_set_layer_clone_index (CustomData *data, int type, int n)
void CustomData_set_layer_stencil_index (CustomData *data, int type, int n)
void CustomData_set_layer_flag (struct CustomData *data, int type, int flag)
static int customData_resize (CustomData *data, int amount)
void * CustomData_add_layer (CustomData *data, int type, int alloctype, void *layerdata, int totelem)
void * CustomData_add_layer_named (CustomData *data, int type, int alloctype, void *layerdata, int totelem, const char *name)
int CustomData_free_layer (CustomData *data, int type, int totelem, int index)
int CustomData_free_layer_active (CustomData *data, int type, int totelem)
void CustomData_free_layers (CustomData *data, int type, int totelem)
int CustomData_has_layer (const CustomData *data, int type)
int CustomData_number_of_layers (const CustomData *data, int type)
void * CustomData_duplicate_referenced_layer (struct CustomData *data, const int type, const int totelem)
void * CustomData_duplicate_referenced_layer_named (struct CustomData *data, const int type, const char *name, const int totelem)
int CustomData_is_referenced_layer (struct CustomData *data, int type)
void CustomData_free_temporary (CustomData *data, int totelem)
void CustomData_set_only_copy (const struct CustomData *data, CustomDataMask mask)
void CustomData_copy_elements (int type, void *source, void *dest, int count)
void CustomData_copy_data (const CustomData *source, CustomData *dest, int source_index, int dest_index, int count)
void CustomData_free_elem (CustomData *data, int index, int count)
void CustomData_interp (const CustomData *source, CustomData *dest, int *src_indices, float *weights, float *sub_weights, int count, int dest_index)
void CustomData_swap (struct CustomData *data, int index, const int *corner_indices)
void * CustomData_get (const CustomData *data, int index, int type)
void * CustomData_get_n (const CustomData *data, int type, int index, int n)
void * CustomData_get_layer (const CustomData *data, int type)
void * CustomData_get_layer_n (const CustomData *data, int type, int n)
void * CustomData_get_layer_named (const struct CustomData *data, int type, const char *name)
int CustomData_set_layer_name (const CustomData *data, int type, int n, const char *name)
void * CustomData_set_layer (const CustomData *data, int type, void *ptr)
void * CustomData_set_layer_n (const struct CustomData *data, int type, int n, void *ptr)
void CustomData_set (const CustomData *data, int index, int type, void *source)
void CustomData_em_free_block (CustomData *data, void **block)
static void CustomData_em_alloc_block (CustomData *data, void **block)
void CustomData_em_copy_data (const CustomData *source, CustomData *dest, void *src_block, void **dest_block)
void CustomData_em_validate_data (CustomData *data, void *block, int sub_elements)
void * CustomData_em_get (const CustomData *data, void *block, int type)
void * CustomData_em_get_n (const CustomData *data, void *block, int type, int n)
void CustomData_em_set (CustomData *data, void *block, int type, void *source)
void CustomData_em_set_n (CustomData *data, void *block, int type, int n, void *source)
void CustomData_em_interp (CustomData *data, void **src_blocks, float *weights, float *sub_weights, int count, void *dest_block)
void CustomData_em_set_default (CustomData *data, void **block)
void CustomData_to_em_block (const CustomData *source, CustomData *dest, int src_index, void **dest_block)
void CustomData_from_em_block (const CustomData *source, CustomData *dest, void *src_block, int dest_index)
void CustomData_to_bmeshpoly (CustomData *fdata, CustomData *pdata, CustomData *ldata)
void CustomData_from_bmeshpoly (CustomData *fdata, CustomData *pdata, CustomData *ldata, int total)
void CustomData_bmesh_init_pool (CustomData *data, int allocsize)
void CustomData_bmesh_free_block (CustomData *data, void **block)
static void CustomData_bmesh_alloc_block (CustomData *data, void **block)
void CustomData_bmesh_copy_data (const CustomData *source, CustomData *dest, void *src_block, void **dest_block)
void * CustomData_bmesh_get (const CustomData *data, void *block, int type)
void * CustomData_bmesh_get_n (const CustomData *data, void *block, int type, int n)
void * CustomData_bmesh_get_layer_n (const CustomData *data, void *block, int n)
void CustomData_bmesh_set (const CustomData *data, void *block, int type, void *source)
void CustomData_bmesh_set_n (CustomData *data, void *block, int type, int n, void *source)
void CustomData_bmesh_set_layer_n (CustomData *data, void *block, int n, void *source)
void CustomData_bmesh_interp (CustomData *data, void **src_blocks, float *weights, float *sub_weights, int count, void *dest_block)
void CustomData_bmesh_set_default (CustomData *data, void **block)
void CustomData_to_bmesh_block (const CustomData *source, CustomData *dest, int src_index, void **dest_block)
void CustomData_from_bmesh_block (const CustomData *source, CustomData *dest, void *src_block, int dest_index)
void CustomData_file_write_info (int type, const char **structname, int *structnum)
int CustomData_sizeof (int type)
const char * CustomData_layertype_name (int type)
static int CustomData_is_property_layer (int type)
static int cd_layer_find_dupe (CustomData *data, const char *name, int type, int index)
static int customdata_unique_check (void *arg, const char *name)
void CustomData_set_layer_unique_name (CustomData *data, int index)
void CustomData_validate_layer_name (const CustomData *data, int type, char *name, char *outname)
int CustomData_verify_versions (struct CustomData *data, int index)
static void customdata_external_filename (char filename[FILE_MAX], ID *id, CustomDataExternal *external)
void CustomData_external_reload (CustomData *data, ID *UNUSED(id), CustomDataMask mask, int totelem)
void CustomData_external_read (CustomData *data, ID *id, CustomDataMask mask, int totelem)
void CustomData_external_write (CustomData *data, ID *id, CustomDataMask mask, int totelem, int free)
void CustomData_external_add (CustomData *data, ID *UNUSED(id), int type, int UNUSED(totelem), const char *filename)
void CustomData_external_remove (CustomData *data, ID *id, int type, int totelem)
int CustomData_external_test (CustomData *data, int type)

Variables

static const LayerTypeInfo LAYERTYPEINFO [CD_NUMTYPES]
static const char * LAYERTYPENAMES [CD_NUMTYPES]
const CustomDataMask CD_MASK_BAREMESH
const CustomDataMask CD_MASK_MESH
const CustomDataMask CD_MASK_EDITMESH
const CustomDataMask CD_MASK_DERIVEDMESH
const CustomDataMask CD_MASK_BMESH
const CustomDataMask CD_MASK_FACECORNERS

Detailed Description

Definition in file customdata.c.


Define Documentation

#define CUSTOMDATA_GROW   5
#define SOURCE_BUF_SIZE   100

Definition at line 1844 of file customdata.c.

Referenced by CustomData_bmesh_interp(), CustomData_em_interp(), and CustomData_interp().


Typedef Documentation

typedef struct LayerTypeInfo LayerTypeInfo

Function Documentation

static int cd_layer_find_dupe ( CustomData data,
const char *  name,
int  type,
int  index 
) [static]
void* CustomData_add_layer ( CustomData data,
int  type,
int  alloctype,
void *  layerdata,
int  totelem 
)
static CustomDataLayer * customData_add_layer__internal ( CustomData data,
int  type,
int  alloctype,
void *  layerdata,
int  totelem,
const char *  name 
) [static]
void* CustomData_add_layer_named ( CustomData data,
int  type,
int  alloctype,
void *  layerdata,
int  totelem,
const char *  name 
)
static void CustomData_bmesh_alloc_block ( CustomData data,
void **  block 
) [static]
void CustomData_bmesh_copy_data ( const CustomData source,
CustomData dest,
void *  src_block,
void **  dest_block 
)
void CustomData_bmesh_free_block ( CustomData data,
void **  block 
)
void* CustomData_bmesh_get ( const CustomData data,
void *  block,
int  type 
)
void* CustomData_bmesh_get_layer_n ( const CustomData data,
void *  block,
int  n 
)

Definition at line 2440 of file customdata.c.

References CustomData::layers, NULL, CustomDataLayer::offset, and CustomData::totlayer.

void* CustomData_bmesh_get_n ( const CustomData data,
void *  block,
int  type,
int  n 
)
void CustomData_bmesh_init_pool ( CustomData data,
int  allocsize 
)
void CustomData_bmesh_interp ( CustomData data,
void **  src_blocks,
float *  weights,
float *  sub_weights,
int  count,
void *  dest_block 
)
void CustomData_bmesh_set ( const CustomData data,
void *  block,
int  type,
void *  source 
)
void CustomData_bmesh_set_default ( CustomData data,
void **  block 
)
void CustomData_bmesh_set_layer_n ( CustomData data,
void *  block,
int  n,
void *  source 
)
void CustomData_bmesh_set_n ( CustomData data,
void *  block,
int  type,
int  n,
void *  source 
)
void CustomData_copy ( const struct CustomData source,
struct CustomData dest,
CustomDataMask  mask,
int  alloctype,
int  totelem 
)
void CustomData_copy_data ( const CustomData source,
CustomData dest,
int  source_index,
int  dest_index,
int  count 
)
void CustomData_copy_elements ( int  type,
void *  source,
void *  dest,
int  count 
)

Definition at line 1758 of file customdata.c.

References LayerTypeInfo::copy, layerType_getInfo(), and LayerTypeInfo::size.

void* CustomData_duplicate_referenced_layer ( struct CustomData data,
const int  type,
const int  totelem 
)
void* CustomData_duplicate_referenced_layer_named ( struct CustomData data,
const int  type,
const char *  name,
const int  totelem 
)
static void CustomData_em_alloc_block ( CustomData data,
void **  block 
) [static]
void CustomData_em_copy_data ( const CustomData source,
CustomData dest,
void *  src_block,
void **  dest_block 
)
void CustomData_em_free_block ( CustomData data,
void **  block 
)
void* CustomData_em_get ( const CustomData data,
void *  block,
int  type 
)
void* CustomData_em_get_n ( const CustomData data,
void *  block,
int  type,
int  n 
)
void CustomData_em_interp ( CustomData data,
void **  src_blocks,
float *  weights,
float *  sub_weights,
int  count,
void *  dest_block 
)
void CustomData_em_set ( CustomData data,
void *  block,
int  type,
void *  source 
)
void CustomData_em_set_default ( CustomData data,
void **  block 
)
void CustomData_em_set_n ( CustomData data,
void *  block,
int  type,
int  n,
void *  source 
)
void CustomData_em_validate_data ( CustomData data,
void *  block,
int  sub_elements 
)
void CustomData_external_add ( CustomData data,
ID UNUSEDid,
int  type,
int   UNUSEDtotelem,
const char *  filename 
)
static void customdata_external_filename ( char  filename[FILE_MAX],
ID id,
CustomDataExternal external 
) [static]
static void CustomData_external_free ( CustomData data) [static]

Definition at line 1212 of file customdata.c.

References CustomData::external, MEM_freeN(), and NULL.

Referenced by CustomData_external_remove(), and CustomData_free().

void CustomData_external_read ( CustomData data,
ID id,
CustomDataMask  mask,
int  totelem 
)
void CustomData_external_reload ( CustomData data,
ID UNUSEDid,
CustomDataMask  mask,
int  totelem 
)
void CustomData_external_remove ( CustomData data,
ID id,
int  type,
int  totelem 
)
int CustomData_external_test ( CustomData data,
int  type 
)
void CustomData_external_write ( CustomData data,
ID id,
CustomDataMask  mask,
int  totelem,
int  free 
)
void CustomData_file_write_info ( int  type,
const char **  structname,
int *  structnum 
)

Definition at line 2626 of file customdata.c.

References layerType_getInfo(), LayerTypeInfo::structname, and LayerTypeInfo::structnum.

Referenced by write_customdata().

void CustomData_free ( CustomData data,
int  totelem 
)
void CustomData_free_elem ( CustomData data,
int  index,
int  count 
)
int CustomData_free_layer ( CustomData data,
int  type,
int  totelem,
int  index 
)
static void customData_free_layer__internal ( CustomDataLayer layer,
int  totelem 
) [static]
int CustomData_free_layer_active ( CustomData data,
int  type,
int  totelem 
)
void CustomData_free_layers ( CustomData data,
int  type,
int  totelem 
)
void CustomData_free_temporary ( CustomData data,
int  totelem 
)
void CustomData_from_bmesh_block ( const CustomData source,
CustomData dest,
void *  src_block,
int  dest_index 
)
void CustomData_from_bmeshpoly ( CustomData fdata,
CustomData pdata,
CustomData ldata,
int  total 
)
void CustomData_from_em_block ( const CustomData source,
CustomData dest,
void *  src_block,
int  dest_index 
)
void* CustomData_get ( const CustomData data,
int  index,
int  type 
)
int CustomData_get_active_layer ( const CustomData data,
int  type 
)
int CustomData_get_active_layer_index ( const CustomData data,
int  type 
)
int CustomData_get_clone_layer ( const CustomData data,
int  type 
)
int CustomData_get_clone_layer_index ( const CustomData data,
int  type 
)
void* CustomData_get_layer ( const CustomData data,
int  type 
)
int CustomData_get_layer_index ( const CustomData data,
int  type 
)

Definition at line 1251 of file customdata.c.

References i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.

int CustomData_get_layer_index_n ( const struct CustomData data,
int  type,
int  n 
)
void* CustomData_get_layer_n ( const CustomData data,
int  type,
int  n 
)
void* CustomData_get_layer_named ( const struct CustomData data,
int  type,
const char *  name 
)
void* CustomData_get_n ( const CustomData data,
int  type,
int  index,
int  n 
)
int CustomData_get_named_layer_index ( const CustomData data,
int  type,
const char *  name 
)
int CustomData_get_render_layer ( const CustomData data,
int  type 
)
int CustomData_get_render_layer_index ( const CustomData data,
int  type 
)
int CustomData_get_stencil_layer ( const CustomData data,
int  type 
)
int CustomData_get_stencil_layer_index ( const CustomData data,
int  type 
)
int CustomData_has_layer ( const CustomData data,
int  type 
)

Definition at line 1628 of file customdata.c.

References CustomData_get_layer_index().

void CustomData_interp ( const CustomData source,
CustomData dest,
int *  src_indices,
float *  weights,
float *  sub_weights,
int  count,
int  dest_index 
)
static int CustomData_is_property_layer ( int  type) [static]

Definition at line 2646 of file customdata.c.

References CD_PROP_FLT, CD_PROP_INT, and CD_PROP_STR.

Referenced by cd_layer_find_dupe().

int CustomData_is_referenced_layer ( struct CustomData data,
int  type 
)
const char* CustomData_layertype_name ( int  type)

Definition at line 2641 of file customdata.c.

References layerType_getName().

void CustomData_merge ( const struct CustomData source,
struct CustomData dest,
CustomDataMask  mask,
int  alloctype,
int  totelem 
)
int CustomData_number_of_layers ( const CustomData data,
int  type 
)

Definition at line 1633 of file customdata.c.

References i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.

static int customData_resize ( CustomData data,
int  amount 
) [static]
void CustomData_set ( const CustomData data,
int  index,
int  type,
void *  source 
)
void* CustomData_set_layer ( const CustomData data,
int  type,
void *  ptr 
)
void CustomData_set_layer_active ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_active_index ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_clone ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_clone_index ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_flag ( struct CustomData data,
int  type,
int  flag 
)
void* CustomData_set_layer_n ( const struct CustomData data,
int  type,
int  n,
void *  ptr 
)
int CustomData_set_layer_name ( const CustomData data,
int  type,
int  n,
const char *  name 
)
void CustomData_set_layer_render ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_render_index ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_stencil ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_stencil_index ( CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_unique_name ( CustomData data,
int  index 
)
void CustomData_set_only_copy ( const struct CustomData data,
CustomDataMask  mask 
)
int CustomData_sizeof ( int  type)

Definition at line 2634 of file customdata.c.

References layerType_getInfo(), and LayerTypeInfo::size.

Referenced by emDM_getFaceDataArray(), and sort_faces_exec().

void CustomData_swap ( struct CustomData data,
int  index,
const int *  corner_indices 
)
void CustomData_to_bmesh_block ( const CustomData source,
CustomData dest,
int  src_index,
void **  dest_block 
)
void CustomData_to_bmeshpoly ( CustomData fdata,
CustomData pdata,
CustomData ldata 
)
void CustomData_to_em_block ( const CustomData source,
CustomData dest,
int  src_index,
void **  dest_block 
)
static int customdata_unique_check ( void *  arg,
const char *  name 
) [static]

Definition at line 2677 of file customdata.c.

References cd_layer_find_dupe(), and data.

Referenced by CustomData_set_layer_unique_name().

static void customData_update_offsets ( CustomData data) [static]
void CustomData_update_typemap ( CustomData data)
void CustomData_validate_layer_name ( const CustomData data,
int  type,
char *  name,
char *  outname 
)
int CustomData_verify_versions ( struct CustomData data,
int  index 
)
static void layerAdd_mloopcol ( void *  data1,
void *  data2 
) [static]

Definition at line 681 of file customdata.c.

References MLoopCol::a, MLoopCol::b, MLoopCol::g, and MLoopCol::r.

static void layerAdd_mloopuv ( void *  data1,
void *  data2 
) [static]

Definition at line 812 of file customdata.c.

References add_v2_v2(), and MLoopUV::uv.

static void layerCopy_mdeformvert ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 125 of file customdata.c.

References MDeformVert::dw, i, MEM_callocN(), NULL, size(), and MDeformVert::totweight.

static void layerCopy_mdisps ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 556 of file customdata.c.

References simple_enum_gen::d, MDisps::disps, i, MEM_dupallocN(), NULL, and MDisps::totdisp.

static void layerCopy_origspace_face ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 348 of file customdata.c.

References i.

static void layerCopy_propFloat ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 330 of file customdata.c.

static void layerCopy_propInt ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 336 of file customdata.c.

static void layerCopy_propString ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 342 of file customdata.c.

static void layerCopy_tface ( const void *  source,
void *  dest,
int  count 
) [static]

Definition at line 245 of file customdata.c.

References i.

static void layerCopyValue_mloopcol ( void *  source,
void *  dest 
) [static]

Definition at line 648 of file customdata.c.

References MLoopCol::a, MLoopCol::b, MLoopCol::g, and MLoopCol::r.

static void layerCopyValue_mloopuv ( void *  source,
void *  dest 
) [static]

Definition at line 777 of file customdata.c.

References copy_v2_v2(), and MLoopUV::uv.

static void layerDefault_mcol ( void *  data,
int  count 
) [static]

Definition at line 914 of file customdata.c.

References i.

static void layerDefault_mloopcol ( void *  data,
int  count 
) [static]

Definition at line 722 of file customdata.c.

References i.

static void layerDefault_origspace_face ( void *  data,
int  count 
) [static]

Definition at line 402 of file customdata.c.

References i.

static void layerDefault_tface ( void *  data,
int  count 
) [static]

Definition at line 319 of file customdata.c.

References i, NULL, TF_CONVERTED, and TF_DYNAMIC.

static void layerDoMinMax_mloopcol ( void *  data,
void *  vmin,
void *  vmax 
) [static]

Definition at line 691 of file customdata.c.

References MLoopCol::a, MLoopCol::b, data, MLoopCol::g, max, min, and MLoopCol::r.

static void layerDoMinMax_mloopuv ( void *  data,
void *  vmin,
void *  vmax 
) [static]

Definition at line 805 of file customdata.c.

References data, DO_MINMAX2, max, min, and MLoopUV::uv.

static int layerEqual_mloopcol ( void *  data1,
void *  data2 
) [static]

Definition at line 658 of file customdata.c.

References MLoopCol::a, MLoopCol::b, MLoopCol::g, g, and MLoopCol::r.

static int layerEqual_mloopuv ( void *  data1,
void *  data2 
) [static]

Definition at line 784 of file customdata.c.

References len_squared_v2v2(), and MLoopUV::uv.

static size_t layerFilesize_mdisps ( CDataFile UNUSEDcdf,
void *  data,
int  count 
) [static]

Definition at line 635 of file customdata.c.

References simple_enum_gen::d, data, i, and size().

static void layerFree_mdeformvert ( void *  data,
int  count,
int  size 
) [static]

Definition at line 147 of file customdata.c.

References MDeformVert::dw, i, MEM_freeN(), NULL, size(), and MDeformVert::totweight.

static void layerFree_mdisps ( void *  data,
int  count,
int   UNUSEDsize 
) [static]

Definition at line 589 of file customdata.c.

References simple_enum_gen::d, data, MDisps::disps, i, MEM_freeN(), NULL, and MDisps::totdisp.

static void layerInitMinMax_mloopcol ( void *  vmin,
void *  vmax 
) [static]

Definition at line 707 of file customdata.c.

References MLoopCol::a, MLoopCol::b, MLoopCol::g, max, min, and MLoopCol::r.

static void layerInitMinMax_mloopuv ( void *  vmin,
void *  vmax 
) [static]

Definition at line 798 of file customdata.c.

References INIT_MINMAX2, max, min, and MLoopUV::uv.

static void layerInterp_bweight ( void **  sources,
float *  weights,
float *  UNUSEDsub_weights,
int  count,
void *  dest 
) [static]

Definition at line 925 of file customdata.c.

References i.

static void layerInterp_mcol ( void **  sources,
float *  weights,
float *  sub_weights,
int  count,
void *  dest 
) [static]

Definition at line 846 of file customdata.c.

References MCol::a, MCol::b, CLAMP(), MCol::g, g, i, MCol::r, and simple_enum_gen::w.

static void layerInterp_mdeformvert ( void **  sources,
float *  weights,
float *  UNUSEDsub_weights,
int  count,
void *  dest 
) [static]
static void layerInterp_mdisps ( void **  sources,
float *  UNUSEDweights,
float *  sub_weights,
int  count,
void *  dest 
) [static]
static void layerInterp_mloopcol ( void **  sources,
float *  weights,
float *  sub_weights,
int  count,
void *  dest 
) [static]

Definition at line 732 of file customdata.c.

References MLoopCol::a, MLoopCol::b, CLAMP(), MLoopCol::g, g, i, and MLoopCol::r.

static void layerInterp_mloopuv ( void **  sources,
float *  weights,
float *  sub_weights,
int  count,
void *  dest 
) [static]

Definition at line 819 of file customdata.c.

References i, madd_v2_v2fl(), MLoopUV::uv, and zero_v2().

static void layerInterp_msticky ( void **  sources,
float *  weights,
float *  UNUSEDsub_weights,
int  count,
void *  dest 
) [static]

Definition at line 225 of file customdata.c.

References co, MSticky::co, copy_v2_v2(), i, madd_v2_v2fl(), and simple_enum_gen::w.

static void layerInterp_origspace_face ( void **  sources,
float *  weights,
float *  sub_weights,
int  count,
void *  dest 
) [static]

Definition at line 358 of file customdata.c.

References i, madd_v2_v2fl(), and OrigSpaceFace::uv.

static void layerInterp_shapekey ( void **  sources,
float *  weights,
float *  UNUSEDsub_weights,
int  count,
void *  dest 
) [static]

Definition at line 948 of file customdata.c.

References add_v3_v3(), co, i, madd_v3_v3fl(), and zero_v3().

static void layerInterp_tface ( void **  sources,
float *  weights,
float *  sub_weights,
int  count,
void *  dest 
) [static]

Definition at line 255 of file customdata.c.

References i, madd_v2_v2fl(), and MTFace::uv.

static void layerMultiply_mloopcol ( void *  data,
float  fac 
) [static]

Definition at line 671 of file customdata.c.

References MLoopCol::a, MLoopCol::b, data, MLoopCol::g, and MLoopCol::r.

static void layerMultiply_mloopuv ( void *  data,
float  fac 
) [static]

Definition at line 791 of file customdata.c.

References data, mul_v2_fl(), and MLoopUV::uv.

static int layerRead_mdisps ( CDataFile cdf,
void *  data,
int  count 
) [static]

Definition at line 602 of file customdata.c.

References cdf_read_data(), simple_enum_gen::d, data, MDisps::disps, i, and MEM_callocN().

static void layerSwap_mcol ( void *  data,
const int *  corner_indices 
) [static]

Definition at line 902 of file customdata.c.

References data.

static void layerSwap_mdisps ( void *  data,
const int *  ci 
) [static]
static void layerSwap_origspace_face ( void *  data,
const int *  corner_indices 
) [static]

Definition at line 390 of file customdata.c.

References copy_v2_v2(), data, and OrigSpaceFace::uv.

static void layerSwap_tface ( void *  data,
const int *  corner_indices 
) [static]
static const LayerTypeInfo* layerType_getInfo ( int  type) [static]
static const char* layerType_getName ( int  type) [static]
static void layerValidate_mdisps ( void *  data,
int  sub_elements 
) [static]
static int layerWrite_mdisps ( CDataFile cdf,
void *  data,
int  count 
) [static]

Definition at line 620 of file customdata.c.

References cdf_write_data(), simple_enum_gen::d, data, and i.

static void linklist_free_simple ( void *  link) [static]

Definition at line 162 of file customdata.c.

References MEM_freeN().

Referenced by layerInterp_mdeformvert().


Variable Documentation

const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] [static]

Definition at line 971 of file customdata.c.

const char* LAYERTYPENAMES[CD_NUMTYPES] [static]
Initial value:
 {
     "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace",
     "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
     "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",
     "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps",
    "CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast"






 
}

Definition at line 1065 of file customdata.c.