Blender V2.61 - r43446
|
#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 LayerTypeInfo * | layerType_getInfo (int type) |
static const char * | layerType_getName (int type) |
static void | customData_update_offsets (CustomData *data) |
static CustomDataLayer * | customData_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 |
Definition in file customdata.c.
#define CUSTOMDATA_GROW 5 |
Definition at line 61 of file customdata.c.
Referenced by customData_add_layer__internal(), CustomData_free_layer(), and CustomData_free_temporary().
#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 struct LayerTypeInfo LayerTypeInfo |
static int cd_layer_find_dupe | ( | CustomData * | data, |
const char * | name, | ||
int | type, | ||
int | index | ||
) | [static] |
Definition at line 2653 of file customdata.c.
References CustomData_is_property_layer(), i, CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by customdata_unique_check().
void* CustomData_add_layer | ( | CustomData * | data, |
int | type, | ||
int | alloctype, | ||
void * | layerdata, | ||
int | totelem | ||
) |
Definition at line 1545 of file customdata.c.
References customData_add_layer__internal(), CustomData_update_typemap(), CustomDataLayer::data, LayerTypeInfo::defaultname, layerType_getInfo(), and NULL.
Referenced by add_tface_color_layer(), add_weight_mcol_dm(), applyModifier(), BKE_mesh_calc_edges(), CDDM_calc_edges(), CDDM_calc_normals(), CDDM_copy(), CDDM_from_template(), CDDM_new(), CustomData_from_bmeshpoly(), CustomData_to_bmeshpoly(), customdata_version_242(), DM_add_edge_layer(), DM_add_face_layer(), DM_add_vert_layer(), dm_calc_normal(), dm_getEdgeArray(), dm_getFaceArray(), dm_getVertArray(), DM_to_mesh(), dynamicPaint_Modifier_apply(), ED_object_modifier_convert(), ED_vgroup_data_create(), join_mesh_exec(), load_editMesh(), make_edges(), make_vertexcol(), mball_to_mesh(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), multires_load_old(), multires_subdivide(), multiresModifier_disp_run(), nurbs_to_mesh(), RE_make_sticky(), and texture_paint_toggle_exec().
static CustomDataLayer * customData_add_layer__internal | ( | CustomData * | data, |
int | type, | ||
int | alloctype, | ||
void * | layerdata, | ||
int | totelem, | ||
const char * | name | ||
) | [static] |
Definition at line 1471 of file customdata.c.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, BLI_strncpy(), CD_ASSIGN, CD_DEFAULT, CD_DUPLICATE, CD_FLAG_NOFREE, CD_REFERENCE, LayerTypeInfo::copy, CustomData_get_layer_index(), CUSTOMDATA_GROW, CustomData_has_layer(), customData_resize(), CustomData_set_layer_unique_name(), customData_update_offsets(), CustomDataLayer::data, LayerTypeInfo::defaultname, CustomDataLayer::flag, CustomData::layers, layerType_getInfo(), layerType_getName(), CustomData::maxlayer, MEM_callocN(), MEM_freeN(), CustomDataLayer::name, NULL, LayerTypeInfo::set_default, LayerTypeInfo::size, size(), totelem, CustomData::totlayer, and CustomDataLayer::type.
Referenced by CustomData_add_layer(), CustomData_add_layer_named(), and CustomData_merge().
void* CustomData_add_layer_named | ( | CustomData * | data, |
int | type, | ||
int | alloctype, | ||
void * | layerdata, | ||
int | totelem, | ||
const char * | name | ||
) |
Definition at line 1562 of file customdata.c.
References customData_add_layer__internal(), CustomData_update_typemap(), CustomDataLayer::data, and NULL.
Referenced by BKE_mesh_ensure_navmesh(), createRepresentation(), dynamicPaint_Modifier_apply(), ED_mesh_color_add(), ED_mesh_uv_texture_add(), and EM_add_data_layer().
static void CustomData_bmesh_alloc_block | ( | CustomData * | data, |
void ** | block | ||
) | [static] |
Definition at line 2359 of file customdata.c.
References BLI_mempool_calloc(), CustomData_bmesh_free_block(), NULL, CustomData::pool, and CustomData::totsize.
Referenced by CustomData_bmesh_copy_data(), CustomData_bmesh_set_default(), and CustomData_to_bmesh_block().
void CustomData_bmesh_copy_data | ( | const CustomData * | source, |
CustomData * | dest, | ||
void * | src_block, | ||
void ** | dest_block | ||
) |
Definition at line 2371 of file customdata.c.
References LayerTypeInfo::copy, CustomData_bmesh_alloc_block(), CustomData::layers, layerType_getInfo(), CustomDataLayer::name, CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_bmesh_free_block | ( | CustomData * | data, |
void ** | block | ||
) |
Definition at line 2338 of file customdata.c.
References BLI_mempool_free(), CD_FLAG_NOFREE, CustomDataLayer::flag, LayerTypeInfo::free, i, CustomData::layers, layerType_getInfo(), NULL, CustomDataLayer::offset, CustomData::pool, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_free_edge(), BME_free_loop(), BME_free_mesh(), BME_free_poly(), BME_free_vert(), and CustomData_bmesh_alloc_block().
void* CustomData_bmesh_get | ( | const CustomData * | data, |
void * | block, | ||
int | type | ||
) |
Definition at line 2417 of file customdata.c.
References CustomData_get_active_layer_index(), CustomData::layers, NULL, and CustomDataLayer::offset.
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 | ||
) |
Definition at line 2428 of file customdata.c.
References CustomData_get_layer_index(), CustomData::layers, NULL, and CustomDataLayer::offset.
void CustomData_bmesh_init_pool | ( | CustomData * | data, |
int | allocsize | ||
) |
Definition at line 2333 of file customdata.c.
References BLI_mempool_create(), FALSE, CustomData::pool, CustomData::totlayer, and CustomData::totsize.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
void CustomData_bmesh_interp | ( | CustomData * | data, |
void ** | src_blocks, | ||
float * | weights, | ||
float * | sub_weights, | ||
int | count, | ||
void * | dest_block | ||
) |
Definition at line 2487 of file customdata.c.
References i, LayerTypeInfo::interp, CustomData::layers, layerType_getInfo(), MEM_callocN(), MEM_freeN(), CustomDataLayer::offset, SOURCE_BUF_SIZE, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_collapse_vert(), and BME_data_facevert_edgesplit().
void CustomData_bmesh_set | ( | const CustomData * | data, |
void * | block, | ||
int | type, | ||
void * | source | ||
) |
Definition at line 2448 of file customdata.c.
References LayerTypeInfo::copy, CustomData_bmesh_get(), layerType_getInfo(), and LayerTypeInfo::size.
void CustomData_bmesh_set_default | ( | CustomData * | data, |
void ** | block | ||
) |
Definition at line 2517 of file customdata.c.
References CustomData_bmesh_alloc_block(), i, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::set_default, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_addedgelist(), BME_addpolylist(), BME_addvertlist(), and BME_create_loop().
void CustomData_bmesh_set_layer_n | ( | CustomData * | data, |
void * | block, | ||
int | n, | ||
void * | source | ||
) |
Definition at line 2474 of file customdata.c.
References LayerTypeInfo::copy, CustomData_bmesh_get_layer_n(), CustomData::layers, layerType_getInfo(), LayerTypeInfo::size, and CustomDataLayer::type.
void CustomData_bmesh_set_n | ( | CustomData * | data, |
void * | block, | ||
int | type, | ||
int | n, | ||
void * | source | ||
) |
Definition at line 2461 of file customdata.c.
References LayerTypeInfo::copy, CustomData_bmesh_get_n(), layerType_getInfo(), and LayerTypeInfo::size.
void CustomData_copy | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
CustomDataMask | mask, | ||
int | alloctype, | ||
int | totelem | ||
) |
Definition at line 1186 of file customdata.c.
References CustomData_merge(), CustomData::external, and MEM_dupallocN().
Referenced by BME_bmesh_to_editmesh(), BME_derivedmesh_to_bmesh(), BME_editmesh_to_bmesh(), copy_mesh(), DM_from_template(), DM_to_mesh(), editMesh_to_undoMesh(), load_editMesh(), make_editMesh(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), mesh_separate_selected(), and undoMesh_to_editMesh().
void CustomData_copy_data | ( | const CustomData * | source, |
CustomData * | dest, | ||
int | source_index, | ||
int | dest_index, | ||
int | count | ||
) |
Definition at line 1768 of file customdata.c.
References LayerTypeInfo::copy, CustomDataLayer::data, CustomData::layers, layerType_getInfo(), layerType_getName(), LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
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 | ||
) |
Definition at line 1644 of file customdata.c.
References CD_FLAG_NOFREE, LayerTypeInfo::copy, CustomData_get_active_layer_index(), CustomDataLayer::data, CustomDataLayer::flag, CustomData::layers, layerType_getInfo(), MEM_dupallocN(), MEM_mallocN(), NULL, LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by applyModifier(), CDDM_apply_vert_coords(), CDDM_apply_vert_normals(), and CDDM_calc_normals().
void* CustomData_duplicate_referenced_layer_named | ( | struct CustomData * | data, |
const int | type, | ||
const char * | name, | ||
const int | totelem | ||
) |
Definition at line 1676 of file customdata.c.
References CD_FLAG_NOFREE, LayerTypeInfo::copy, CustomData_get_named_layer_index(), CustomDataLayer::data, CustomDataLayer::flag, CustomData::layers, layerType_getInfo(), MEM_dupallocN(), MEM_mallocN(), NULL, LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by uvprojectModifier_do().
static void CustomData_em_alloc_block | ( | CustomData * | data, |
void ** | block | ||
) | [static] |
Definition at line 2048 of file customdata.c.
References CustomData_em_free_block(), MEM_callocN(), NULL, and CustomData::totsize.
Referenced by CustomData_em_copy_data(), CustomData_em_set_default(), and CustomData_to_em_block().
void CustomData_em_copy_data | ( | const CustomData * | source, |
CustomData * | dest, | ||
void * | src_block, | ||
void ** | dest_block | ||
) |
Definition at line 2061 of file customdata.c.
References LayerTypeInfo::copy, CustomData_em_alloc_block(), CustomData::layers, layerType_getInfo(), CustomDataLayer::name, CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_em_free_block | ( | CustomData * | data, |
void ** | block | ||
) |
Definition at line 2026 of file customdata.c.
References CD_FLAG_NOFREE, CustomDataLayer::flag, LayerTypeInfo::free, i, CustomData::layers, layerType_getInfo(), MEM_freeN(), NULL, CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
Referenced by CustomData_em_alloc_block(), free_editface(), free_editvert(), and update_data_blocks().
void* CustomData_em_get | ( | const CustomData * | data, |
void * | block, | ||
int | type | ||
) |
Definition at line 2118 of file customdata.c.
References CustomData_get_active_layer_index(), CustomData::layers, NULL, and CustomDataLayer::offset.
void* CustomData_em_get_n | ( | const CustomData * | data, |
void * | block, | ||
int | type, | ||
int | n | ||
) |
Definition at line 2129 of file customdata.c.
References CustomData_get_layer_index_n(), CustomData::layers, NULL, and CustomDataLayer::offset.
void CustomData_em_interp | ( | CustomData * | data, |
void ** | src_blocks, | ||
float * | weights, | ||
float * | sub_weights, | ||
int | count, | ||
void * | dest_block | ||
) |
Definition at line 2166 of file customdata.c.
References i, LayerTypeInfo::interp, CustomData::layers, layerType_getInfo(), MEM_callocN(), MEM_freeN(), CustomDataLayer::offset, SOURCE_BUF_SIZE, CustomData::totlayer, and CustomDataLayer::type.
Referenced by EM_data_interp_from_faces(), EM_data_interp_from_verts(), and facecopy().
void CustomData_em_set | ( | CustomData * | data, |
void * | block, | ||
int | type, | ||
void * | source | ||
) |
Definition at line 2140 of file customdata.c.
References LayerTypeInfo::copy, CustomData_em_get(), layerType_getInfo(), and LayerTypeInfo::size.
void CustomData_em_set_default | ( | CustomData * | data, |
void ** | block | ||
) |
Definition at line 2197 of file customdata.c.
References CustomData_em_alloc_block(), i, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::set_default, CustomData::totlayer, and CustomDataLayer::type.
Referenced by addfacelist(), addvertlist(), and update_data_blocks().
void CustomData_em_set_n | ( | CustomData * | data, |
void * | block, | ||
int | type, | ||
int | n, | ||
void * | source | ||
) |
Definition at line 2153 of file customdata.c.
References LayerTypeInfo::copy, CustomData_em_get_n(), layerType_getInfo(), and LayerTypeInfo::size.
Referenced by copy_editface_active_customdata().
void CustomData_em_validate_data | ( | CustomData * | data, |
void * | block, | ||
int | sub_elements | ||
) |
Definition at line 2106 of file customdata.c.
References i, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, CustomData::totlayer, CustomDataLayer::type, and LayerTypeInfo::validate.
Referenced by addfacelist(), and facecopy().
void CustomData_external_add | ( | CustomData * | data, |
ID * | UNUSEDid, | ||
int | type, | ||
int | UNUSEDtotelem, | ||
const char * | filename | ||
) |
Definition at line 2922 of file customdata.c.
References BLI_strncpy(), CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CustomData_get_active_layer_index(), CustomData::external, CustomDataExternal::filename, CustomDataLayer::flag, CustomData::layers, and MEM_callocN().
static void customdata_external_filename | ( | char | filename[FILE_MAX], |
ID * | id, | ||
CustomDataExternal * | external | ||
) | [static] |
Definition at line 2746 of file customdata.c.
References BLI_path_abs(), BLI_strncpy(), CustomDataExternal::filename, G, and ID_BLEND_PATH.
Referenced by CustomData_external_read(), CustomData_external_remove(), and CustomData_external_write().
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 | ||
) |
Definition at line 2771 of file customdata.c.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, cdf_create(), cdf_free(), cdf_layer_find(), cdf_read_close(), cdf_read_layer(), cdf_read_open(), CDF_TYPE_MESH, customdata_external_filename(), CustomDataLayer::data, CustomData::external, FILE_MAX, CustomDataLayer::flag, i, CustomData::layers, layerType_getInfo(), layerType_getName(), CustomDataLayer::name, LayerTypeInfo::read, CustomData::totlayer, CustomDataLayer::type, and update().
Referenced by CustomData_external_remove(), CustomData_external_write(), multires_apply_smat(), multires_del_higher(), multires_dm_create_from_derived(), multires_topology_changed(), multiresModifier_del_levels(), and multiresModifier_update().
void CustomData_external_reload | ( | CustomData * | data, |
ID * | UNUSEDid, | ||
CustomDataMask | mask, | ||
int | totelem | ||
) |
Definition at line 2752 of file customdata.c.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, CustomDataLayer::data, CustomDataLayer::flag, LayerTypeInfo::free, i, CustomData::layers, layerType_getInfo(), LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_external_remove | ( | CustomData * | data, |
ID * | id, | ||
int | type, | ||
int | totelem | ||
) |
Definition at line 2945 of file customdata.c.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, cdf_remove(), customdata_external_filename(), CustomData_external_free(), CustomData_external_read(), CustomData_get_active_layer_index(), CustomData::external, CustomDataLayer::flag, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by modifier_apply_obdata(), multires_del_higher(), multires_external_pack_exec(), multires_sync_levels(), and object_modifier_remove().
int CustomData_external_test | ( | CustomData * | data, |
int | type | ||
) |
Definition at line 2981 of file customdata.c.
References CD_FLAG_EXTERNAL, CustomData_get_active_layer_index(), CustomDataLayer::flag, and CustomData::layers.
Referenced by multires_external_pack_exec(), multires_external_save_exec(), and multires_external_save_invoke().
void CustomData_external_write | ( | CustomData * | data, |
ID * | id, | ||
CustomDataMask | mask, | ||
int | totelem, | ||
int | free | ||
) |
Definition at line 2830 of file customdata.c.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, cdf_create(), cdf_free(), cdf_layer_add(), cdf_layer_find(), CDF_TYPE_MESH, cdf_write_close(), cdf_write_layer(), cdf_write_open(), customdata_external_filename(), CustomData_external_read(), CustomDataLayer::data, CustomData::external, FILE_MAX, LayerTypeInfo::filesize, CustomDataLayer::flag, LayerTypeInfo::free, i, CustomData::layers, layerType_getInfo(), CustomDataLayer::name, LayerTypeInfo::size, CustomData::totlayer, CustomDataLayer::type, update(), and LayerTypeInfo::write.
Referenced by multires_external_save_exec(), and write_customdata().
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 | ||
) |
Definition at line 1220 of file customdata.c.
References CustomData_external_free(), customData_free_layer__internal(), i, CustomData::layers, MEM_freeN(), and CustomData::totlayer.
Referenced by BKE_mesh_calc_edges(), BME_free_mesh(), CDDM_calc_edges(), direct_link_mesh(), DM_release(), DM_to_mesh(), free_editMesh(), free_mesh(), free_undoMesh(), join_mesh_exec(), load_editMesh(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), multires_free(), and undoMesh_to_editMesh().
void CustomData_free_elem | ( | CustomData * | data, |
int | index, | ||
int | count | ||
) |
Definition at line 1825 of file customdata.c.
References CD_FLAG_NOFREE, CustomDataLayer::data, CustomDataLayer::flag, LayerTypeInfo::free, i, CustomData::layers, layerType_getInfo(), LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
Referenced by CDDM_lower_num_edges(), CDDM_lower_num_faces(), CDDM_lower_num_verts(), DM_free_edge_data(), DM_free_face_data(), DM_free_vert_data(), mesh_strip_loose_edges(), and mesh_strip_loose_faces().
int CustomData_free_layer | ( | CustomData * | data, |
int | type, | ||
int | totelem, | ||
int | index | ||
) |
Definition at line 1578 of file customdata.c.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, customData_free_layer__internal(), CustomData_get_layer_index(), CUSTOMDATA_GROW, customData_resize(), customData_update_offsets(), CustomData_update_typemap(), i, if(), CustomData::layers, CustomData::maxlayer, CustomData::totlayer, and CustomDataLayer::type.
Referenced by CustomData_free_layer_active(), and mesh_validate_customdata().
static void customData_free_layer__internal | ( | CustomDataLayer * | layer, |
int | totelem | ||
) | [static] |
Definition at line 1197 of file customdata.c.
References CD_FLAG_NOFREE, CustomDataLayer::data, CustomDataLayer::flag, LayerTypeInfo::free, layerType_getInfo(), MEM_freeN(), LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by CustomData_free(), CustomData_free_layer(), and CustomData_free_temporary().
int CustomData_free_layer_active | ( | CustomData * | data, |
int | type, | ||
int | totelem | ||
) |
Definition at line 1613 of file customdata.c.
References CustomData_free_layer(), and CustomData_get_active_layer_index().
Referenced by CustomData_free_layers(), delete_customdata_layer(), EM_free_data_layer(), modifier_apply_obdata(), multires_del_higher(), multires_sync_levels(), object_modifier_remove(), RE_make_sticky(), sticky_remove_exec(), vgroup_delete_all(), and vgroup_delete_edit_mode().
void CustomData_free_layers | ( | CustomData * | data, |
int | type, | ||
int | totelem | ||
) |
Definition at line 1622 of file customdata.c.
References CustomData_free_layer_active(), and CustomData_has_layer().
Referenced by multires_load_old(), navmesh_clear_exec(), and navmesh_reset_exec().
void CustomData_free_temporary | ( | CustomData * | data, |
int | totelem | ||
) |
Definition at line 1723 of file customdata.c.
References CD_FLAG_TEMPORARY, customData_free_layer__internal(), CUSTOMDATA_GROW, customData_resize(), customData_update_offsets(), CustomDataLayer::flag, i, CustomData::layers, CustomData::maxlayer, and CustomData::totlayer.
Referenced by DM_release().
void CustomData_from_bmesh_block | ( | const CustomData * | source, |
CustomData * | dest, | ||
void * | src_block, | ||
int | dest_index | ||
) |
Definition at line 2582 of file customdata.c.
References LayerTypeInfo::copy, CustomDataLayer::data, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_from_bmeshpoly | ( | CustomData * | fdata, |
CustomData * | pdata, | ||
CustomData * | ldata, | ||
int | total | ||
) |
Definition at line 2319 of file customdata.c.
References CD_CALLOC, CD_MCOL, CD_MLOOPCOL, CD_MTEXPOLY, CD_MTFACE, CustomData_add_layer(), i, CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_bmesh_to_derivedmesh(), and BME_bmesh_to_editmesh().
void CustomData_from_em_block | ( | const CustomData * | source, |
CustomData * | dest, | ||
void * | src_block, | ||
int | dest_index | ||
) |
Definition at line 2261 of file customdata.c.
References LayerTypeInfo::copy, CustomDataLayer::data, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void* CustomData_get | ( | const CustomData * | data, |
int | index, | ||
int | type | ||
) |
Definition at line 1919 of file customdata.c.
References CustomData_get_active_layer_index(), CustomDataLayer::data, CustomData::layers, layerType_getInfo(), NULL, and LayerTypeInfo::size.
int CustomData_get_active_layer | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1329 of file customdata.c.
References CustomDataLayer::active, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_active_layer_index | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1284 of file customdata.c.
References CustomDataLayer::active, CustomData::layers, CustomData::totlayer, and CustomData::typemap.
int CustomData_get_clone_layer | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1351 of file customdata.c.
References CustomDataLayer::active_clone, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_clone_layer_index | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1307 of file customdata.c.
References CustomDataLayer::active_clone, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void* CustomData_get_layer | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1947 of file customdata.c.
References CustomData_get_active_layer_index(), CustomDataLayer::data, CustomData::layers, and NULL.
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 | ||
) |
Definition at line 1262 of file customdata.c.
References CustomData_get_layer_index(), i, CustomData::layers, and CustomDataLayer::type.
Referenced by CustomData_em_get_n(), CustomData_get_layer_n(), CustomData_set_layer_n(), and CustomData_set_layer_name().
void* CustomData_get_layer_n | ( | const CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1956 of file customdata.c.
References CustomData_get_layer_index_n(), CustomDataLayer::data, CustomData::layers, and NULL.
void* CustomData_get_layer_named | ( | const struct CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Definition at line 1965 of file customdata.c.
References CustomData_get_named_layer_index(), CustomDataLayer::data, CustomData::layers, and NULL.
Referenced by MeshImporter::assign_material_to_geom(), dynamicPaint_createUVSurface(), dynamicPaint_findNeighbourPixel(), dynamicPaint_Modifier_apply(), dynamicPaint_setInitialColor(), explodeMesh(), get_particle_uv(), and get_texture_coords().
void* CustomData_get_n | ( | const CustomData * | data, |
int | type, | ||
int | index, | ||
int | n | ||
) |
Definition at line 1934 of file customdata.c.
References CustomDataLayer::data, CustomData::layers, layerType_getInfo(), NULL, LayerTypeInfo::size, and CustomData::typemap.
int CustomData_get_named_layer_index | ( | const CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Definition at line 1273 of file customdata.c.
References i, CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_render_layer | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1340 of file customdata.c.
References CustomDataLayer::active_rnd, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_render_layer_index | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1296 of file customdata.c.
References CustomDataLayer::active_rnd, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_stencil_layer | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1362 of file customdata.c.
References CustomDataLayer::active_mask, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
int CustomData_get_stencil_layer_index | ( | const CustomData * | data, |
int | type | ||
) |
Definition at line 1318 of file customdata.c.
References CustomDataLayer::active_mask, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::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 | ||
) |
Definition at line 1846 of file customdata.c.
References CustomDataLayer::data, LayerTypeInfo::interp, CustomData::layers, layerType_getInfo(), MEM_callocN(), MEM_freeN(), LayerTypeInfo::size, SOURCE_BUF_SIZE, CustomData::totlayer, and CustomDataLayer::type.
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 | ||
) |
Definition at line 1709 of file customdata.c.
References CD_FLAG_NOFREE, CustomData_get_active_layer_index(), CustomDataLayer::flag, and CustomData::layers.
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 | ||
) |
Definition at line 1138 of file customdata.c.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, CD_ASSIGN, CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_FLAG_NOCOPY, CD_FLAG_NOFREE, CD_REFERENCE, CD_TYPE_AS_MASK, customData_add_layer__internal(), CustomData_number_of_layers(), CustomData_update_typemap(), CustomDataLayer::data, CustomDataLayer::flag, i, CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_bmesh_to_derivedmesh(), CDDM_from_editmesh(), CDDM_from_mesh(), ConvertCSGDescriptorsToDerivedMesh(), CustomData_copy(), and join_mesh_exec().
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] |
Definition at line 1455 of file customdata.c.
References CustomData::layers, CustomData::maxlayer, MEM_callocN(), MEM_freeN(), and CustomData::totlayer.
Referenced by customData_add_layer__internal(), CustomData_free_layer(), and CustomData_free_temporary().
void CustomData_set | ( | const CustomData * | data, |
int | index, | ||
int | type, | ||
void * | source | ||
) |
Definition at line 2011 of file customdata.c.
References LayerTypeInfo::copy, CustomData_get(), layerType_getInfo(), and LayerTypeInfo::size.
void* CustomData_set_layer | ( | const CustomData * | data, |
int | type, | ||
void * | ptr | ||
) |
Definition at line 1988 of file customdata.c.
References CustomData_get_active_layer_index(), CustomDataLayer::data, CustomData::layers, and NULL.
void CustomData_set_layer_active | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1373 of file customdata.c.
References CustomDataLayer::active, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by delete_customdata_layer(), ED_mesh_color_add(), ED_mesh_uv_texture_add(), and EM_mesh_copy_face_layer().
void CustomData_set_layer_active_index | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1410 of file customdata.c.
References CustomDataLayer::active, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_set_layer_clone | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1391 of file customdata.c.
References CustomDataLayer::active_clone, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by delete_customdata_layer().
void CustomData_set_layer_clone_index | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1428 of file customdata.c.
References CustomDataLayer::active_clone, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_set_layer_flag | ( | struct CustomData * | data, |
int | type, | ||
int | flag | ||
) |
Definition at line 1446 of file customdata.c.
References CustomDataLayer::flag, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by dm_getEdgeArray(), dm_getFaceArray(), and dm_getVertArray().
void* CustomData_set_layer_n | ( | const struct CustomData * | data, |
int | type, | ||
int | n, | ||
void * | ptr | ||
) |
Definition at line 2000 of file customdata.c.
References CustomData_get_layer_index_n(), CustomDataLayer::data, CustomData::layers, and NULL.
int CustomData_set_layer_name | ( | const CustomData * | data, |
int | type, | ||
int | n, | ||
const char * | name | ||
) |
Definition at line 1975 of file customdata.c.
References CustomData_get_layer_index_n(), CustomData::layers, and CustomDataLayer::name.
void CustomData_set_layer_render | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1382 of file customdata.c.
References CustomDataLayer::active_rnd, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by delete_customdata_layer().
void CustomData_set_layer_render_index | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1419 of file customdata.c.
References CustomDataLayer::active_rnd, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_set_layer_stencil | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1400 of file customdata.c.
References CustomDataLayer::active_mask, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by delete_customdata_layer().
void CustomData_set_layer_stencil_index | ( | CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 1437 of file customdata.c.
References CustomDataLayer::active_mask, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_set_layer_unique_name | ( | CustomData * | data, |
int | index | ||
) |
Definition at line 2683 of file customdata.c.
References BLI_uniquename_cb(), customdata_unique_check(), data, LayerTypeInfo::defaultname, CustomData::layers, layerType_getInfo(), CustomDataLayer::name, and CustomDataLayer::type.
Referenced by customData_add_layer__internal().
void CustomData_set_only_copy | ( | const struct CustomData * | data, |
CustomDataMask | mask | ||
) |
Definition at line 1748 of file customdata.c.
References CD_FLAG_NOCOPY, CD_TYPE_AS_MASK, CustomDataLayer::flag, i, CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by DM_set_only_copy().
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 | ||
) |
Definition at line 1903 of file customdata.c.
References CustomDataLayer::data, i, CustomData::layers, layerType_getInfo(), LayerTypeInfo::size, LayerTypeInfo::swap, CustomData::totlayer, and CustomDataLayer::type.
Referenced by DM_swap_face_data(), and test_index_face().
void CustomData_to_bmesh_block | ( | const CustomData * | source, |
CustomData * | dest, | ||
int | src_index, | ||
void ** | dest_block | ||
) |
Definition at line 2536 of file customdata.c.
References LayerTypeInfo::copy, CustomData_bmesh_alloc_block(), CustomDataLayer::data, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
void CustomData_to_bmeshpoly | ( | CustomData * | fdata, |
CustomData * | pdata, | ||
CustomData * | ldata | ||
) |
Definition at line 2307 of file customdata.c.
References CD_CALLOC, CD_MCOL, CD_MLOOPCOL, CD_MLOOPUV, CD_MTEXPOLY, CD_MTFACE, CustomData_add_layer(), i, CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
void CustomData_to_em_block | ( | const CustomData * | source, |
CustomData * | dest, | ||
int | src_index, | ||
void ** | dest_block | ||
) |
Definition at line 2215 of file customdata.c.
References LayerTypeInfo::copy, CustomData_em_alloc_block(), CustomDataLayer::data, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, and CustomDataLayer::type.
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] |
Definition at line 1235 of file customdata.c.
References CustomData_update_typemap(), i, CustomData::layers, layerType_getInfo(), CustomDataLayer::offset, LayerTypeInfo::size, CustomData::totlayer, CustomData::totsize, and CustomDataLayer::type.
Referenced by customData_add_layer__internal(), CustomData_free_layer(), and CustomData_free_temporary().
void CustomData_update_typemap | ( | CustomData * | data | ) |
Definition at line 1119 of file customdata.c.
References BLI_assert, CD_NUMTYPES, i, CustomData::layers, CustomData::totlayer, CustomDataLayer::type, and CustomData::typemap.
Referenced by CustomData_add_layer(), CustomData_add_layer_named(), CustomData_free_layer(), CustomData_merge(), customData_update_offsets(), and direct_link_customdata().
void CustomData_validate_layer_name | ( | const CustomData * | data, |
int | type, | ||
char * | name, | ||
char * | outname | ||
) |
Definition at line 2699 of file customdata.c.
References CustomData_get_active_layer_index(), CustomData_get_named_layer_index(), CustomData::layers, and CustomDataLayer::name.
int CustomData_verify_versions | ( | struct CustomData * | data, |
int | index | ||
) |
Definition at line 2718 of file customdata.c.
References CD_NUMTYPES, LayerTypeInfo::defaultname, i, CustomData::layers, layerType_getInfo(), CustomData::totlayer, and CustomDataLayer::type.
Referenced by direct_link_customdata().
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] |
Definition at line 167 of file customdata.c.
References BLI_linklist_free(), BLI_linklist_prepend(), MDeformWeight::def_nr, MDeformVert::dw, i, LinkNode::link, linklist_free_simple(), MEM_callocN(), MEM_freeN(), LinkNode::next, NULL, MDeformVert::totweight, and MDeformWeight::weight.
static void layerInterp_mdisps | ( | void ** | sources, |
float * | UNUSEDweights, | ||
float * | sub_weights, | ||
int | count, | ||
void * | dest | ||
) | [static] |
Definition at line 443 of file customdata.c.
References simple_enum_gen::d, MDisps::disps, i, mdisp_apply_weight(), mdisp_flip_disp(), mdisp_join_tris(), mdisp_rot_face_to_quad_crn(), MEM_callocN(), MEM_dupallocN(), MEM_freeN(), multires_mdisp_corners(), multires_mdisp_smooth_bounds(), normalize_v2(), NULL, old_mdisps_bilinear(), sqrt(), sub_v2_v2(), MDisps::totdisp, and zero_v3().
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] |
Definition at line 412 of file customdata.c.
References simple_enum_gen::d, data, MDisps::disps, MEM_callocN(), MEM_freeN(), multires_mdisp_corners(), NULL, and MDisps::totdisp.
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] |
Definition at line 286 of file customdata.c.
References copy_v2_v2(), data, MTFace::flag, TF_PIN1, TF_PIN2, TF_PIN3, TF_PIN4, TF_SEL1, TF_SEL2, TF_SEL3, TF_SEL4, MTFace::unwrap, and MTFace::uv.
static const LayerTypeInfo* layerType_getInfo | ( | int | type | ) | [static] |
Definition at line 1099 of file customdata.c.
References CD_NUMTYPES, and NULL.
Referenced by CustomData_add_layer(), customData_add_layer__internal(), CustomData_bmesh_copy_data(), CustomData_bmesh_free_block(), CustomData_bmesh_interp(), CustomData_bmesh_set(), CustomData_bmesh_set_default(), CustomData_bmesh_set_layer_n(), CustomData_bmesh_set_n(), CustomData_copy_data(), CustomData_copy_elements(), CustomData_duplicate_referenced_layer(), CustomData_duplicate_referenced_layer_named(), CustomData_em_copy_data(), CustomData_em_free_block(), CustomData_em_interp(), CustomData_em_set(), CustomData_em_set_default(), CustomData_em_set_n(), CustomData_em_validate_data(), CustomData_external_read(), CustomData_external_reload(), CustomData_external_write(), CustomData_file_write_info(), CustomData_free_elem(), customData_free_layer__internal(), CustomData_from_bmesh_block(), CustomData_from_em_block(), CustomData_get(), CustomData_get_n(), CustomData_interp(), CustomData_set(), CustomData_set_layer_unique_name(), CustomData_sizeof(), CustomData_swap(), CustomData_to_bmesh_block(), CustomData_to_em_block(), customData_update_offsets(), and CustomData_verify_versions().
static const char* layerType_getName | ( | int | type | ) | [static] |
Definition at line 1106 of file customdata.c.
References CD_NUMTYPES, and NULL.
Referenced by customData_add_layer__internal(), CustomData_copy_data(), CustomData_external_read(), and CustomData_layertype_name().
static void layerValidate_mdisps | ( | void * | data, |
int | sub_elements | ||
) | [static] |
Definition at line 575 of file customdata.c.
References data, MDisps::disps, MEM_callocN(), MEM_freeN(), multires_mdisp_corners(), and MDisps::totdisp.
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().
Definition at line 1080 of file customdata.c.
Referenced by add_verts_to_dgroups(), brush_add(), connect_hair(), crazyspace_get_mapped_editverts(), dm_deform_recalc(), draw_mesh_text(), draw_object_backbufsel(), draw_object_mesh_instance(), draw_uvs(), dupli_render_particle_set(), ED_view3d_screen_datamask(), face_duplilist(), get_multires_dm(), imapaint_pick_uv(), init_render_mesh(), init_render_object_data(), initElbeemMesh(), join_mesh_shapes_exec(), mesh_deform_bind(), mesh_foreachScreenEdge(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), mesh_get_mapped_verts_nors(), multires_apply_smat(), multires_subdivide(), multiresModifier_base_apply(), multiresModifier_reshape(), multiresModifier_update(), NewBooleanMesh(), object_handle_update(), GeometryExporter::operator()(), peelObjects(), pointdensity_cache_object(), pointdensity_cache_psys(), sculpt_update_mesh_elements(), snapObject(), vertex_duplilist(), vertex_parent_set_exec(), vgroup_fix(), and weight_sample_invoke().
const CustomDataMask CD_MASK_BMESH |
Definition at line 1093 of file customdata.c.
Referenced by BME_bmesh_to_derivedmesh(), BME_bmesh_to_editmesh(), BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_CLOTH_ORCO | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_TANGENT | CD_MASK_WEIGHT_MCOL | CD_MASK_RECAST
Definition at line 1089 of file customdata.c.
Referenced by CDDM_from_editmesh(), ConvertCSGDescriptorsToDerivedMesh(), and DM_from_template().
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST
Definition at line 1086 of file customdata.c.
Referenced by editMesh_to_undoMesh(), make_editMesh(), mesh_separate_selected(), and undoMesh_to_editMesh().
Definition at line 1095 of file customdata.c.
const CustomDataMask CD_MASK_MESH |
CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE | CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST
Definition at line 1082 of file customdata.c.
Referenced by KX_NavMeshObject::BuildVertIndArrays(), CDDM_from_mesh(), convert_exec(), copy_mesh(), createVertsTrisData(), DM_to_mesh(), BL_ModifierDeformer::GetPhysicsMesh(), join_mesh_exec(), load_editMesh(), mesh_add_edges(), mesh_add_faces(), mesh_add_verts(), mesh_to_curve(), mesh_validate_customdata(), multires_external_save_exec(), BL_ModifierDeformer::Update(), and write_customdata().
const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] [static] |
Definition at line 971 of file customdata.c.
const char* LAYERTYPENAMES[CD_NUMTYPES] [static] |
{ "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.