Blender
V3.3
|
CustomData interface, see also DNA_customdata_types.h. More...
Go to the source code of this file.
Classes | |
struct | CDBlockBytes |
struct | CustomDataTransferLayerMap |
Macros | |
#define | ORIGINDEX_NONE -1 |
#define | CD_TYPE_AS_MASK(_type) (eCustomDataMask)((eCustomDataMask)1 << (eCustomDataMask)(_type)) |
Typedefs | |
typedef uint64_t | eCustomDataMask |
typedef enum eCDAllocType | eCDAllocType |
typedef void(* | cd_interp) (const void **sources, const float *weights, const float *sub_weights, int count, void *dest) |
typedef void(* | cd_copy) (const void *source, void *dest, int count) |
typedef bool(* | cd_validate) (void *item, uint totitems, bool do_fixes) |
typedef void(* | cd_datatransfer_interp) (const struct CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, int count, float mix_factor) |
typedef struct CustomDataTransferLayerMap | CustomDataTransferLayerMap |
Enumerations | |
enum | eCDAllocType { CD_ASSIGN = 0 , CD_CALLOC = 1 , CD_DEFAULT = 2 , CD_REFERENCE = 3 , CD_DUPLICATE = 4 } |
enum | { CD_FAKE = 1 << 8 , CD_FAKE_MDEFORMVERT = CD_FAKE | CD_MDEFORMVERT , CD_FAKE_SHAPEKEY , CD_FAKE_SEAM = CD_FAKE | 100 , CD_FAKE_CREASE = CD_FAKE | CD_CREASE , CD_FAKE_BWEIGHT = CD_FAKE | CD_BWEIGHT , CD_FAKE_UV , CD_FAKE_LNOR , CD_FAKE_SHARP = CD_FAKE | 200 } |
enum | { ME_VERT = 1 << 0 , ME_EDGE = 1 << 1 , ME_POLY = 1 << 2 , ME_LOOP = 1 << 3 } |
enum | { CDT_MIX_NOMIX = -1 , CDT_MIX_TRANSFER = 0 , CDT_MIX_REPLACE_ABOVE_THRESHOLD = 1 , CDT_MIX_REPLACE_BELOW_THRESHOLD = 2 , CDT_MIX_MIX = 16 , CDT_MIX_ADD = 17 , CDT_MIX_SUB = 18 , CDT_MIX_MUL = 19 } |
Variables | |
const CustomData_MeshMasks | CD_MASK_BAREMESH |
const CustomData_MeshMasks | CD_MASK_BAREMESH_ORIGINDEX |
const CustomData_MeshMasks | CD_MASK_MESH |
const CustomData_MeshMasks | CD_MASK_DERIVEDMESH |
const CustomData_MeshMasks | CD_MASK_BMESH |
const CustomData_MeshMasks | CD_MASK_EVERYTHING |
CustomData interface, see also DNA_customdata_types.h.
Definition in file BKE_customdata.h.
#define CD_TYPE_AS_MASK | ( | _type | ) | (eCustomDataMask)((eCustomDataMask)1 << (eCustomDataMask)(_type)) |
Definition at line 66 of file BKE_customdata.h.
#define ORIGINDEX_NONE -1 |
Definition at line 46 of file BKE_customdata.h.
Definition at line 72 of file BKE_customdata.h.
typedef void(* cd_datatransfer_interp) (const struct CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, int count, float mix_factor) |
Definition at line 591 of file BKE_customdata.h.
typedef void(* cd_interp) (const void **sources, const float *weights, const float *sub_weights, int count, void *dest) |
Definition at line 70 of file BKE_customdata.h.
Definition at line 73 of file BKE_customdata.h.
typedef struct CustomDataTransferLayerMap CustomDataTransferLayerMap |
typedef enum eCDAllocType eCDAllocType |
Add/copy/merge allocation types.
typedef uint64_t eCustomDataMask |
Definition at line 31 of file BKE_customdata.h.
anonymous enum |
Enumerator | |
---|---|
ME_VERT | |
ME_EDGE | |
ME_POLY | |
ME_LOOP |
Definition at line 624 of file BKE_customdata.h.
anonymous enum |
How to filter out some elements (to leave untouched). Note those options are highly dependent on type of transferred data!
Enumerator | |
---|---|
CDT_MIX_NOMIX | |
CDT_MIX_TRANSFER | |
CDT_MIX_REPLACE_ABOVE_THRESHOLD | |
CDT_MIX_REPLACE_BELOW_THRESHOLD | |
CDT_MIX_MIX | |
CDT_MIX_ADD | |
CDT_MIX_SUB | |
CDT_MIX_MUL |
Definition at line 634 of file BKE_customdata.h.
anonymous enum |
Fake CD_LAYERS (those are actually 'real' data stored directly into elements' structs, or otherwise not (directly) accessible to usual CDLayer system).
Enumerator | |
---|---|
CD_FAKE | |
CD_FAKE_MDEFORMVERT | |
CD_FAKE_SHAPEKEY | |
CD_FAKE_SEAM | |
CD_FAKE_CREASE | |
CD_FAKE_BWEIGHT | |
CD_FAKE_UV | |
CD_FAKE_LNOR | |
CD_FAKE_SHARP |
Definition at line 601 of file BKE_customdata.h.
enum eCDAllocType |
Add/copy/merge allocation types.
Definition at line 53 of file BKE_customdata.h.
void* CustomData_add_layer | ( | struct CustomData * | data, |
int | type, | ||
eCDAllocType | alloctype, | ||
void * | layer, | ||
int | totelem | ||
) |
Adds a data layer of the given type to the CustomData object, optionally backed by an external data array. the different allocation types are defined above. returns the data of the layer.
Definition at line 2776 of file customdata.cc.
References customData_add_layer__internal(), CustomData_update_typemap(), data, CustomDataLayer::data, LayerTypeInfo::defaultname, layerType_getInfo(), and type.
Referenced by blender::bke::add_builtin_type_custom_data_layer_from_init(), add_orco_mesh(), BKE_mesh_calc_edges(), BKE_mesh_calc_edges_legacy(), BKE_mesh_calc_edges_tessface(), BKE_mesh_ensure_facemap_customdata(), BKE_mesh_ensure_skin_customdata(), BKE_mesh_from_metaball(), BKE_mesh_from_pointcloud(), BKE_mesh_nomain_to_mesh(), BKE_mesh_orco_ensure(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remesh_reproject_paint_mask(), BKE_object_defgroup_data_create(), BKE_remesh_reproject_sculpt_face_sets(), BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(), BKE_sculpt_mask_layers_ensure(), BM_data_layer_add(), BM_mesh_bm_from_me(), BM_mesh_bm_to_me(), BM_mesh_bm_to_me_for_eval(), ccgDM_get_edge_data_layer(), ccgDM_get_poly_data_layer(), ccgDM_get_vert_data_layer(), CDDM_copy(), convert_mfaces_to_mpolys(), copy_ccg_data(), customdata_version_242(), data_transfer_dtdata_type_postprocess(), data_transfer_dtdata_type_preprocess(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), data_transfer_layersmapping_vgroups(), data_transfer_layersmapping_vgroups_multisrc_to_dst(), deformVerts(), DM_DupPolys(), dm_getEdgeArray(), dm_getLoopArray(), dm_getPolyArray(), dm_getVertArray(), dynamicPaint_Modifier_apply(), ED_mesh_join_objects_exec(), ED_object_facemap_face_add(), ED_object_modifier_convert_psys_to_mesh(), editbmesh_calc_modifiers(), ensure_corner_normal_layer(), ensure_orig_index_layer(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), hair_create_input_mesh(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_calc_modifiers(), mesh_customdata_custom_splitnormals_add_exec(), mesh_ensure_cdlayers_primary(), mesh_set_custom_normals(), mesh_tessface_calc(), MOD_solidify_extrude_modifyMesh(), modifier_skin_armature_create(), modifyGeometry(), modifyMesh(), multires_create_grids_in_unsubdivided_base_mesh(), multires_ensure_external_read(), multires_subdivide_create_tangent_displacement_linear_grids(), multiresModifier_disp_run(), multiresModifier_subdivide_to_level(), normalEditModifier_do(), blender::io::alembic::read_generated_coordinates(), blender::io::alembic::read_vertex_creases(), SCULPT_dynamic_topology_disable_ex(), sculpt_face_sets_ensure(), skin_set_orig_indices(), and blender::io::stl::STLMeshHelper::to_mesh().
void* CustomData_add_layer_anonymous | ( | struct CustomData * | data, |
int | type, | ||
eCDAllocType | alloctype, | ||
void * | layer, | ||
int | totelem, | ||
const struct AnonymousAttributeID * | anonymous_id | ||
) |
Referenced by blender::bke::add_generic_custom_data_layer().
void* CustomData_add_layer_named | ( | struct CustomData * | data, |
int | type, | ||
eCDAllocType | alloctype, | ||
void * | layer, | ||
int | totelem, | ||
const char * | name | ||
) |
Same as above but accepts a name.
Definition at line 2792 of file customdata.cc.
References customData_add_layer__internal(), CustomData_update_typemap(), data, CustomDataLayer::data, and type.
Referenced by add_customdata_cb(), blender::io::alembic::add_customdata_cb(), blender::bke::add_generic_custom_data_layer(), add_shapekey_layers(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_add_loop_tangent_named_layer_for_uv(), BKE_mesh_add_mface_layers(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_new_nomain_from_curve_displist(), BKE_pointcloud_add_default(), BKE_pointcloud_new_nomain(), BKE_remesh_reproject_vertex_paint(), BM_data_layer_add_named(), BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata_all_layers(), blender::bke::CurvesGeometry::CurvesGeometry(), CustomData_to_bmeshpoly(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), dynamicPaint_Modifier_apply(), ED_mesh_color_add(), ED_mesh_color_ensure(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_ensure(), ED_mesh_uv_add(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::ed::geometry::geometry_attribute_convert_exec(), blender::bke::get_mutable_attribute(), multires_unsubdivide_add_original_index_datalayers(), pointcloud_init_data(), blender::ed::curves::primitive_random_sphere(), sculpt_undo_set_active_layer(), and uvprojectModifier_do().
void CustomData_blend_read | ( | struct BlendDataReader * | reader, |
struct CustomData * | data, | ||
int | count | ||
) |
Definition at line 5215 of file customdata.cc.
References blend_read_mdisps(), blend_read_paint_mask(), BLO_read_data_address, CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_FLAG_NOFREE, CD_GRID_PAINT_MASK, CD_MDISPS, CLOG_WARN, count, CustomData_layer_ensure_data_exists(), CustomData_reset(), CustomData_update_typemap(), CustomData_verify_versions(), data, CustomDataLayer::data, CustomDataLayer::flag, LOG, CustomDataLayer::type, and UNLIKELY.
Referenced by curves_blend_read_data(), mesh_blend_read_data(), and pointcloud_blend_read_data().
void CustomData_bmesh_copy_data | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
void * | src_block, | ||
void ** | dest_block | ||
) |
void CustomData_bmesh_copy_data_exclude_by_type | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
void * | src_block, | ||
void ** | dest_block, | ||
eCustomDataMask | mask_exclude | ||
) |
Referenced by bm_edge_attrs_copy(), bm_face_attrs_copy(), bm_loop_attrs_copy(), and bm_vert_attrs_copy().
void CustomData_bmesh_free_block | ( | struct CustomData * | data, |
void ** | block | ||
) |
Definition at line 3665 of file customdata.cc.
References BLI_mempool_free(), CD_FLAG_NOFREE, data, LayerTypeInfo::free, layerType_getInfo(), offset, POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by bm_interp_face_free(), bm_kill_only_edge(), bm_kill_only_face(), bm_kill_only_loop(), bm_kill_only_vert(), BM_mesh_data_free(), CustomData_bmesh_alloc_block(), CustomData_bmesh_merge(), and update_data_blocks().
void CustomData_bmesh_free_block_data | ( | struct CustomData * | data, |
void * | block | ||
) |
Same as CustomData_bmesh_free_block but zero the memory rather than freeing.
Definition at line 3689 of file customdata.cc.
References CD_FLAG_NOFREE, data, LayerTypeInfo::free, layerType_getInfo(), offset, POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by bm_data_interp_from_elem(), bm_loop_create(), and bmo_inset_region_exec().
void CustomData_bmesh_free_block_data_exclude_by_type | ( | struct CustomData * | data, |
void * | block, | ||
eCustomDataMask | mask_exclude | ||
) |
A selective version of CustomData_bmesh_free_block_data.
Definition at line 3722 of file customdata.cc.
References CD_FLAG_NOFREE, CD_TYPE_AS_MASK, data, LayerTypeInfo::free, layerType_getInfo(), offset, POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by bm_edge_attrs_copy(), bm_face_attrs_copy(), bm_loop_attrs_copy(), and bm_vert_attrs_copy().
void* CustomData_bmesh_get | ( | const struct CustomData * | data, |
void * | block, | ||
int | type | ||
) |
Referenced by BKE_mesh_ensure_skin_customdata(), BM_elem_float_data_get(), BM_elem_float_data_set(), bm_extrude_disable_skin_root(), BM_vert_create(), BPy_BMEdge_CreatePyObject(), bpy_bmedge_dealloc(), BPy_BMFace_CreatePyObject(), bpy_bmface_dealloc(), BPy_BMLoop_CreatePyObject(), bpy_bmloop_dealloc(), BPy_BMVert_CreatePyObject(), bpy_bmvert_dealloc(), contarget_get_mesh_mat(), createTransMeshSkin(), edgetag_set_cb(), edgetag_test_cb(), HC_relaxation_iteration_uv(), laplacian_relaxation_iteration_uv(), output_frames(), partialvis_update_bmesh_verts(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), skin_loose_mark_clear_exec(), skin_radii_equalize_exec(), stitch_calculate_edge_normal(), stitch_calculate_island_snapping(), stitch_check_edges_stitchable(), stitch_check_uvs_stitchable(), stitch_island_calculate_edge_rotation(), stitch_process_data(), stitch_propagate_uv_final_position(), tc_mesh_skin_transdata_create(), uv_sculpt_stroke_apply(), and uv_sculpt_stroke_init().
void* CustomData_bmesh_get_layer_n | ( | const struct CustomData * | data, |
void * | block, | ||
int | n | ||
) |
Gets from the layer at physical index n
,
Referenced by EDBM_verts_mirror_cache_clear(), and EDBM_verts_mirror_get().
void* CustomData_bmesh_get_n | ( | const struct CustomData * | data, |
void * | block, | ||
int | type, | ||
int | n | ||
) |
bool CustomData_bmesh_has_free | ( | const struct CustomData * | data | ) |
A non bmesh version would have to check layer->data
.
Referenced by BM_mesh_data_free().
void CustomData_bmesh_init_pool | ( | struct CustomData * | data, |
int | totelem, | ||
char | htype | ||
) |
Definition at line 3541 of file customdata.cc.
References BLI_assert, BLI_assert_unreachable, BLI_mempool_create(), BLI_MEMPOOL_NOP, BM_EDGE, BM_FACE, BM_LOOP, bm_mesh_chunksize_default, BM_VERT, data, BMAllocTemplate::totedge, BMAllocTemplate::totface, BMAllocTemplate::totloop, and BMAllocTemplate::totvert.
Referenced by BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata(), BM_mesh_copy_init_customdata_all_layers(), BM_mesh_copy_init_customdata_from_mesh_array(), CustomData_bmesh_merge(), and update_data_blocks().
void CustomData_bmesh_interp | ( | struct CustomData * | data, |
const void ** | src_blocks, | ||
const float * | weights, | ||
const float * | sub_weights, | ||
int | count, | ||
void * | dst_block | ||
) |
Definition at line 4088 of file customdata.cc.
References copy_vn_fl(), count, CustomData_bmesh_interp_n(), data, ELEM, LayerTypeInfo::interp, layerType_getInfo(), MEM_freeN, MEM_malloc_arrayN, MEM_mallocN, CustomDataLayer::offset, POINTER_OFFSET, SOURCE_BUF_SIZE, and CustomDataLayer::type.
Referenced by BM_data_interp_face_vert_edge(), bm_data_interp_from_elem(), BM_face_interp_from_face_ex(), BM_face_split_edgenet(), bm_grid_fill_array(), BM_loop_interp_from_face(), bm_loop_interp_from_grid_boundary_2(), bm_loop_interp_from_grid_boundary_4(), BM_vert_collapse_faces(), and BM_vert_interp_from_face().
void CustomData_bmesh_interp_n | ( | struct CustomData * | data, |
const void ** | src_blocks, | ||
const float * | weights, | ||
const float * | sub_weights, | ||
int | count, | ||
void * | dst_block_ofs, | ||
int | n | ||
) |
Definition at line 4071 of file customdata.cc.
References BLI_assert, count, data, LayerTypeInfo::interp, layerType_getInfo(), and CustomDataLayer::type.
Referenced by bm_edge_collapse_loop_customdata(), bm_vert_loop_groups_data_layer_merge__single(), bm_vert_loop_groups_data_layer_merge_weights__single(), and CustomData_bmesh_interp().
bool CustomData_bmesh_merge | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
eCustomDataMask | mask, | ||
eCDAllocType | alloctype, | ||
struct BMesh * | bm, | ||
char | htype | ||
) |
BMesh version of CustomData_merge; merges the layouts of source and dest
, then goes through the mesh and makes sure all the custom-data blocks are consistent with the new layout.
Referenced by BM_mesh_bm_from_me().
void CustomData_bmesh_set | ( | const struct CustomData * | data, |
void * | block, | ||
int | type, | ||
const void * | source | ||
) |
void CustomData_bmesh_set_default | ( | struct CustomData * | data, |
void ** | block | ||
) |
Definition at line 3756 of file customdata.cc.
References CustomData_bmesh_alloc_block(), CustomData_bmesh_set_default_n(), and data.
Referenced by BM_edge_create(), BM_face_create(), bm_loop_create(), BM_vert_create(), pbvh_bmesh_vert_create(), and update_data_blocks().
void CustomData_bmesh_set_layer_n | ( | struct CustomData * | data, |
void * | block, | ||
int | n, | ||
const void * | source | ||
) |
Sets the data of the block at physical layer n. no real type checking is performed.
Definition at line 4054 of file customdata.cc.
References LayerTypeInfo::copy, CustomData_bmesh_get_layer_n(), data, dest, layerType_getInfo(), and LayerTypeInfo::size.
void CustomData_bmesh_set_n | ( | struct CustomData * | data, |
void * | block, | ||
int | type, | ||
int | n, | ||
const void * | source | ||
) |
Definition at line 4037 of file customdata.cc.
References LayerTypeInfo::copy, CustomData_bmesh_get_n(), data, dest, layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by BM_data_layer_copy().
void CustomData_bmesh_update_active_layers | ( | struct CustomData * | fdata, |
struct CustomData * | ldata | ||
) |
Definition at line 3508 of file customdata.cc.
References CD_MCOL, CD_MLOOPUV, CD_MTFACE, CD_PROP_BYTE_COLOR, CustomData_get_active_layer(), CustomData_get_clone_layer(), CustomData_get_render_layer(), CustomData_get_stencil_layer(), CustomData_has_layer(), CustomData_set_layer_active(), CustomData_set_layer_clone(), CustomData_set_layer_render(), and CustomData_set_layer_stencil().
Referenced by BKE_mesh_add_mface_layers(), and mesh_update_linked_customdata().
void CustomData_clear_layer_flag | ( | struct CustomData * | data, |
int | type, | ||
int | flag | ||
) |
Definition at line 2635 of file customdata.cc.
Referenced by mesh_wrapper_ensure_subdivision(), modifyMesh(), and triangulate_mesh().
void CustomData_copy | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
eCustomDataMask | mask, | ||
eCDAllocType | alloctype, | ||
int | totelem | ||
) |
Initializes a CustomData object with the same layer setup as source. mask is a bitfield where (mask & (1 << (layer type)))
indicates if a layer should be copied or not. alloctype must be one of the above.
Referenced by BKE_mesh_new_nomain_from_template_ex(), BKE_mesh_nomain_to_mesh(), BKE_pointcloud_new_for_eval(), BM_mesh_bm_from_me(), BM_mesh_bm_to_me(), BM_mesh_copy_init_customdata(), BM_mesh_copy_init_customdata_from_mesh_array(), blender::bke::copy_curves_geometry(), blender::bke::curves::copy_only_curve_domain(), curves_copy_data(), blender::bke::CustomDataAttributes::CustomDataAttributes(), DM_DupPolys(), DM_from_template(), loop_interpolation_init(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_copy_data(), blender::bke::CustomDataAttributes::operator=(), pointcloud_copy_data(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), SCULPT_dynamic_topology_disable_ex(), sculpt_undo_geometry_restore_data(), sculpt_undo_geometry_store_data(), and vertex_interpolation_init().
void CustomData_copy_data | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
int | source_index, | ||
int | dest_index, | ||
int | count | ||
) |
Copies data from one CustomData object to another objects need not be compatible, each source layer is copied to the first dest layer of correct type (if there is none, the layer is skipped).
Referenced by add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_polys_to_new_mesh(), arrayModifier_doArray(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_strip_loose_edges(), BKE_mesh_strip_loose_faces(), BKE_mesh_strip_loose_polysloops(), CDDM_copy(), copy_masked_edges_to_new_mesh(), copy_masked_polys_to_new_mesh(), copy_masked_vertices_to_new_mesh(), blender::geometry::create_merged_mesh(), blender::geometry::customdata_weld(), cutEdges(), DM_copy_vert_data(), explodeMesh(), get_dface(), loop_interpolation_from_corner(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_merge_transform(), MOD_solidify_extrude_modifyMesh(), modifyMesh(), set_ccgdm_all_geometry(), split_faces_split_new_edges(), split_faces_split_new_verts(), subdiv_copy_edge_data(), subdiv_copy_poly_data(), subdiv_vertex_data_copy(), subdivide_base(), and vertex_interpolation_from_corner().
void CustomData_copy_data_layer | ( | const CustomData * | source, |
CustomData * | dest, | ||
int | src_layer_index, | ||
int | dst_layer_index, | ||
int | src_index, | ||
int | dst_index, | ||
int | count | ||
) |
Definition at line 3094 of file customdata.cc.
References CLOG_WARN, LayerTypeInfo::copy, count, CustomDataLayer::data, dest, CustomData::layers, layerType_getInfo(), layerType_getName(), LOG, POINTER_OFFSET, LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by CustomData_copy_data(), CustomData_copy_data_named(), and CustomData_copy_layer_type_data().
void CustomData_copy_data_named | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
int | source_index, | ||
int | dest_index, | ||
int | count | ||
) |
Referenced by join_mesh_single().
Definition at line 3082 of file customdata.cc.
References LayerTypeInfo::copy, count, layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by bm_vert_loop_groups_data_layer_merge__single(), and bm_vert_loop_groups_data_layer_merge_weights__single().
void CustomData_copy_layer_type_data | ( | const struct CustomData * | source, |
struct CustomData * | destination, | ||
int | type, | ||
int | source_index, | ||
int | destination_index, | ||
int | count | ||
) |
Copies data of a single layer of a given type.
Referenced by copy_ccg_data(), and blender::geometry::customdata_weld().
Definition at line 4011 of file customdata.cc.
References LayerTypeInfo::add, data1, data2, layerType_getInfo(), and type.
Referenced by bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), bmo_pointmerge_facedata_exec(), and blender::geometry::customdata_weld().
Copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to another, while not overwriting anything else (e.g. flags). probably only implemented for mloopuv/mloopcol, for now.
Definition at line 3939 of file customdata.cc.
References CDT_MIX_NOMIX, LayerTypeInfo::copyvalue, dest, layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by bm_loop_customdata_merge(), bmo_average_vert_facedata_exec(), and bmo_collapsecon_do_layer().
Definition at line 3993 of file customdata.cc.
References data, LayerTypeInfo::dominmax, layerType_getInfo(), max, min, and type.
Referenced by bmo_average_vert_facedata_exec(), and bmo_collapsecon_do_layer().
Compares if data1 is equal to data2. type is a valid CustomData type enum (e.g. CD_MLOOPUV). the layer type's equal function is used to compare the data, if it exists, otherwise #memcmp is used.
Definition at line 3973 of file customdata.cc.
References data1, data2, LayerTypeInfo::equal, layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by bm_edge_collapse_loop_customdata(), BM_edge_is_contiguous_loop_cd(), bm_loop_customdata_merge(), bm_loop_walk_data(), bmw_UVEdgeWalker_step(), and contig_ldata_across_loops().
Definition at line 3984 of file customdata.cc.
References LayerTypeInfo::initminmax, layerType_getInfo(), max, min, and type.
Referenced by bmo_average_vert_facedata_exec(), and bmo_collapsecon_do_layer().
void CustomData_data_mix_value | ( | int | type, |
const void * | source, | ||
void * | dest, | ||
int | mixmode, | ||
float | mixfactor | ||
) |
Mixes the "value" (e.g. mloopuv uv or mloopcol colors) from one block into another, while not overwriting anything else (e.g. flags).
Definition at line 3955 of file customdata.cc.
References LayerTypeInfo::copyvalue, dest, layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by bm_loop_customdata_merge(), customdata_data_transfer_interp_generic(), and customdata_data_transfer_interp_normal_normals().
Definition at line 4002 of file customdata.cc.
References data, layerType_getInfo(), LayerTypeInfo::multiply, and type.
Referenced by bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), bmo_pointmerge_facedata_exec(), and blender::geometry::customdata_weld().
void CustomData_data_transfer | ( | const struct MeshPairRemap * | me_remap, |
const CustomDataTransferLayerMap * | laymap | ||
) |
Those functions assume src_n and dst_n layers of given type exist in resp. src and dst.
Referenced by BKE_object_data_transfer_ex().
void CustomData_debug_info_from_layers | ( | const struct CustomData * | data, |
const char * | indent, | ||
struct DynStr * | dynstr | ||
) |
Use to inspect mesh data when debugging.
Referenced by BKE_mesh_debug_info(), and BM_mesh_debug_info().
void* CustomData_duplicate_referenced_layer | ( | struct CustomData * | data, |
int | type, | ||
int | totelem | ||
) |
Duplicate data of a layer with flag NOFREE, and remove that flag.
Definition at line 2976 of file customdata.cc.
References customData_duplicate_referenced_layer_index(), CustomData_get_active_layer_index(), data, and type.
Referenced by blender::nodes::node_geo_set_material_cc::assign_material_to_faces(), BKE_mesh_transform(), BKE_mesh_translate(), BKE_mesh_vert_coords_apply(), BKE_mesh_vert_coords_apply_with_mat4(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_vgroups(), blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), mesh_calc_hq_normal(), blender::nodes::node_geo_flip_faces_cc::mesh_flip_faces(), MOD_solidify_extrude_modifyMesh(), modifyMesh(), normalEditModifier_do(), blender::nodes::node_geo_scale_elements_cc::scale_edges_on_axis(), blender::nodes::node_geo_scale_elements_cc::scale_edges_uniformly(), blender::nodes::node_geo_scale_elements_cc::scale_faces_on_axis(), blender::nodes::node_geo_scale_elements_cc::scale_faces_uniformly(), blender::bke::VertexGroupsAttributeProvider::try_delete(), blender::bke::BuiltinCustomDataLayerProvider::try_get_for_write(), and blender::bke::VertexGroupsAttributeProvider::try_get_for_write().
void* CustomData_duplicate_referenced_layer_anonymous | ( | CustomData * | data, |
int | type, | ||
const struct AnonymousAttributeID * | anonymous_id, | ||
int | totelem | ||
) |
void* CustomData_duplicate_referenced_layer_n | ( | struct CustomData * | data, |
int | type, | ||
int | n, | ||
int | totelem | ||
) |
Definition at line 2984 of file customdata.cc.
References customData_duplicate_referenced_layer_index(), CustomData_get_layer_index_n(), data, and type.
Referenced by data_transfer_layersmapping_cdlayers(), and data_transfer_layersmapping_cdlayers_multisrc_to_dst().
void* CustomData_duplicate_referenced_layer_named | ( | struct CustomData * | data, |
int | type, | ||
const char * | name, | ||
int | totelem | ||
) |
Definition at line 2995 of file customdata.cc.
References customData_duplicate_referenced_layer_index(), CustomData_get_named_layer_index(), data, and type.
Referenced by blender::bke::get_mutable_attribute(), modifyMesh(), blender::bke::BuiltinCustomDataLayerProvider::try_get_for_write(), blender::bke::CustomDataAttributeProvider::try_get_for_write(), blender::bke::NamedLegacyCustomDataProvider::try_get_for_write(), and uvprojectModifier_do().
void CustomData_duplicate_referenced_layers | ( | CustomData * | data, |
int | totelem | ||
) |
Duplicate all the layers with flag NOFREE, and remove the flag from duplicated layers.
Definition at line 3020 of file customdata.cc.
References customData_duplicate_referenced_layer_index(), data, and CustomDataLayer::data.
Referenced by BKE_mesh_split_faces(), blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), and blender::bke::CurvesGeometry::reverse_curves().
void CustomData_external_add | ( | struct CustomData * | data, |
struct ID * | id, | ||
int | type, | ||
int | totelem, | ||
const char * | filepath | ||
) |
Referenced by bm_corners_to_loops_ex(), and multires_external_save_exec().
void CustomData_external_read | ( | struct CustomData * | data, |
struct ID * | id, | ||
eCustomDataMask | mask, | ||
int | totelem | ||
) |
Definition at line 4547 of file customdata.cc.
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, CLOG_ERROR, customdata_external_filename(), data, CustomDataLayer::data, FILE_MAX, CustomDataLayer::flag, layerType_getInfo(), layerType_getName(), LOG, mask(), CustomDataLayer::name, LayerTypeInfo::read, CustomDataLayer::type, and update().
Referenced by convert_mfaces_to_mpolys(), CustomData_external_remove(), CustomData_external_write(), multires_ensure_external_read(), and multires_topology_changed().
void CustomData_external_reload | ( | struct CustomData * | data, |
struct ID * | id, | ||
eCustomDataMask | mask, | ||
int | totelem | ||
) |
Referenced by multires_force_external_reload().
void CustomData_external_remove | ( | struct CustomData * | data, |
struct ID * | id, | ||
int | type, | ||
int | totelem | ||
) |
Definition at line 4748 of file customdata.cc.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, CustomData_external_read(), CustomData_get_active_layer_index(), data, CustomDataLayer::flag, type, and CustomDataLayer::type.
Referenced by multires_customdata_delete(), and multires_external_pack_exec().
bool CustomData_external_test | ( | struct CustomData * | data, |
int | type | ||
) |
Definition at line 4772 of file customdata.cc.
References CD_FLAG_EXTERNAL, CustomData_get_active_layer_index(), data, CustomDataLayer::flag, and type.
Referenced by bm_corners_to_loops_ex(), multires_ensure_external_read(), multires_external_pack_exec(), multires_external_save_exec(), and multires_external_save_invoke().
void CustomData_external_write | ( | struct CustomData * | data, |
struct ID * | id, | ||
eCustomDataMask | mask, | ||
int | totelem, | ||
int | free | ||
) |
Definition at line 4620 of file customdata.cc.
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(), CLOG_ERROR, customdata_external_filename(), CustomData_external_read(), data, CustomDataLayer::data, FILE_MAX, LayerTypeInfo::filesize, CustomDataLayer::flag, free(), LayerTypeInfo::free, layerType_getInfo(), LOG, mask(), CustomDataLayer::name, LayerTypeInfo::size, CustomDataLayer::type, update(), and LayerTypeInfo::write.
Referenced by CustomData_blend_write(), and multires_external_save_exec().
void CustomData_file_write_info | ( | int | type, |
const char ** | r_struct_name, | ||
int * | r_struct_num | ||
) |
Query info over types.
Definition at line 4245 of file customdata.cc.
References layerType_getInfo(), LayerTypeInfo::structname, LayerTypeInfo::structnum, and type.
Referenced by CustomData_blend_write(), CustomData_debug_info_from_layers(), and CustomData_layers__print().
void CustomData_free | ( | struct CustomData * | data, |
int | totelem | ||
) |
Frees data associated with a CustomData object (doesn't free the object itself, though).
Definition at line 2373 of file customdata.cc.
References CustomData_external_free(), customData_free_layer__internal(), CustomData_reset(), data, and MEM_freeN.
Referenced by BKE_mesh_calc_edges(), BKE_mesh_calc_edges_tessface(), BKE_mesh_nomain_to_mesh(), BKE_pointcloud_new_for_eval(), BM_mesh_bm_to_me(), BM_mesh_data_free(), blender::bke::CustomDataAttributes::clear(), convert_mfaces_to_mpolys(), blender::bke::copy_curves_geometry(), DM_DupPolys(), DM_release(), ED_mesh_join_objects_exec(), blender::draw::extract_tan_ex_init(), blender::draw::extract_tan_init_subdiv(), loop_interpolation_end(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_clear_geometry(), mesh_tessface_calc(), mesh_tessface_clear_intern(), blender::bke::move_curves_geometry(), pointcloud_free_data(), SCULPT_dynamic_topology_disable_ex(), sculpt_undo_geometry_free_data(), sculpt_undo_geometry_restore_data(), vertex_interpolation_end(), blender::bke::CurvesGeometry::~CurvesGeometry(), and blender::bke::CustomDataAttributes::~CustomDataAttributes().
void CustomData_free_elem | ( | struct CustomData * | data, |
int | index, | ||
int | count | ||
) |
Frees data in a CustomData object.
Definition at line 3206 of file customdata.cc.
References CD_FLAG_NOFREE, count, data, LayerTypeInfo::free, layerType_getInfo(), offset, POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by BKE_mesh_strip_loose_edges(), BKE_mesh_strip_loose_faces(), BKE_mesh_strip_loose_polysloops(), loop_interpolation_from_corner(), mesh_remove_edges(), mesh_remove_loops(), mesh_remove_polys(), and mesh_remove_verts().
bool CustomData_free_layer | ( | struct CustomData * | data, |
int | type, | ||
int | totelem, | ||
int | index | ||
) |
Frees the active or first data layer with the give type. returns 1 on success, 0 if no layer with the given type is found
In edit-mode, use #EDBM_data_layer_free instead of this function.
Definition at line 2831 of file customdata.cc.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, BLI_assert, customData_free_layer__internal(), CustomData_get_layer_index(), CustomData_get_layer_index__notypemap(), CUSTOMDATA_GROW, customData_resize(), customData_update_offsets(), data, type, and CustomDataLayer::type.
Referenced by BKE_mesh_from_pointcloud(), BKE_object_facemap_clear(), BM_data_layer_free_n(), copy_ccg_data(), CustomData_free_layer_active(), CustomData_free_layer_named(), CustomData_free_layers(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), delete_customdata_layer(), mesh_validate_customdata(), multires_unsubdivide_free_original_datalayers(), blender::bke::CustomDataAttributes::remove(), blender::bke::BuiltinCustomDataLayerProvider::try_delete(), blender::bke::CustomDataAttributeProvider::try_delete(), and blender::bke::NamedLegacyCustomDataProvider::try_delete().
bool CustomData_free_layer_active | ( | struct CustomData * | data, |
int | type, | ||
int | totelem | ||
) |
Frees the layer index with the give type. returns 1 on success, 0 if no layer with the given type is found.
In edit-mode, use #EDBM_data_layer_free instead of this function.
Definition at line 2895 of file customdata.cc.
References CustomData_free_layer(), CustomData_get_active_layer_index(), data, and type.
Referenced by BKE_object_defgroup_remove_all_ex(), blo_do_versions_250(), BM_data_layer_free(), modifier_skin_customdata_delete(), multires_customdata_delete(), and object_defgroup_remove_common().
bool CustomData_free_layer_named | ( | struct CustomData * | data, |
const char * | name, | ||
const int | totelem | ||
) |
Definition at line 2883 of file customdata.cc.
References CustomData_free_layer(), data, CustomDataLayer::name, and CustomDataLayer::type.
Referenced by BM_data_layer_free_named(), blender::bke::CurvesGeometry::remove_attributes_based_on_types(), and blender::bke::BuiltinCustomDataLayerProvider::try_delete().
void CustomData_free_layers | ( | struct CustomData * | data, |
int | type, | ||
int | totelem | ||
) |
Same as above, but free all layers with type.
Definition at line 2904 of file customdata.cc.
References CustomData_free_layer(), CustomData_get_layer_index(), data, and type.
Referenced by BKE_mesh_clear_facemap_customdata(), BKE_mesh_split_faces(), blo_do_versions_260(), blo_do_versions_280(), BLO_update_defaults_startup_blend(), editbmesh_calc_modifier_final_normals(), geometry_extract_apply(), mesh_calc_modifier_final_normals(), mesh_calc_modifiers(), mesh_customdata_clear_exec__internal(), multires_create_grids_in_unsubdivided_base_mesh(), and paint_mask_slice_exec().
void CustomData_free_temporary | ( | struct CustomData * | data, |
int | totelem | ||
) |
Frees all layers with CD_FLAG_TEMPORARY.
Definition at line 3041 of file customdata.cc.
References CD_FLAG_TEMPORARY, customData_free_layer__internal(), CUSTOMDATA_GROW, customData_resize(), customData_update_offsets(), data, and CustomDataLayer::flag.
Referenced by DM_release().
void CustomData_free_typemask | ( | struct CustomData * | data, |
int | totelem, | ||
eCustomDataMask | mask | ||
) |
Same as above, but only frees layers which matches the given mask.
Definition at line 2387 of file customdata.cc.
References CD_TYPE_AS_MASK, CustomData_external_free(), customData_free_layer__internal(), CustomData_reset(), data, mask(), MEM_freeN, and CustomDataLayer::type.
Referenced by BKE_mesh_nomain_to_mesh().
void CustomData_from_bmesh_block | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
void * | src_block, | ||
int | dest_index | ||
) |
Referenced by BM_mesh_bm_to_me(), and BM_mesh_bm_to_me_for_eval().
void* CustomData_get | ( | const struct CustomData * | data, |
int | index, | ||
int | type | ||
) |
Gets a pointer to the data element at index from the first layer of type.
Referenced by bm_corners_to_loops_ex(), cloth_apply_vgroup(), join_mesh_single(), psys_face_mat(), and psys_get_dupli_texture().
int CustomData_get_active_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by BKE_mesh_calc_loop_tangent_step_0(), bpy_bmlayercollection_active_get(), bpy_bmlayercollection_verify(), CustomData_bmesh_do_versions_update_active_layers(), data_transfer_layersmapping_cdlayers(), ED_mesh_color_add(), ED_mesh_color_remove_active(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_remove_active(), ED_mesh_uv_add(), ED_mesh_uv_loop_reset(), ED_mesh_uv_remove_active(), blender::draw::extract_edituv_stretch_angle_init_subdiv(), blender::draw::extract_tan_init_common(), blender::io::alembic::get_uv_sample(), loop_to_vertex_colors_exec(), mesh_cd_calc_active_uv_layer(), blender::draw::mesh_extract_uv_format_init(), overlay_edit_uv_cache_populate(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), sculpt_vertex_color_remove_poll(), uv_texture_remove_poll(), vertex_color_remove_poll(), vertex_to_loop_colors_exec(), and blender::io::alembic::write_custom_data().
int CustomData_get_active_layer_index | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by InstanceWriter::add_material_bindings(), bake_object_check(), bc_CustomData_get_active_layer_name(), bc_get_active_UVLayer(), BKE_paint_canvas_uvmap_layer_index_get(), blo_do_versions_300(), GeometryExporter::create_mesh_primitive_list(), GeometryExporter::createTexcoordsSource(), get_active_layer(), GPU_pbvh_attribute_names_update(), and lineart_geometry_object_load().
const char* CustomData_get_active_layer_name | ( | const struct CustomData * | data, |
int | type | ||
) |
Returns name of the active layer of the given type or NULL if no such active layer is defined.
Referenced by get_mesh_active_uvlayer_name(), object_curves_empty_hair_add_exec(), and blender::ed::curves::surface_set::surface_set_exec().
int CustomData_get_clone_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
int CustomData_get_clone_layer_index | ( | const struct CustomData * | data, |
int | type | ||
) |
void* CustomData_get_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
Gets a pointer to the active or first layer of type.
Referenced by add_orco_mesh(), blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter(), bake_targets_populate_pixels_color_attributes(), base_skin(), BKE_keyblock_mesh_calc_normals(), BKE_mesh_calc_edges_tessface(), BKE_mesh_calc_loop_tangent_single(), BKE_mesh_calc_loop_tangents(), BKE_mesh_calc_normals_split_ex(), BKE_mesh_foreach_mapped_edge(), BKE_mesh_foreach_mapped_face_center(), BKE_mesh_foreach_mapped_loop(), BKE_mesh_foreach_mapped_subdiv_face_center(), BKE_mesh_foreach_mapped_vert(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_nomain_to_mesh(), BKE_mesh_polygon_flip(), BKE_mesh_polygon_flip_ex(), BKE_mesh_polygons_flip(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remesh_reproject_paint_mask(), BKE_mesh_update_customdata_pointers(), BKE_object_as_kdtree(), BKE_object_data_transfer_ex(), BKE_remesh_reproject_sculpt_face_sets(), BKE_remesh_reproject_vertex_paint(), BKE_sculpt_ensure_orig_mesh_data(), BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(), BKE_sculpt_mask_layers_ensure(), BKE_sculpt_multires_active(), BKE_sculpt_sync_face_sets_visibility_to_base_mesh(), BKE_sculpt_sync_face_sets_visibility_to_grids(), BKE_shrinkwrap_init_tree(), BKE_subdiv_ccg_mask_init_from_paint(), blo_do_versions_280(), CDDM_copy(), cdDM_from_mesh_ex(), cloth_from_object(), blender::draw::compute_area_ratio(), contarget_get_mesh_mat(), context_init_grid_pointers(), convert_mfaces_to_mpolys(), GeometryExporter::create_normals(), createFacepa(), data_transfer_dtdata_type_postprocess(), data_transfer_dtdata_type_preprocess(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_generate(), data_transfer_layersmapping_vgroups(), deformVerts(), deformVerts_do(), displacement_init_data(), displaceModifier_do(), DM_get_edge_data_layer(), DM_get_loop_data_layer(), DM_get_poly_data_layer(), DM_get_vert_data_layer(), dm_getEdgeArray(), dm_getLoopArray(), dm_getPolyArray(), dm_getVertArray(), draw_subdiv_topology_info_cb(), DRW_mesh_batch_cache_create_requested(), dynamicPaint_Modifier_apply(), ED_draw_object_facemap(), ED_mesh_pick_face_vert(), ED_mesh_sculpt_color_add(), ED_object_facemap_face_add(), ED_object_facemap_face_remove(), ED_operator_uvmap_mesh(), ED_sculpt_face_sets_find_next_available_id(), ED_sculpt_face_sets_initialize_none_to_id(), editbmesh_calc_modifiers(), ensure_corner_normal_layer(), ensure_displacement_grids(), ensure_mask_grids(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::bke::BuiltinCustomDataLayerProvider::exists(), blender::draw::extract_edituv_stretch_angle_init(), blender::draw::extract_fdots_uv_init(), blender::draw::extract_orco_init(), blender::draw::extract_pos_nor_init_subdiv(), blender::draw::extract_sculpt_data_init(), blender::draw::extract_sculpt_data_init_subdiv(), blender::draw::extract_tan_init_common(), blender::draw::extract_weights_init(), final_skin(), blender::render::texturemargin::generate_margin(), get_levels_from_disps(), blender::io::alembic::get_loop_normals(), blender::nodes::node_geo_extrude_mesh_cc::get_orig_index_layer(), blender::io::obj::OBJMesh::get_poly_deform_group_index(), blender::io::usd::get_vert_creases(), blender::io::alembic::get_vert_creases(), get_vertex_group(), give_parvert(), imapaint_pick_uv(), blender::io::obj::obj_importer_test::import_and_check(), init_user_data(), Freestyle::BlenderFileLoader::insertShapeNode(), lattice_deform_coords_impl(), loop_to_vertex_colors_exec(), make_duplis_faces(), make_duplis_verts(), mask_init_data(), mesh_calc_modifiers(), mesh_calc_tri_tessface(), mesh_ensure_cdlayers_primary(), mesh_init_origspace(), mesh_join_offset_face_sets_ID(), mesh_loops_to_tessdata(), mesh_merge_transform(), mesh_render_data_create(), mesh_render_data_update_normals(), mesh_set_custom_normals(), mesh_tessface_calc(), mesh_wrapper_ensure_subdivision(), MOD_solidify_extrude_modifyMesh(), modifier_skin_armature_create(), modifyMesh(), multires_apply_smat(), multires_apply_uniform_scale(), multires_del_higher(), multires_ensure_external_read(), multires_modifier_update_hidden(), multires_modifier_update_mdisps(), multires_output_hidden_to_ccgdm(), multires_reshape_context_create_from_object(), multires_set_tot_mdisps(), multires_subdivide_create_object_space_linear_grids(), multires_topology_changed(), multiresModifier_del_levels(), multiresModifier_disp_run(), multiresModifier_set_levels_from_disps(), normalEditModifier_do(), object_fmap_remap_object_mode(), object_fmap_remove_object_mode(), paint_mask_slice_exec(), paintface_flush_flags(), paintvert_flush_flags(), partialvis_update_mesh(), pbvh_has_face_sets(), pbvh_has_mask(), pbvh_update_draw_buffer_cb(), pbvh_vertex_iter_init(), pointdensity_cache_vertex_weight(), polygons_check_flip(), proj_paint_face_lookup_init(), proj_paint_layer_clone_init(), project_paint_begin(), project_paint_clone_face_skip(), project_paint_prepare_all_faces(), psys_calc_dmcache(), psys_face_mat(), psys_map_index_on_dm(), psys_mat_hair_to_orco(), psys_particle_dm_face_lookup(), psys_particle_on_dm(), psys_thread_context_init_distribute(), RE_bake_pixels_populate(), blender::io::alembic::read_generated_coordinates(), SCULPT_dynamic_topology_disable_ex(), sculpt_gesture_trim_end(), sculpt_undo_face_sets_push(), sculpt_undo_restore_face_sets(), sculpt_update_object(), set_ccgdm_all_geometry(), set_vertex_data_from_orco(), blender::io::obj::OBJMesh::store_normal_coords_and_indices(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), subdiv_mesh_ctx_cache_custom_data_layers(), subdivide_base(), triangulate_mesh(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::bke::BuiltinCustomDataLayerProvider::try_create(), blender::bke::pbvh::pixels::update_pixels(), vertex_to_loop_colors_exec(), weightvg_do_mask(), and blender::io::alembic::write_generated_coordinates().
int CustomData_get_layer_index | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by bc_CustomData_get_layer_name(), bevel_set_weighted_normal_face_strength(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_calc_loop_tangent_step_0(), BKE_sculpt_color_layer_create_if_needed(), bmo_get_loop_color_ref(), bpy_bmlayercollection_items(), bpy_bmlayercollection_keys(), bpy_bmlayercollection_values(), copy_ccg_data(), delete_customdata_layer(), do_multires_bake(), ED_mesh_color_ensure(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), blender::draw::extract_tan_init_common(), lineart_geometry_object_load(), SCULPT_dyntopo_node_layers_add(), and blender::bke::BuiltinCustomDataLayerProvider::try_delete().
int CustomData_get_layer_index_n | ( | const struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Referenced by add_shapekey_layers(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BM_data_layer_free_n(), BM_mesh_bm_from_me(), bpy_bmlayeritem_get(), GeometryExporter::create_mesh_primitive_list(), GeometryExporter::createTexcoordsSource(), ED_mesh_color_remove_index(), ED_mesh_sculpt_color_remove_index(), ED_mesh_uv_remove_index(), and shapekey_layers_to_keyblocks().
void* CustomData_get_layer_n | ( | const struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Referenced by arrayModifier_doArray(), BKE_mesh_merge_customdata_for_apply_modifier(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_subdiv_eval_refine_from_mesh(), GeometryExporter::createTexcoordsSource(), GeometryExporter::createVertexColorSource(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), ED_mesh_uv_loop_reset_ex(), blender::draw::extract_tan_ex_init(), blender::draw::extract_tan_init_subdiv(), blender::draw::extract_uv_init(), blender::draw::fill_vertbuf_with_attribute(), blender::render::texturemargin::generate_margin(), blender::io::alembic::get_uv_sample(), loop_to_vertex_colors_exec(), make_duplis_faces(), mesh_loops_to_tessdata(), modifyMesh(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), precalc_uv_layer(), proj_paint_layer_clone_init(), project_paint_begin(), psys_get_dupli_texture(), RE_bake_pixels_populate(), remap_uvs_15(), remap_uvs_19_21_22(), remap_uvs_23(), remap_uvs_3_6_9_12(), remap_uvs_5_10(), remap_uvs_7_11_13_14(), set_subsurf_legacy_uv(), shapekey_layers_to_keyblocks(), subdiv_mesh_ctx_cache_uv_layers(), vertex_to_loop_colors_exec(), and blender::io::alembic::write_custom_data().
const char* CustomData_get_layer_name | ( | const struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Referenced by BKE_mesh_calc_loop_tangent_step_0(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), dt_add_vcol_layers(), dt_layers_select_src_itemf(), blender::draw::extract_tan_init_common(), blender::io::alembic::get_uv_sample(), blender::draw::mesh_extract_uv_format_init(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), and blender::io::alembic::write_custom_data().
void* CustomData_get_layer_named | ( | const struct CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Referenced by add_customdata_cb(), blender::io::alembic::add_customdata_cb(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_calc_loop_tangent_single(), dynamicPaint_createUVSurface(), dynamicPaint_Modifier_apply(), dynamicPaint_setInitialColor(), blender::bke::BuiltinCustomDataLayerProvider::exists(), explodeMesh(), blender::draw::extract_tan_ex_init(), blender::draw::extract_tan_init_subdiv(), get_particle_uv(), blender::bke::get_span_attribute(), blender::bke::get_varray_attribute(), imapaint_pick_uv(), MOD_get_texture_coords(), modifyMesh(), multires_unsubdivide_extract_grids(), multires_unsubdivide_prepare_original_bmesh_for_extract(), pointcloud_batch_cache_ensure_pos(), pointdensity_cache_vertex_color(), project_paint_clone_face_skip(), project_paint_prepare_all_faces(), and blender::bke::BuiltinCustomDataLayerProvider::try_create().
void* CustomData_get_n | ( | const struct CustomData * | data, |
int | type, | ||
int | index, | ||
int | n | ||
) |
Referenced by bm_corners_to_loops_ex().
int CustomData_get_n_offset | ( | const struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Referenced by bev_merge_edge_uvs(), bev_merge_uvs(), bevel_set_weighted_normal_face_strength(), BKE_editmesh_loop_tangent_calc(), bm_edge_delimit_cdata(), BM_mesh_decimate_dissolve_ex(), bm_to_mesh_shape(), bmo_subd_init_shape_info(), ED_mesh_uv_loop_reset_ex(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), blender::draw::extract_uv_init(), blender::draw::fill_vertbuf_with_attribute_bm(), make_duplis_faces(), multires_unsubdivide_extract_grids(), and SCULPT_dyntopo_node_layers_add().
int CustomData_get_named_layer | ( | const struct CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Referenced by bake(), bpy_bmlayercollection_subscript_str(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), drw_custom_data_match_attribute(), ED_mesh_color_remove_named(), ED_mesh_sculpt_color_remove_named(), ED_mesh_uv_remove_named(), blender::render::texturemargin::generate_margin(), mesh_cd_calc_used_gpu_layers(), RE_bake_pixels_populate(), and request_attribute().
int CustomData_get_named_layer_index | ( | const struct CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Referenced by bevel_set_weighted_normal_face_strength(), BKE_editmesh_loop_tangent_calc(), BKE_id_attribute_new(), BKE_mesh_add_loop_tangent_named_layer_for_uv(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_from_pointcloud(), BKE_paint_canvas_uvmap_layer_index_get(), BKE_remesh_reproject_vertex_paint(), bpy_bmlayercollection_contains(), dynamicPaint_outputLayerExists(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), multires_unsubdivide_extract_grids(), multires_unsubdivide_free_original_datalayers(), and SCULPT_dyntopo_node_layers_add().
int CustomData_get_offset | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by armature_deform_coords_impl(), bevel_harden_normals(), BKE_object_defgroup_clear(), BKE_pbvh_bmesh_update_topology(), BKE_view_layer_filter_edit_mesh_has_uvs(), BM_custom_loop_normals_from_vector_layer(), BM_custom_loop_normals_to_vector_layer(), BM_edge_split(), BM_face_interp_multires(), BM_face_multires_bounds_smooth(), BM_face_normal_flip(), BM_face_split(), BM_face_triangulate(), BM_faces_join(), BM_faces_join_pair(), BM_lnorspace_err(), BM_lnorspace_rebuild(), BM_lnorspacearr_store(), BM_log_all_added(), BM_log_before_all_removed(), bm_log_faces_restore(), bm_log_vert_values_swap(), bm_log_verts_restore(), bm_log_verts_unmake(), BM_loop_interp_multires(), BM_loop_normal_editdata_array_init(), BM_mesh_bm_from_me(), BM_mesh_bm_to_me(), BM_mesh_bm_to_me_for_eval(), BM_mesh_calc_uvs_cube(), BM_mesh_remap(), BM_mesh_wireframe(), bm_to_mesh_shape(), bm_to_mesh_vertex_map(), BM_uv_element_map_create(), BM_uv_vert_map_create(), BMD_mesh_bm_create(), bmo_create_circle_exec(), bmo_create_cone_exec(), bmo_create_cube_exec(), bmo_create_grid_exec(), bmo_create_icosphere_exec(), bmo_create_monkey_exec(), bmo_create_uvsphere_exec(), bmo_poke_exec(), bmo_reverse_faces_exec(), bmo_reverse_uvs_exec(), bmo_rotate_uvs_exec(), bmo_subd_init_shape_info(), bmo_transform_exec(), blender::draw::compute_area_ratio(), construct_param_edge_set_seams(), construct_param_handle(), construct_param_handle_multi(), construct_param_handle_subsurfed(), correct_uv_aspect(), correct_uv_aspect_per_face(), createTransEdge(), createTransMeshVertCData(), createTransUVs(), curve_deform_coords_impl(), cylinder_project_exec(), deformVerts_do(), do_lasso_select_mesh_uv(), ED_mesh_active_dvert_get_em(), ED_uvedit_ensure_uvs(), ED_uvedit_median_multi(), ED_uvedit_minmax_multi(), ED_uvedit_pack_islands_multi(), ED_uvedit_select_all(), ED_uvedit_selected_edges(), ED_uvedit_selected_faces(), ED_uvedit_selected_verts(), ED_uvedit_selectmode_clean(), ED_uvedit_selectmode_flush(), ED_vgroup_mirror(), ED_vgroup_parray_alloc(), ED_vgroup_vert_active_mirror(), edbm_average_normals_exec(), edbm_decimate_exec(), EDBM_select_pick(), edbm_select_ungrouped_exec(), edbm_select_ungrouped_poll(), edbm_set_normals_from_faces_exec(), blender::draw::extract_edituv_data_init_common(), blender::draw::extract_edituv_stretch_angle_init(), blender::draw::extract_fdots_edituv_data_init(), blender::draw::extract_fdots_uv_init(), blender::draw::extract_sculpt_data_init(), blender::draw::extract_skin_roots_init(), blender::draw::extract_weights_init(), face_map_assign_exec(), face_map_remove_from_exec(), fmap_select(), geometry_extract_tag_face_set(), geometry_extract_tag_masked_faces(), get_vert_def_nr(), get_weights_array(), GPU_pbvh_bmesh_buffers_update(), lattice_deform_coords_impl(), mesh_render_data_create(), mesh_render_data_update_normals(), normals_split(), object_defgroup_remove_edit_mode(), object_fmap_remap_edit_mode(), object_fmap_remove_edit_mode(), overlay_edit_mesh_add_ob_to_pass(), pbvh_has_mask(), pbvh_vertex_iter_init(), return_editmesh_vgroup(), sculpt_face_sets_init_face_set_boundary_test(), sculpt_face_sets_init_loop(), SCULPT_vertex_mask_get(), select_linked_delimit_begin(), similar_face_select_exec(), similar_vert_select_exec(), skin_root_mark_exec(), slice_paint_mask(), smart_project_exec(), sphere_project_exec(), stitch_init(), stitch_propagate_uv_final_position(), tc_mesh_customdatacorrect_init_container_generic(), uv_box_select_exec(), uv_circle_select_exec(), uv_find_nearest_edge(), uv_find_nearest_face_ex(), uv_find_nearest_loop_from_edge(), uv_find_nearest_loop_from_vert(), uv_find_nearest_vert(), uv_from_view_exec(), uv_hide_exec(), uv_map_clip_correct_multi(), uv_map_mirror(), uv_mark_seam_exec(), uv_mouse_select_multi(), uv_pin_exec(), uv_remove_doubles_to_selected(), uv_remove_doubles_to_unselected(), uv_reveal_exec(), uv_rip_object(), uv_seams_from_islands_exec(), uv_select_all(), uv_select_edgeloop(), uv_select_edgering(), uv_select_faceloop(), uv_select_flush_from_loop_edge_flag(), uv_select_flush_from_tag_face(), uv_select_flush_from_tag_loop(), uv_select_invert(), uv_select_linked_multi(), uv_select_more_less(), uv_select_overlap(), uv_select_pinned_exec(), uv_select_similar_edge_exec(), uv_select_similar_face_exec(), uv_select_similar_vert_exec(), uv_select_split_exec(), uv_set_connectivity_distance(), uv_shortest_path_pick_exec(), uv_shortest_path_pick_invoke(), uv_shortest_path_select_exec(), uv_snap_uvs_offset(), uv_snap_uvs_to_adjacent_unselected(), uv_snap_uvs_to_cursor(), uv_snap_uvs_to_pixels(), uv_weld_align(), uvedit_center(), uvedit_deselect_flush(), uvedit_have_selection(), uvedit_nearest_uv(), uvedit_select_flush(), uvedit_select_is_any_selected(), uvedit_translate(), uvedit_unwrap_cube_project(), uvedit_uv_align_weld(), uvedit_uv_straighten(), v3d_editvertex_buts(), vgroup_assign_verts(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_do_remap(), vgroup_normalize_active_vertex(), and vgroup_select_verts().
int CustomData_get_offset_named | ( | const CustomData * | data, |
int | type, | ||
const char * | name | ||
) |
Definition at line 3419 of file customdata.cc.
References CustomData_get_named_layer_index(), data, and type.
Referenced by bake_targets_output_vertex_colors().
int CustomData_get_render_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by BKE_mesh_calc_loop_tangent_step_0(), CustomData_bmesh_do_versions_update_active_layers(), blender::draw::extract_tan_init_common(), make_duplis_faces(), mesh_cd_calc_used_gpu_layers(), blender::draw::mesh_extract_uv_format_init(), particle_batch_cache_ensure_procedural_strand_data(), and psys_get_dupli_texture().
int CustomData_get_render_layer_index | ( | const struct CustomData * | data, |
int | type | ||
) |
Referenced by blo_do_versions_300(), and get_render_layer().
int CustomData_get_stencil_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
int CustomData_get_stencil_layer_index | ( | const struct CustomData * | data, |
int | type | ||
) |
bool CustomData_has_interp | ( | const struct CustomData * | data | ) |
Referenced by bm_grid_fill_array(), and BM_mesh_decimate_collapse().
bool CustomData_has_layer | ( | const struct CustomData * | data, |
int | type | ||
) |
Returns true if a layer with the specified type exists.
Referenced by arrayModifier_doArray(), BKE_editmesh_lnorspace_update(), BKE_mesh_clear_facemap_customdata(), BKE_mesh_ensure_facemap_customdata(), BKE_mesh_ensure_skin_customdata(), BKE_mesh_has_custom_loop_normals(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_nomain_to_mesh(), BKE_mesh_orco_ensure(), BKE_mesh_remesh_reproject_paint_mask(), BKE_remesh_reproject_sculpt_face_sets(), BKE_sculpt_color_layer_create_if_needed(), BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(), BKE_sculpt_mask_layers_ensure(), BKE_subdiv_displacement_attach_from_multires(), BKE_subsurf_modifier_use_custom_loop_normals(), bm_corners_to_loops_ex(), BM_custom_loop_normals_from_vector_layer(), BM_custom_loop_normals_to_vector_layer(), BM_lnorspacearr_store(), BM_loop_normal_editdata_array_init(), BM_mesh_bm_from_me(), BM_mesh_cd_flag_apply(), BM_mesh_cd_flag_from_bmesh(), bmesh_edit_begin(), bmesh_edit_end(), bmo_extrude_edge_only_exec(), bmo_extrude_face_region_exec(), bmo_extrude_vert_indiv_exec(), bpy_bmesh_dealloc(), bpy_bmlayercollection_new(), cdDM_from_mesh_ex(), contarget_get_mesh_mat(), copy_ccg_data(), GeometryExporter::create_normals(), createTransMeshSkin(), CustomData_bmesh_do_versions_update_active_layers(), displaceModifier_do(), DM_DupPolys(), draw_subdiv_create_requested_buffers(), draw_subdiv_invalidate_evaluator_for_orco(), dynamicPaint_createUVSurface(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_ensure(), ED_mesh_uv_loop_reset_ex(), ED_uvedit_ensure_uvs(), edbm_flip_normals_custom_loop_normals(), EDBM_uv_check(), EDBM_vert_color_check(), edgetag_ensure_cd_flag(), editbmesh_calc_modifier_final_normals(), editbmesh_calc_modifiers(), ensure_corner_normal_layer(), ensure_orig_index_layer(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), GeometryExporter::export_key_mesh(), face_map_assign_exec(), face_map_remove_from_exec(), flip_custom_normals_init_data(), fmap_select(), blender::io::alembic::get_loop_normals(), get_mesh_evaluator_settings(), give_parvert(), GPU_pbvh_attribute_names_update(), blender::io::obj::obj_importer_test::import_and_check(), Freestyle::BlenderFileLoader::insertShapeNode(), math_layer_info_init(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_calc_modifier_final_normals(), mesh_calc_modifiers(), mesh_customdata_clear_exec__internal(), mesh_customdata_mask_clear_poll(), mesh_customdata_skin_state(), mesh_has_modifier_final_normals(), mesh_loops_to_tessdata(), MOD_get_texture_coords(), modifyGeometry(), modifyMesh(), multires_ccg_settings_init(), multires_create_grids_in_unsubdivided_base_mesh(), multires_customdata_delete(), multires_modifier_update_mdisps(), multires_subdivide_create_tangent_displacement_linear_grids(), multiresModifier_disp_run(), multiresModifier_subdivide_to_level(), object_fmap_remap_object_mode(), object_fmap_remove_object_mode(), GeometryExporter::operator()(), paint_sample_color(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), pointdensity_cache_vertex_color(), proj_paint_state_mesh_eval_init(), blender::io::alembic::read_generated_coordinates(), SCULPT_dynamic_topology_disable_ex(), sculpt_face_sets_ensure(), sculpt_update_object(), select_linked_delimit_validate(), shape_itemf(), shape_propagate(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), skin_armature_create_exec(), skin_loose_mark_clear_exec(), skin_radii_equalize_exec(), tc_mesh_customdatacorrect_create_impl(), uvedit_unwrap(), uvprojectModifier_do(), vgroup_assign_verts(), workbench_color_type_get(), and blender::io::alembic::write_custom_data().
bool CustomData_has_math | ( | const struct CustomData * | data | ) |
Checks if any of the custom-data layers has math.
Referenced by BM_face_split_edgenet(), BM_mesh_decimate_collapse(), bmo_collapse_uvs_exec(), bmo_inset_region_exec(), tc_mesh_customdatacorrect_create_impl(), and tc_mesh_customdatacorrect_init_container_merge_group().
bool CustomData_has_referenced | ( | const struct CustomData * | data | ) |
Checks if any of the custom-data layers is referenced.
Referenced by BKE_mesh_nomain_to_mesh().
void CustomData_interp | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
const int * | src_indices, | ||
const float * | weights, | ||
const float * | sub_weights, | ||
int | count, | ||
int | dest_index | ||
) |
Interpolate given custom data source items into a single destination one.
src_indices | Indices of every source items to interpolate into the destination one. |
weights | The weight to apply to each source value individually. If NULL, they will be averaged. |
sub_weights | The weights of sub-items, only used to affect each corners of a tessellated face data (should always be and array of four values). |
count | The number of source items to interpolate. |
dest_index | Index of the destination item, in which to put the result of the interpolation. |
Referenced by add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_polys_to_new_mesh(), BKE_remesh_reproject_vertex_paint(), blender::geometry::customdata_weld(), DM_interp_vert_data(), loop_interpolation_from_corner(), loop_interpolation_init(), set_ccgdm_all_geometry(), subdiv_interpolate_loop_data(), subdiv_mesh_vertex_of_loose_edge_interpolate(), subdiv_vertex_data_interpolate(), vertex_interpolation_from_corner(), and vertex_interpolation_init().
bool CustomData_is_referenced_layer | ( | struct CustomData * | data, |
int | type | ||
) |
Definition at line 3028 of file customdata.cc.
References CD_FLAG_NOFREE, CustomData_get_active_layer_index(), data, CustomDataLayer::flag, and type.
bool CustomData_layer_has_interp | ( | const struct CustomData * | data, |
int | layer_n | ||
) |
Referenced by blender::geometry::customdata_weld().
bool CustomData_layer_has_math | ( | const struct CustomData * | data, |
int | layer_n | ||
) |
Checks if the layer at physical offset layer_n (in data->layers) support math the below operations.
Referenced by bm_edge_collapse_loop_customdata(), bm_loop_customdata_merge(), bmo_average_vert_facedata_exec(), bmo_collapse_uvs_exec(), bmo_pointmerge_facedata_exec(), contig_ldata_across_edge(), blender::geometry::customdata_weld(), and tc_mesh_customdatacorrect_init_container_merge_group().
bool CustomData_layer_validate | ( | struct CustomDataLayer * | layer, |
uint | totitems, | ||
bool | do_fixes | ||
) |
Validate and fix data of layer, if possible (needs relevant callback in layer's type to be defined).
Definition at line 4468 of file customdata.cc.
References BLI_assert, CustomData_layer_ensure_data_exists(), CustomDataLayer::data, layerType_getInfo(), MEM_allocN_len, LayerTypeInfo::size, CustomDataLayer::type, and LayerTypeInfo::validate.
Referenced by mesh_validate_customdata().
void CustomData_layers__print | ( | struct CustomData * | data | ) |
Definition at line 4488 of file customdata.cc.
References CustomData_file_write_info(), CustomData_layertype_name(), CustomData_sizeof(), data, CustomDataLayer::data, MEM_allocN_len, size(), and CustomDataLayer::type.
bool CustomData_layertype_is_dynamic | ( | int | type | ) |
Has dynamically allocated members. This is useful to know if operations such as #memcmp are valid when comparing data from two layers.
Definition at line 4286 of file customdata.cc.
References LayerTypeInfo::free, layerType_getInfo(), and type.
Referenced by um_arraystore_cd_compact().
bool CustomData_layertype_is_singleton | ( | int | type | ) |
Can only ever be one of these.
Definition at line 4280 of file customdata.cc.
References LayerTypeInfo::defaultname, layerType_getInfo(), and type.
Referenced by bpy_bmlayercollection_is_singleton_get(), bpy_bmlayercollection_new(), data_transfer_layersmapping_cdlayers(), mesh_customdata_clear_exec__internal(), and mesh_validate_customdata().
int CustomData_layertype_layers_max | ( | int | type | ) |
Definition at line 4293 of file customdata.cc.
References LayerTypeInfo::defaultname, LayerTypeInfo::layers_max, layerType_getInfo(), and type.
Referenced by CustomData_merge().
const char* CustomData_layertype_name | ( | int | type | ) |
Get the name of a layer type.
Definition at line 4275 of file customdata.cc.
References layerType_getName(), and type.
Referenced by CustomData_debug_info_from_layers(), and CustomData_layers__print().
void customData_mask_layers__print | ( | const struct CustomData_MeshMasks * | mask | ) |
bool CustomData_merge | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
eCustomDataMask | mask, | ||
eCDAllocType | alloctype, | ||
int | totelem | ||
) |
Same as the above, except that this will preserve existing layers, and only add the layers that were not there yet.
Referenced by BKE_mesh_from_pointcloud(), BKE_pointcloud_from_mesh(), BM_mesh_bm_to_me_for_eval(), BM_mesh_copy_init_customdata_from_mesh_array(), cdDM_from_mesh_ex(), and join_mesh_single().
bool CustomData_MeshMasks_are_matching | ( | const CustomData_MeshMasks * | mask_ref, |
const CustomData_MeshMasks * | mask_required | ||
) |
Return True if all layers set in mask_required are also set in mask_ref
Definition at line 87 of file customdata.cc.
References CustomData_MeshMasks::emask, CustomData_MeshMasks::fmask, CustomData_MeshMasks::lmask, CustomData_MeshMasks::pmask, and CustomData_MeshMasks::vmask.
Referenced by BKE_object_data_transfer_ex(), editbmesh_get_eval_cage(), mesh_get_eval_deform(), and mesh_get_eval_final().
void CustomData_MeshMasks_update | ( | CustomData_MeshMasks * | mask_dst, |
const CustomData_MeshMasks * | mask_src | ||
) |
Update mask_dst with layers defined in mask_src (equivalent to a bit-wise OR).
Definition at line 77 of file customdata.cc.
References CustomData_MeshMasks::emask, CustomData_MeshMasks::fmask, CustomData_MeshMasks::lmask, CustomData_MeshMasks::pmask, and CustomData_MeshMasks::vmask.
Referenced by BKE_modifier_calc_data_masks(), BKE_object_handle_data_update(), BM_mesh_bm_from_me(), BM_mesh_bm_to_me(), BM_mesh_bm_to_me_for_eval(), duplibase_for_convert(), ED_view3d_screen_datamask(), editbmesh_calc_modifiers(), mesh_calc_modifiers(), mesh_copy_data(), mesh_get_eval_deform(), mesh_get_eval_final(), object_convert_exec(), screen_opengl_render_init(), and wm_event_do_depsgraph().
int CustomData_number_of_layers | ( | const struct CustomData * | data, |
int | type | ||
) |
Returns the number of layers with this type.
Referenced by InstanceWriter::add_material_bindings(), arrayModifier_doArray(), bc_get_active_uvlayer_name(), bc_get_uvlayer_name(), bev_merge_edge_uvs(), bev_merge_uvs(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_calc_loop_tangent_step_0(), BKE_mesh_merge_customdata_for_apply_modifier(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_validate_all_customdata(), BKE_subdiv_eval_refine_from_mesh(), bm_edge_delimit_cdata(), BM_mesh_bm_from_me(), BM_mesh_decimate_dissolve_ex(), bmo_mirror_exec(), bmo_subd_init_shape_info(), bmo_transform_exec(), bpy_bmlayercollection_items(), bpy_bmlayercollection_keys(), bpy_bmlayercollection_length(), bpy_bmlayercollection_new(), bpy_bmlayercollection_values(), convert_mfaces_to_mpolys(), GeometryExporter::create_mesh_primitive_list(), GeometryExporter::createTexcoordsSource(), GeometryExporter::createVertexColorSource(), cutEdges(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), dt_add_vcol_layers(), dt_layers_select_src_itemf(), ED_mesh_color_add(), ED_mesh_sculpt_color_add(), ED_mesh_uv_add(), ED_mesh_uv_ensure(), ED_paint_proj_mesh_data_check(), edbm_blend_from_shape_exec(), get_num_uv_layers(), getActiveUVLayerName(), mesh_ensure_tessellation_customdata(), mesh_loops_to_tessdata(), mesh_validate_customdata(), modifyMesh(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), set_ccgdm_all_geometry(), shape_propagate(), shapekey_layers_to_keyblocks(), skin_smooth_hulls(), subdiv_mesh_ctx_cache_uv_layers(), and blender::io::alembic::write_custom_data().
int CustomData_number_of_layers_typemask | ( | const struct CustomData * | data, |
eCustomDataMask | mask | ||
) |
Referenced by BKE_id_attributes_length().
void CustomData_realloc | ( | struct CustomData * | data, |
int | totelem | ||
) |
Reallocate custom data to a new element count. Only affects on data layers which are owned by the CustomData itself, referenced data is kept unchanged,
Definition at line 2307 of file customdata.cc.
References BLI_assert, CD_FLAG_NOFREE, data, CustomDataLayer::data, CustomDataLayer::flag, layerType_getInfo(), MEM_recallocN, LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by BKE_mesh_split_faces(), BKE_pointcloud_from_mesh(), BKE_pointcloud_new_nomain(), blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), pointcloud_random(), blender::bke::CustomDataAttributes::reallocate(), and blender::bke::CurvesGeometry::resize().
void CustomData_reset | ( | struct CustomData * | data | ) |
NULL's all members and resets the CustomData.typemap.
Definition at line 2367 of file customdata.cc.
References CD_NUMTYPES, copy_vn_i(), and data.
Referenced by BKE_id_attribute_copy_domains_temp(), BKE_mesh_calc_edges(), BKE_mesh_calc_edges_tessface(), BKE_mesh_nomain_to_mesh(), BM_mesh_clear(), BM_mesh_create(), blender::bke::CurvesGeometry::CurvesGeometry(), CustomData_blend_read(), CustomData_copy(), CustomData_free(), CustomData_free_typemask(), blender::bke::CustomDataAttributes::CustomDataAttributes(), ED_mesh_join_objects_exec(), blender::draw::extract_tan_init_common(), mesh_init_data(), mesh_tessface_clear_intern(), and pointcloud_init_data().
void CustomData_set | ( | const struct CustomData * | data, |
int | index, | ||
int | type, | ||
const void * | source | ||
) |
Copies the data from source to the data element at index in the first layer of type no effect if there is no layer of type.
void* CustomData_set_layer | ( | const struct CustomData * | data, |
int | type, | ||
void * | ptr | ||
) |
Set the pointer of to the first layer of type. the old data is not freed. returns the value of ptr
if the layer is found, NULL otherwise.
Referenced by BKE_mesh_nomain_to_mesh().
void CustomData_set_layer_active | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Sets the nth layer of type as active.
Definition at line 2542 of file customdata.cc.
Referenced by CustomData_bmesh_do_versions_update_active_layers(), CustomData_bmesh_update_active_layers(), ED_mesh_color_add(), ED_mesh_sculpt_color_add(), ED_mesh_uv_add(), and Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh().
void CustomData_set_layer_active_index | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
For using with an index from CustomData_get_active_layer_index and CustomData_get_render_layer_index.
Definition at line 2578 of file customdata.cc.
References BLI_assert, customdata_typemap_is_valid(), data, and type.
Referenced by BKE_editmesh_loop_tangent_calc(), and BKE_mesh_calc_loop_tangent_ex().
void CustomData_set_layer_clone | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2560 of file customdata.cc.
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), and CustomData_bmesh_update_active_layers().
void CustomData_set_layer_clone_index | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2602 of file customdata.cc.
References BLI_assert, customdata_typemap_is_valid(), data, and type.
void CustomData_set_layer_flag | ( | struct CustomData * | data, |
int | type, | ||
int | flag | ||
) |
Adds flag to the layer flags.
Definition at line 2626 of file customdata.cc.
Referenced by BKE_mesh_remap_calc_loops_from_mesh(), BM_custom_loop_normals_to_vector_layer(), data_transfer_dtdata_type_preprocess(), dm_getEdgeArray(), dm_getLoopArray(), dm_getPolyArray(), dm_getVertArray(), ensure_corner_normal_layer(), mesh_wrapper_ensure_subdivision(), modifyMesh(), and triangulate_mesh().
void* CustomData_set_layer_n | ( | const struct CustomData * | data, |
int | type, | ||
int | n, | ||
void * | ptr | ||
) |
bool CustomData_set_layer_name | ( | const struct CustomData * | data, |
int | type, | ||
int | n, | ||
const char * | name | ||
) |
Referenced by blo_do_versions_270().
void CustomData_set_layer_render | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2551 of file customdata.cc.
Referenced by CustomData_bmesh_do_versions_update_active_layers(), and CustomData_bmesh_update_active_layers().
void CustomData_set_layer_render_index | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2590 of file customdata.cc.
References BLI_assert, customdata_typemap_is_valid(), data, and type.
Referenced by BKE_editmesh_loop_tangent_calc(), and BKE_mesh_calc_loop_tangent_ex().
void CustomData_set_layer_stencil | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2569 of file customdata.cc.
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), and CustomData_bmesh_update_active_layers().
void CustomData_set_layer_stencil_index | ( | struct CustomData * | data, |
int | type, | ||
int | n | ||
) |
Definition at line 2614 of file customdata.cc.
References BLI_assert, customdata_typemap_is_valid(), data, and type.
void CustomData_set_layer_unique_name | ( | struct CustomData * | data, |
int | index | ||
) |
Make sure the name of layer at index is unique.
Definition at line 4343 of file customdata.cc.
References BLI_uniquename_cb(), customdata_unique_check(), data, DATA_, LayerTypeInfo::defaultname, layerType_getInfo(), CustomDataLayer::name, STRNCPY, and CustomDataLayer::type.
Referenced by customData_add_layer__internal().
void CustomData_set_only_copy | ( | const struct CustomData * | data, |
eCustomDataMask | mask | ||
) |
Set the CD_FLAG_NOCOPY flag in custom data layers where the mask is zero for the layer type, so only layer types specified by the mask will be copied
Referenced by DM_set_only_copy(), mesh_set_only_copy(), and multiresbake_create_hiresdm().
int CustomData_sizeof | ( | int | type | ) |
Definition at line 4268 of file customdata.cc.
References layerType_getInfo(), LayerTypeInfo::size, and type.
Referenced by BKE_remesh_reproject_vertex_paint(), bm_edge_delimit_cdata(), BM_mesh_decimate_dissolve_ex(), BM_vert_loop_groups_data_layer_merge(), BM_vert_loop_groups_data_layer_merge_weights(), CustomData_debug_info_from_layers(), CustomData_layers__print(), blender::geometry::customdata_weld(), um_arraystore_cd_compact(), um_arraystore_cd_expand(), and um_arraystore_cd_free().
void CustomData_swap | ( | struct CustomData * | data, |
int | index_a, | ||
int | index_b | ||
) |
Swap two items of given custom data, in all available layers.
Definition at line 3319 of file customdata.cc.
References data, layerType_getInfo(), MEM_freeN, MEM_mallocN, POINTER_OFFSET, size(), and LayerTypeInfo::size.
Referenced by BKE_mesh_polygon_flip_ex().
void CustomData_swap_corners | ( | struct CustomData * | data, |
int | index, | ||
const int * | corner_indices | ||
) |
Swap data inside each item, for all layers. This only applies to item types that may store several sub-item data (e.g. corner data [UVs, VCol, ...] of tessellated faces).
corner_indices | A mapping 'new_index -> old_index' of sub-item data. |
Definition at line 3306 of file customdata.cc.
References data, layerType_getInfo(), offset, POINTER_OFFSET, LayerTypeInfo::size, and LayerTypeInfo::swap.
Referenced by BKE_mesh_mface_index_validate().
void CustomData_to_bmesh_block | ( | const struct CustomData * | source, |
struct CustomData * | dest, | ||
int | src_index, | ||
void ** | dest_block, | ||
bool | use_default_init | ||
) |
Copy custom data to/from layers as in mesh/derived-mesh, to edit-mesh blocks of data. the CustomData's must not be compatible.
use_default_init | initializes data which can't be copied, typically you'll want to use this if the BM_xxx create function is called with BM_CREATE_SKIP_CD flag |
Referenced by BM_mesh_bm_from_me().
void CustomData_update_typemap | ( | struct CustomData * | data | ) |
Definition at line 2193 of file customdata.cc.
References CD_NUMTYPES, data, and type.
Referenced by BKE_editmesh_loop_tangent_calc(), BKE_mesh_from_pointcloud(), blo_do_versions_260(), blo_do_versions_280(), CustomData_add_layer(), CustomData_add_layer_anonymous(), CustomData_add_layer_named(), CustomData_blend_read(), CustomData_merge(), customdata_typemap_is_valid(), customData_update_offsets(), and blender::bke::CustomDataAttributes::reorder().
void CustomData_validate_layer_name | ( | const struct CustomData * | data, |
int | type, | ||
const char * | name, | ||
char * | outname | ||
) |
bool CustomData_verify_versions | ( | struct CustomData * | data, |
int | index | ||
) |
For file reading compatibility, returns false if the layer was freed, only after this test passes, layer->data
should be assigned.
Definition at line 4388 of file customdata.cc.
References CD_CREASE, CD_FACEMAP, CD_NUMTYPES, CD_PAINT_MASK, CD_SCULPT_FACE_SETS, CLOG_WARN, data, LayerTypeInfo::defaultname, ELEM, layerType_getInfo(), LOG, LayerTypeInfo::structnum, and CustomDataLayer::type.
Referenced by CustomData_blend_read().
|
extern |
Definition at line 2051 of file customdata.cc.
Referenced by add_verts_to_dgroups(), BKE_crazyspace_get_first_deform_matrices_editbmesh(), BKE_crazyspace_get_mapped_editverts(), BKE_editmesh_vert_coords_alloc(), BKE_multires_create_mesh(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_layout(), BKE_object_handle_data_update(), bvh_get_mesh(), dt_layers_select_src_itemf(), ED_mesh_pick_vert(), ED_mesh_shapes_join_objects_exec(), ED_view3d_screen_datamask(), editbmesh_calc_modifiers(), knifeproject_poly_from_object(), mesh_foreachScreenEdge(), mesh_foreachScreenEdge_clip_bb_segment(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), meshobject_foreachScreenVert(), modifier_skin_armature_create(), multires_modifier_update_mdisps(), multires_reshape_create_subdiv(), multiresbake_create_hiresdm(), multiresbake_create_loresdm(), multiresModifier_reshapeFromObject(), object_force_modifier_update_for_bind(), paint_sample_color(), particle_intersect_mesh(), pointdensity_cache_object(), and vgroup_fix().
|
extern |
Definition at line 2058 of file customdata.cc.
Referenced by ED_mesh_pick_face_vert(), mesh_calc_modifiers(), vpaint_proj_dm_map_cosnos_init(), and vpaint_proj_dm_map_cosnos_update().
|
extern |
Definition at line 2090 of file customdata.cc.
Referenced by BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata(), BM_mesh_copy_init_customdata_from_mesh_array(), and bpy_bmesh_from_object().
|
extern |
Definition at line 2077 of file customdata.cc.
Referenced by BM_mesh_bm_to_me_for_eval(), DM_DupPolys(), DM_from_template(), and mesh_copy_data().
|
extern |
Definition at line 2101 of file customdata.cc.
Referenced by BKE_mesh_new_nomain_from_template(), blender::io::obj::MeshFromGeometry::create_mesh(), geometry_extract_apply(), loop_interpolation_init(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), subdiv_mesh_topology_info(), and vertex_interpolation_init().
|
extern |
Definition at line 2065 of file customdata.cc.
Referenced by bc_get_mesh_copy(), BKE_mesh_new_from_object_to_bmain(), BKE_mesh_to_curve(), BKE_mesh_to_pointcloud(), BKE_mesh_validate_all_customdata(), BM_mesh_bm_to_me(), CDDM_from_mesh(), blender::io::alembic::ABCHairWriter::do_write(), duplibase_for_convert(), join_mesh_single(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_blend_write(), mesh_copy_data(), mesh_new_from_mesh_object_with_layers(), modifier_apply_obdata(), multires_external_save_exec(), multiresModifier_rebuild_subdiv(), object_convert_exec(), paint_mask_slice_exec(), quadriflow_start_job(), blender::io::usd::USDMeshReader::read_object_data(), blender::io::alembic::AbcPointsReader::readObjectData(), SCULPT_dynamic_topology_disable_ex(), sculpt_gesture_apply_trim(), sculpt_undo_geometry_restore_data(), sculpt_undo_geometry_store_data(), and voxel_remesh_exec().