Blender V4.3
CustomData Struct Reference

#include <DNA_customdata_types.h>

Public Attributes

CustomDataLayerlayers
 
int typemap [53]
 
int totlayer
 
int maxlayer
 
int totsize
 
struct BLI_mempoolpool
 
CustomDataExternalexternal
 

Detailed Description

CustomData stores an arbitrary number of typed data "layers" for multiple elements. The layers are typically geometry attributes, and the elements are typically geometry elements like vertices, edges, or curves.

Each layer has a type, often with certain semantics beyond the type of the raw data. However, a subset of the layer types are exposed as attributes and accessed with a higher level API built around #AttributeAccessor.

For BMesh, CustomData is adapted to store the data from all layers in a single "block" which is allocated for each element. Each layer's data is stored at a certain offset into every block's data.

Definition at line 68 of file DNA_customdata_types.h.

Member Data Documentation

◆ external

CustomDataExternal* CustomData::external

External file storing custom-data layers.

Definition at line 83 of file DNA_customdata_types.h.

Referenced by bm_corners_to_loops_ex(), CustomData_init_from(), and CustomData_init_layout_from().

◆ layers

CustomDataLayer* CustomData::layers

Layers ordered by type.

Definition at line 70 of file DNA_customdata_types.h.

Referenced by add_mface_layers(), blender::ed::object::add_shapekey_layers(), attribute_name_exists(), BKE_attribute_data_length(), BKE_attribute_domain(), BKE_attribute_find(), BKE_attribute_from_index(), BKE_attribute_new(), BKE_attribute_search(), BKE_attribute_to_index(), BKE_attributes_active_get(), BKE_attributes_iterator_next_domain(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_calc_loop_tangent_step_0(), BM_data_layer_add(), BM_data_layer_add_named(), BM_data_layer_free(), BM_data_layer_free_n(), BM_data_layer_free_named(), bm_edge_collapse_loop_customdata(), blender::bm_face_loop_table_build(), bm_loop_customdata_merge(), BM_mesh_bm_from_me(), BM_mesh_bm_to_me_compact(), BM_mesh_copy_init_customdata_all_layers(), BM_mesh_copy_init_customdata_from_mesh_array(), bm_to_mesh_copy_info_calc(), bm_to_mesh_shape(), bm_to_mesh_shape_layer_index_from_kb(), BM_uv_map_get_offsets_from_layer(), BM_vert_loop_groups_data_layer_create(), BM_vert_loop_groups_data_layer_merge(), bm_vert_loop_groups_data_layer_merge__single(), BM_vert_loop_groups_data_layer_merge_weights(), bm_vert_loop_groups_data_layer_merge_weights__single(), bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), bmo_pointmerge_facedata_exec(), bmw_UVEdgeWalker_step(), contig_ldata_across_loops(), convert_grease_pencil_stroke_hardness_to_softness(), CustomData_bmesh_copy_map_calc(), CustomData_bmesh_merge_layout(), CustomData_copy_data(), CustomData_copy_data_layer(), CustomData_copy_data_named(), CustomData_interp(), customdata_merge_internal(), CustomData_shallow_copy_remove_non_bmesh_attributes(), CustomData_to_bmeshpoly(), blender::geometry::customdata_weld(), do_versions_point_attribute_names(), do_versions_point_attributes(), EDBM_verts_mirror_cache_begin_ex(), blender::bke::CustomDataAttributeProvider::foreach_attribute(), mesh_to_bm_copy_info_calc(), move_shapekey_layers_to_keyblocks(), replace_custom_data_layer_with_named(), shape_itemf(), blender::bke::CustomDataAttributeProvider::try_create(), blender::bke::CustomDataAttributeProvider::try_delete(), blender::bke::BuiltinCustomDataLayerProvider::try_get_for_read(), blender::bke::CustomDataAttributeProvider::try_get_for_read(), blender::bke::CustomDataAttributeProvider::try_get_for_write(), um_arraystore_cd_compact(), and um_arraystore_cd_expand().

◆ maxlayer

int CustomData::maxlayer

◆ pool

struct BLI_mempool* CustomData::pool

(BMesh Only): Memory pool for allocation of blocks.

Definition at line 81 of file DNA_customdata_types.h.

Referenced by BM_data_layer_free_named(), BM_mesh_data_free(), CustomData_bmesh_copy_block(), CustomData_bmesh_merge_layout(), and update_data_blocks().

◆ totlayer

int CustomData::totlayer

Number of layers, size of layers array.

Definition at line 77 of file DNA_customdata_types.h.

Referenced by blender::bke::add_custom_data_layer_from_attribute_init(), add_mface_layers(), attribute_name_exists(), BKE_attribute_data_length(), BKE_attribute_domain(), BKE_attribute_find(), BKE_attribute_from_index(), BKE_attribute_search(), BKE_attribute_to_index(), BKE_attributes_active_get(), BKE_attributes_iterator_next_domain(), bm_edge_collapse_loop_customdata(), bm_loop_customdata_merge(), BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata_all_layers(), BM_mesh_data_free(), bm_to_mesh_copy_info_calc(), bm_to_mesh_shape(), bm_to_mesh_shape_layer_index_from_kb(), bmo_average_vert_facedata_exec(), bmo_collapse_uvs_exec(), bmo_pointmerge_facedata_exec(), contig_ldata_across_edge(), CustomData_bmesh_copy_map_calc(), CustomData_copy_data(), CustomData_copy_data_named(), CustomData_interp(), customdata_merge_internal(), CustomData_shallow_copy_remove_non_bmesh_attributes(), CustomData_to_bmeshpoly(), blender::geometry::customdata_weld(), do_versions_point_attribute_names(), do_versions_point_attributes(), blender::bke::CustomDataAttributeProvider::foreach_attribute(), math_layer_info_init(), mesh_customdatacorrect_init_container_merge_group(), mesh_to_bm_copy_info_calc(), replace_custom_data_layer_with_named(), set_ccgdm_all_geometry(), shape_itemf(), blender::bke::CustomDataAttributeProvider::try_create(), blender::bke::CustomDataAttributeProvider::try_delete(), blender::bke::CustomDataAttributeProvider::try_get_for_read(), blender::bke::CustomDataAttributeProvider::try_get_for_write(), and um_arraystore_cd_compact().

◆ totsize

int CustomData::totsize

In editmode, total size of all data layers.

Definition at line 79 of file DNA_customdata_types.h.

Referenced by CustomData_bmesh_copy_block().

◆ typemap

int CustomData::typemap[53]

Runtime only map from types to indices of first layer of that type, Correct size of CD_NUMTYPES is ensured by CustomData_update_typemap.

Definition at line 75 of file DNA_customdata_types.h.

Referenced by customdata_typemap_is_valid(), and DM_init().


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