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

BKE_customdata.h File Reference

CustomData interface, see also DNA_customdata_types.h. More...

#include "../blenloader/BLO_sys_types.h"

Go to the source code of this file.

Defines

#define ORIGINDEX_NONE   -1
#define CD_ASSIGN   0
#define CD_CALLOC   1
#define CD_DEFAULT   2
#define CD_REFERENCE   3
#define CD_DUPLICATE   4
#define CD_TYPE_AS_MASK(_type)   (CustomDataMask)(1 << (CustomDataMask)(_type))

Typedefs

typedef uint64_t CustomDataMask

Functions

void CustomData_copy (const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem)
void CustomData_update_typemap (struct CustomData *data)
void CustomData_merge (const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem)
void CustomData_free (struct CustomData *data, int totelem)
void CustomData_free_temporary (struct CustomData *data, int totelem)
void * CustomData_add_layer (struct CustomData *data, int type, int alloctype, void *layer, int totelem)
void * CustomData_add_layer_named (struct CustomData *data, int type, int alloctype, void *layer, int totelem, const char *name)
int CustomData_free_layer (struct CustomData *data, int type, int totelem, int index)
int CustomData_free_layer_active (struct CustomData *data, int type, int totelem)
void CustomData_free_layers (struct CustomData *data, int type, int totelem)
int CustomData_has_layer (const struct CustomData *data, int type)
int CustomData_number_of_layers (const struct 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_set_only_copy (const struct CustomData *data, CustomDataMask mask)
void CustomData_copy_data (const struct CustomData *source, struct CustomData *dest, int source_index, int dest_index, int count)
void CustomData_copy_elements (int type, void *source, void *dest, int count)
void CustomData_em_copy_data (const struct CustomData *source, struct CustomData *dest, void *src_block, void **dest_block)
void CustomData_bmesh_copy_data (const struct CustomData *source, struct CustomData *dest, void *src_block, void **dest_block)
void CustomData_em_validate_data (struct CustomData *data, void *block, int sub_elements)
void CustomData_free_elem (struct CustomData *data, int index, int count)
void CustomData_interp (const struct CustomData *source, struct CustomData *dest, int *src_indices, float *weights, float *sub_weights, int count, int dest_index)
void CustomData_em_interp (struct CustomData *data, void **src_blocks, float *weights, float *sub_weights, int count, void *dest_block)
void CustomData_bmesh_interp (struct CustomData *data, void **src_blocks, float *weights, float *sub_weights, int count, void *dest_block)
void CustomData_swap (struct CustomData *data, int index, const int *corner_indices)
void * CustomData_get (const struct CustomData *data, int index, int type)
void * CustomData_get_n (const struct CustomData *data, int type, int index, int n)
void * CustomData_em_get (const struct CustomData *data, void *block, int type)
void * CustomData_em_get_n (const struct CustomData *data, void *block, int type, int n)
void * CustomData_bmesh_get (const struct CustomData *data, void *block, int type)
void * CustomData_bmesh_get_n (const struct CustomData *data, void *block, int type, int n)
void * CustomData_bmesh_get_layer_n (const struct CustomData *data, void *block, int n)
int CustomData_set_layer_name (const struct CustomData *data, int type, int n, const char *name)
void * CustomData_get_layer (const struct CustomData *data, int type)
void * CustomData_get_layer_n (const struct CustomData *data, int type, int n)
void * CustomData_get_layer_named (const struct CustomData *data, int type, const char *name)
int CustomData_get_layer_index (const struct 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 struct CustomData *data, int type, const char *name)
int CustomData_get_active_layer_index (const struct CustomData *data, int type)
int CustomData_get_render_layer_index (const struct CustomData *data, int type)
int CustomData_get_clone_layer_index (const struct CustomData *data, int type)
int CustomData_get_stencil_layer_index (const struct CustomData *data, int type)
int CustomData_get_active_layer (const struct CustomData *data, int type)
int CustomData_get_render_layer (const struct CustomData *data, int type)
int CustomData_get_clone_layer (const struct CustomData *data, int type)
int CustomData_get_stencil_layer (const struct CustomData *data, int type)
void CustomData_set (const struct CustomData *data, int index, int type, void *source)
void CustomData_em_set (struct CustomData *data, void *block, int type, void *source)
void CustomData_em_set_n (struct CustomData *data, void *block, int type, int n, void *source)
void CustomData_bmesh_set (const struct CustomData *data, void *block, int type, void *source)
void CustomData_bmesh_set_n (struct CustomData *data, void *block, int type, int n, void *source)
void CustomData_bmesh_set_layer_n (struct CustomData *data, void *block, int n, void *source)
void * CustomData_set_layer (const struct CustomData *data, int type, void *ptr)
void * CustomData_set_layer_n (const struct CustomData *data, int type, int n, void *ptr)
void CustomData_set_layer_active (struct CustomData *data, int type, int n)
void CustomData_set_layer_render (struct CustomData *data, int type, int n)
void CustomData_set_layer_clone (struct CustomData *data, int type, int n)
void CustomData_set_layer_stencil (struct CustomData *data, int type, int n)
void CustomData_set_layer_active_index (struct CustomData *data, int type, int n)
void CustomData_set_layer_render_index (struct CustomData *data, int type, int n)
void CustomData_set_layer_clone_index (struct CustomData *data, int type, int n)
void CustomData_set_layer_stencil_index (struct CustomData *data, int type, int n)
void CustomData_set_layer_flag (struct CustomData *data, int type, int flag)
void CustomData_em_set_default (struct CustomData *data, void **block)
void CustomData_em_free_block (struct CustomData *data, void **block)
void CustomData_bmesh_set_default (struct CustomData *data, void **block)
void CustomData_bmesh_free_block (struct CustomData *data, void **block)
void CustomData_to_em_block (const struct CustomData *source, struct CustomData *dest, int index, void **block)
void CustomData_from_em_block (const struct CustomData *source, struct CustomData *dest, void *block, int index)
void CustomData_to_bmesh_block (const struct CustomData *source, struct CustomData *dest, int src_index, void **dest_block)
void CustomData_from_bmesh_block (const struct CustomData *source, struct 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)
void CustomData_set_layer_unique_name (struct CustomData *data, int index)
void CustomData_validate_layer_name (const struct CustomData *data, int type, char *name, char *outname)
int CustomData_verify_versions (struct CustomData *data, int index)
void CustomData_to_bmeshpoly (struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata)
void CustomData_from_bmeshpoly (struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total)
void CustomData_bmesh_init_pool (struct CustomData *data, int allocsize)
void CustomData_external_add (struct CustomData *data, struct ID *id, int type, int totelem, const char *filename)
void CustomData_external_remove (struct CustomData *data, struct ID *id, int type, int totelem)
int CustomData_external_test (struct CustomData *data, int type)
void CustomData_external_write (struct CustomData *data, struct ID *id, CustomDataMask mask, int totelem, int free)
void CustomData_external_read (struct CustomData *data, struct ID *id, CustomDataMask mask, int totelem)
void CustomData_external_reload (struct CustomData *data, struct ID *id, CustomDataMask mask, int totelem)

Variables

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

CustomData interface, see also DNA_customdata_types.h.

Author:
Ben Batt

Definition in file BKE_customdata.h.


Define Documentation

#define CD_ASSIGN   0
#define CD_CALLOC   1
#define CD_DEFAULT   2
#define CD_DUPLICATE   4
#define CD_REFERENCE   3
#define CD_TYPE_AS_MASK (   _type)    (CustomDataMask)(1 << (CustomDataMask)(_type))
#define ORIGINDEX_NONE   -1

Typedef Documentation

typedef uint64_t CustomDataMask

Definition at line 45 of file BKE_customdata.h.


Function Documentation

void* CustomData_add_layer ( struct CustomData data,
int  type,
int  alloctype,
void *  layer,
int  totelem 
)
void* CustomData_add_layer_named ( struct CustomData data,
int  type,
int  alloctype,
void *  layer,
int  totelem,
const char *  name 
)
void CustomData_bmesh_copy_data ( const struct CustomData source,
struct CustomData dest,
void *  src_block,
void **  dest_block 
)
void CustomData_bmesh_free_block ( struct CustomData data,
void **  block 
)
void* CustomData_bmesh_get ( const struct CustomData data,
void *  block,
int  type 
)

Referenced by CustomData_bmesh_set().

void* CustomData_bmesh_get_layer_n ( const struct CustomData data,
void *  block,
int  n 
)
void* CustomData_bmesh_get_n ( const struct CustomData data,
void *  block,
int  type,
int  n 
)
void CustomData_bmesh_init_pool ( struct CustomData data,
int  allocsize 
)
void CustomData_bmesh_interp ( struct CustomData data,
void **  src_blocks,
float *  weights,
float *  sub_weights,
int  count,
void *  dest_block 
)
void CustomData_bmesh_set ( const struct CustomData data,
void *  block,
int  type,
void *  source 
)
void CustomData_bmesh_set_default ( struct CustomData data,
void **  block 
)
void CustomData_bmesh_set_layer_n ( struct CustomData data,
void *  block,
int  n,
void *  source 
)
void CustomData_bmesh_set_n ( struct 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 struct CustomData source,
struct 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 
)
void CustomData_em_copy_data ( const struct CustomData source,
struct CustomData dest,
void *  src_block,
void **  dest_block 
)
void CustomData_em_free_block ( struct CustomData data,
void **  block 
)
void* CustomData_em_get ( const struct CustomData data,
void *  block,
int  type 
)

Referenced by act_vert_def(), append_weldedUV(), append_weldedUVEdge(), border_select_exec(), circle_select_exec(), collapseuvs(), compareFaceAttribs(), construct_param_handle(), correct_uv_aspect(), createRepresentation(), createTransUVs(), cube_project_exec(), CustomData_em_set(), cylinder_project_exec(), draw_em_tf_mapped__set_draw(), draw_uvs(), draw_uvs_shadow(), draw_uvs_stretch(), ED_uvedit_assign_image(), ED_uvedit_ensure_uvs(), ED_uvedit_median(), ED_uvedit_minmax(), ED_uvedit_nearest_uv(), ED_vgroup_give_parray(), ED_vgroup_mirror(), editmesh_get_derived(), editvert_mirror_update(), EM_get_active_mtface(), EM_make_uv_vert_map(), EM_mesh_copy_face(), EM_mesh_copy_face_layer(), emDM_drawFacesTex_common(), emDM_drawUVEdges(), emDM_getFaceDataArray(), find_nearest_uv_edge(), find_nearest_uv_face(), find_nearest_uv_vert(), findFreeNavPolyIndex(), get_vert_def_nr(), get_weights_array(), hide_exec(), mesh_mirror_colors(), mesh_mirror_uvs(), mesh_rotate_colors(), mesh_rotate_uvs(), mouse_select(), navmesh_face_add_exec(), navmesh_face_copy_exec(), pin_exec(), reset_exec(), return_editmesh_vgroup(), reveal_exec(), select_all_perform(), select_edgeloop(), select_linked(), select_pinned_exec(), similar_face_select__internal(), similar_vert_select_exec(), snap_uvs_to_adjacent_unselected(), snap_uvs_to_cursor(), snap_uvs_to_pixels(), sphere_project_exec(), stitch_exec(), unlink_selection_exec(), uv_faces_do_sticky(), uv_from_view_exec(), uv_map_clip_correct(), uvedit_center(), uvedit_have_selection(), uvedit_set_tile(), uvedit_translate(), v3d_editvertex_buts(), vgroup_active_remove_verts(), vgroup_assign_verts(), vgroup_blend(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_delete_edit_mode(), vgroup_do_remap(), vgroup_select_verts(), and weld_align_uv().

void* CustomData_em_get_n ( const struct CustomData data,
void *  block,
int  type,
int  n 
)
void CustomData_em_interp ( struct CustomData data,
void **  src_blocks,
float *  weights,
float *  sub_weights,
int  count,
void *  dest_block 
)
void CustomData_em_set ( struct CustomData data,
void *  block,
int  type,
void *  source 
)
void CustomData_em_set_default ( struct CustomData data,
void **  block 
)
void CustomData_em_set_n ( struct CustomData data,
void *  block,
int  type,
int  n,
void *  source 
)
void CustomData_em_validate_data ( struct CustomData data,
void *  block,
int  sub_elements 
)
void CustomData_external_add ( struct CustomData data,
struct ID id,
int  type,
int  totelem,
const char *  filename 
)
void CustomData_external_read ( struct CustomData data,
struct ID id,
CustomDataMask  mask,
int  totelem 
)
void CustomData_external_reload ( struct CustomData data,
struct ID id,
CustomDataMask  mask,
int  totelem 
)
void CustomData_external_remove ( struct CustomData data,
struct ID id,
int  type,
int  totelem 
)
int CustomData_external_test ( struct CustomData data,
int  type 
)
void CustomData_external_write ( struct CustomData data,
struct 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 ( struct CustomData data,
int  totelem 
)
void CustomData_free_elem ( struct CustomData data,
int  index,
int  count 
)
int CustomData_free_layer ( struct CustomData data,
int  type,
int  totelem,
int  index 
)
int CustomData_free_layer_active ( struct CustomData data,
int  type,
int  totelem 
)
void CustomData_free_layers ( struct CustomData data,
int  type,
int  totelem 
)
void CustomData_free_temporary ( struct CustomData data,
int  totelem 
)
void CustomData_from_bmesh_block ( const struct CustomData source,
struct CustomData dest,
void *  src_block,
int  dest_index 
)
void CustomData_from_bmeshpoly ( struct CustomData fdata,
struct CustomData pdata,
struct CustomData ldata,
int  total 
)
void CustomData_from_em_block ( const struct CustomData source,
struct CustomData dest,
void *  block,
int  index 
)
void* CustomData_get ( const struct CustomData data,
int  index,
int  type 
)
int CustomData_get_active_layer ( const struct CustomData data,
int  type 
)
int CustomData_get_active_layer_index ( const struct CustomData data,
int  type 
)
int CustomData_get_clone_layer ( const struct CustomData data,
int  type 
)

Referenced by project_paint_begin().

int CustomData_get_clone_layer_index ( const struct CustomData data,
int  type 
)

Referenced by delete_customdata_layer().

void* CustomData_get_layer ( const struct CustomData data,
int  type 
)
int CustomData_get_layer_index ( const struct CustomData data,
int  type 
)
int CustomData_get_layer_index_n ( const struct CustomData data,
int  type,
int  n 
)
void* CustomData_get_layer_n ( const struct 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 struct CustomData data,
int  type,
int  index,
int  n 
)
int CustomData_get_named_layer_index ( const struct CustomData data,
int  type,
const char *  name 
)
int CustomData_get_render_layer ( const struct CustomData data,
int  type 
)
int CustomData_get_render_layer_index ( const struct CustomData data,
int  type 
)

Referenced by delete_customdata_layer().

int CustomData_get_stencil_layer ( const struct CustomData data,
int  type 
)

Referenced by project_paint_begin().

int CustomData_get_stencil_layer_index ( const struct CustomData data,
int  type 
)

Referenced by delete_customdata_layer().

int CustomData_has_layer ( const struct CustomData data,
int  type 
)
void CustomData_interp ( const struct CustomData source,
struct CustomData dest,
int *  src_indices,
float *  weights,
float *  sub_weights,
int  count,
int  dest_index 
)
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 struct CustomData data,
int  type 
)
void CustomData_set ( const struct CustomData data,
int  index,
int  type,
void *  source 
)
void* CustomData_set_layer ( const struct CustomData data,
int  type,
void *  ptr 
)

Referenced by load_editMesh().

void CustomData_set_layer_active ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_active_index ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_clone ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_clone_index ( struct 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 struct CustomData data,
int  type,
int  n,
const char *  name 
)
void CustomData_set_layer_render ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_render_index ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_stencil ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_stencil_index ( struct CustomData data,
int  type,
int  n 
)
void CustomData_set_layer_unique_name ( struct 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 struct CustomData source,
struct CustomData dest,
int  src_index,
void **  dest_block 
)
void CustomData_to_bmeshpoly ( struct CustomData fdata,
struct CustomData pdata,
struct CustomData ldata 
)
void CustomData_to_em_block ( const struct CustomData source,
struct CustomData dest,
int  index,
void **  block 
)
void CustomData_update_typemap ( struct CustomData data)
void CustomData_validate_layer_name ( const struct CustomData data,
int  type,
char *  name,
char *  outname 
)
int CustomData_verify_versions ( struct CustomData data,
int  index 
)

Variable Documentation

Definition at line 1095 of file customdata.c.