|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "DNA_ID.h"#include "DNA_customdata_types.h"#include "DNA_meshdata_types.h"#include "BLI_bit_vector.hh"#include "BLI_bitmap.h"#include "BLI_color.hh"#include "BLI_endian_switch.h"#include "BLI_index_range.hh"#include "BLI_math_color_blend.h"#include "BLI_math_matrix.hh"#include "BLI_math_quaternion_types.hh"#include "BLI_math_vector.hh"#include "BLI_memory_counter.hh"#include "BLI_mempool.h"#include "BLI_path_utils.hh"#include "BLI_set.hh"#include "BLI_span.hh"#include "BLI_string.h"#include "BLI_string_ref.hh"#include "BLI_string_utf8.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "BLI_dynstr.h"#include "BLT_translation.hh"#include "BKE_anonymous_attribute_id.hh"#include "BKE_attribute_math.hh"#include "BKE_customdata.hh"#include "BKE_customdata_file.h"#include "BKE_deform.hh"#include "BKE_main.hh"#include "BKE_mesh_mapping.hh"#include "BKE_mesh_remap.hh"#include "BKE_multires.hh"#include "BKE_subsurf.hh"#include "BLO_read_write.hh"#include "bmesh.hh"#include "CLG_log.h"#include "data_transfer_intern.h"Go to the source code of this file.
Classes | |
| struct | LayerTypeInfo |
| class | CustomDataLayerImplicitSharing |
| struct | CustomDataUniqueCheckData |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | CUSTOMDATA_GROW 5 |
| #define | COPY_BIT_FLAG(_type, _dst, _src, _f) |
Functions | |
| BLI_STATIC_ASSERT (BOUNDED_ARRAY_TYPE_SIZE< decltype(CustomData::typemap)>()==CD_NUMTYPES, "size mismatch") | |
| size_t | CustomData_get_elem_size (const CustomDataLayer *layer) |
| void | CustomData_count_memory (const CustomData &data, const int totelem, blender::MemoryCounter &memory) |
Mesh Mask Utilities | |
| void | CustomData_MeshMasks_update (CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src) |
| bool | CustomData_MeshMasks_are_matching (const CustomData_MeshMasks *mask_ref, const CustomData_MeshMasks *mask_required) |
Callbacks for (#MDeformVert, #CD_MDEFORMVERT) | |
| static void | layerCopy_mdeformvert (const void *source, void *dest, const int count) |
| static void | layerFree_mdeformvert (void *data, const int count) |
| static void | layerInterp_mdeformvert (const void **sources, const float *weights, const float *, const int count, void *dest) |
| static void | layerConstruct_mdeformvert (void *data, const int count) |
Callbacks for (#vec3f, #CD_NORMAL) | |
| static void | layerInterp_normal (const void **sources, const float *weights, const float *, const int count, void *dest) |
| static void | layerCopyValue_normal (const void *source, void *dest, const int mixmode, const float mixfactor) |
Callbacks for (#MTFace, #CD_MTFACE) | |
| static void | layerCopy_tface (const void *source, void *dest, const int count) |
| static void | layerInterp_tface (const void **sources, const float *weights, const float *sub_weights, const int count, void *dest) |
| static void | layerSwap_tface (void *data, const int *corner_indices) |
| static void | layerDefault_tface (void *data, const int count) |
| static int | layerMaxNum_tface () |
Callbacks for (#MFloatProperty, #CD_PROP_FLOAT) | |
| static void | layerCopy_propFloat (const void *source, void *dest, const int count) |
| static void | layerInterp_propFloat (const void **sources, const float *weights, const float *, const int count, void *dest) |
| static bool | layerValidate_propFloat (void *data, const uint totitems, const bool do_fixes) |
Callbacks for (#MIntProperty, #CD_PROP_INT32) | |
| static void | layerInterp_propInt (const void **sources, const float *weights, const float *, const int count, void *dest) |
Callbacks for (#MStringProperty, #CD_PROP_STRING) | |
| static void | layerCopy_propString (const void *source, void *dest, const int count) |
Callbacks for (#OrigSpaceFace, #CD_ORIGSPACE) | |
| static void | layerCopy_origspace_face (const void *source, void *dest, const int count) |
| static void | layerInterp_origspace_face (const void **sources, const float *weights, const float *sub_weights, const int count, void *dest) |
| static void | layerSwap_origspace_face (void *data, const int *corner_indices) |
| static void | layerDefault_origspace_face (void *data, const int count) |
Callbacks for (#MDisps, #CD_MDISPS) | |
| static void | layerSwap_mdisps (void *data, const int *ci) |
| static void | layerCopy_mdisps (const void *source, void *dest, const int count) |
| static void | layerFree_mdisps (void *data, const int count) |
| static void | layerConstruct_mdisps (void *data, const int count) |
| static bool | layerRead_mdisps (CDataFile *cdf, void *data, const int count) |
| static bool | layerWrite_mdisps (CDataFile *cdf, const void *data, const int count) |
| static size_t | layerFilesize_mdisps (CDataFile *, const void *data, const int count) |
Callbacks for (#CD_BM_ELEM_PYPTR) | |
| static void | layerCopy_bmesh_elem_py_ptr (const void *, void *dest, const int count) |
| void | bpy_bm_generic_invalidate (struct BPy_BMGeneric *) |
| static void | layerFree_bmesh_elem_py_ptr (void *data, const int count) |
Callbacks for (#GridPaintMask, #CD_GRID_PAINT_MASK) | |
| static void | layerCopy_grid_paint_mask (const void *source, void *dest, const int count) |
| static void | layerFree_grid_paint_mask (void *data, const int count) |
| static void | layerConstruct_grid_paint_mask (void *data, const int count) |
Callbacks for (#MLoopCol, #CD_PROP_BYTE_COLOR) | |
| static void | layerCopyValue_mloopcol (const void *source, void *dest, const int mixmode, const float mixfactor) |
| static bool | layerEqual_mloopcol (const void *data1, const void *data2) |
| static void | layerMultiply_mloopcol (void *data, const float fac) |
| static void | layerAdd_mloopcol (void *data1, const void *data2) |
| static void | layerDoMinMax_mloopcol (const void *data, void *vmin, void *vmax) |
| static void | layerInitMinMax_mloopcol (void *vmin, void *vmax) |
| static void | layerDefault_mloopcol (void *data, const int count) |
| static void | layerInterp_mloopcol (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for #OrigSpaceLoop | |
| static void | layerCopyValue_mloop_origspace (const void *source, void *dest, const int, const float) |
| static bool | layerEqual_mloop_origspace (const void *data1, const void *data2) |
| static void | layerMultiply_mloop_origspace (void *data, const float fac) |
| static void | layerInitMinMax_mloop_origspace (void *vmin, void *vmax) |
| static void | layerDoMinMax_mloop_origspace (const void *data, void *vmin, void *vmax) |
| static void | layerAdd_mloop_origspace (void *data1, const void *data2) |
| static void | layerInterp_mloop_origspace (const void **sources, const float *weights, const float *, int count, void *dest) |
| static void | layerInterp_mcol (const void **sources, const float *weights, const float *sub_weights, const int count, void *dest) |
| static void | layerSwap_mcol (void *data, const int *corner_indices) |
| static void | layerDefault_mcol (void *data, const int count) |
| static void | layerDefault_origindex (void *data, const int count) |
| static void | layerInterp_shapekey (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for (#MVertSkin, #CD_MVERT_SKIN) | |
| static void | layerDefault_mvert_skin (void *data, const int count) |
| static void | layerCopy_mvert_skin (const void *source, void *dest, const int count) |
| static void | layerInterp_mvert_skin (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for (<tt>short[4][3]</tt>, #CD_TESSLOOPNORMAL) | |
| static void | layerSwap_flnor (void *data, const int *corner_indices) |
Callbacks for (#MPropCol, #CD_PROP_COLOR) | |
| static void | layerCopyValue_propcol (const void *source, void *dest, const int mixmode, const float mixfactor) |
| static bool | layerEqual_propcol (const void *data1, const void *data2) |
| static void | layerMultiply_propcol (void *data, const float fac) |
| static void | layerAdd_propcol (void *data1, const void *data2) |
| static void | layerDoMinMax_propcol (const void *data, void *vmin, void *vmax) |
| static void | layerInitMinMax_propcol (void *vmin, void *vmax) |
| static void | layerDefault_propcol (void *data, const int count) |
| static void | layerInterp_propcol (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for (#vec3f, #CD_PROP_FLOAT3) | |
| static void | layerInterp_propfloat3 (const void **sources, const float *weights, const float *, int count, void *dest) |
| static void | layerMultiply_propfloat3 (void *data, const float fac) |
| static void | layerAdd_propfloat3 (void *data1, const void *data2) |
| static bool | layerValidate_propfloat3 (void *data, const uint totitems, const bool do_fixes) |
Callbacks for (#vec2f, #CD_PROP_FLOAT2) | |
| static void | layerInterp_propfloat2 (const void **sources, const float *weights, const float *, int count, void *dest) |
| static void | layerMultiply_propfloat2 (void *data, const float fac) |
| static void | layerAdd_propfloat2 (void *data1, const void *data2) |
| static bool | layerValidate_propfloat2 (void *data, const uint totitems, const bool do_fixes) |
| static bool | layerEqual_propfloat2 (const void *data1, const void *data2) |
| static void | layerInitMinMax_propfloat2 (void *vmin, void *vmax) |
| static void | layerDoMinMax_propfloat2 (const void *data, void *vmin, void *vmax) |
| static void | layerCopyValue_propfloat2 (const void *source, void *dest, const int mixmode, const float mixfactor) |
Callbacks for (<tt>bool</tt>, #CD_PROP_BOOL) | |
| static void | layerInterp_propbool (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for (#math::Quaternion, #CD_PROP_QUATERNION) | |
| static void | layerDefault_propquaternion (void *data, const int count) |
| static void | layerInterp_propquaternion (const void **sources, const float *weights, const float *, int count, void *dest) |
Callbacks for (#math::Quaternion, #CD_PROP_FLOAT4X4) | |
| static void | layerDefault_propfloat4x4 (void *data, const int count) |
External Files | |
| static void | customdata_external_filename (char filepath[FILE_MAX], ID *id, CustomDataExternal *external) |
| void | CustomData_external_reload (CustomData *data, ID *, eCustomDataMask mask, int totelem) |
| void | CustomData_external_read (CustomData *data, ID *id, eCustomDataMask mask, const int totelem) |
| void | CustomData_external_write (CustomData *data, ID *id, eCustomDataMask mask, const int totelem, const int free) |
| void | CustomData_external_add (CustomData *data, ID *, const eCustomDataType type, const int, const char *filepath) |
| void | CustomData_external_remove (CustomData *data, ID *id, const eCustomDataType type, const int totelem) |
| bool | CustomData_external_test (CustomData *data, const eCustomDataType type) |
Mesh-to-Mesh Data Transfer | |
| static void | copy_bit_flag (void *dst, const void *src, const size_t data_size, const uint64_t flag) |
| static bool | check_bit_flag (const void *data, const size_t data_size, const uint64_t flag) |
| static void | customdata_data_transfer_interp_generic (const CustomDataTransferLayerMap *laymap, void *data_dst, const void **sources, const float *weights, const int count, const float mix_factor) |
| void | customdata_data_transfer_interp_normal_normals (const CustomDataTransferLayerMap *laymap, void *data_dst, const void **sources, const float *weights, const int count, const float mix_factor) |
| void | CustomData_data_transfer (const MeshPairRemap *me_remap, const CustomDataTransferLayerMap *laymap) |
Custom Data IO | |
| static void | write_mdisps (BlendWriter *writer, const int count, const MDisps *mdlist, const int external) |
| static void | write_grid_paint_mask (BlendWriter *writer, int count, const GridPaintMask *grid_paint_mask) |
| static void | blend_write_layer_data (BlendWriter *writer, const CustomDataLayer &layer, const int count) |
| void | CustomData_blend_write (BlendWriter *writer, CustomData *data, Span< CustomDataLayer > layers_to_write, int count, eCustomDataMask cddata_mask, ID *id) |
| static void | blend_read_mdisps (BlendDataReader *reader, const int count, MDisps *mdisps, const int external) |
| static void | blend_read_paint_mask (BlendDataReader *reader, int count, GridPaintMask *grid_paint_mask) |
| static void | blend_read_layer_data (BlendDataReader *reader, CustomDataLayer &layer, const int count) |
| void | CustomData_blend_read (BlendDataReader *reader, CustomData *data, const int count) |
Custom Data Debugging | |
| void | CustomData_debug_info_from_layers (const CustomData *data, const char *indent, DynStr *dynstr) |
Custom Data C++ API | |
| std::optional< VolumeGridType > | blender::bke::custom_data_type_to_volume_grid_type (eCustomDataType type) |
| std::optional< eCustomDataType > | blender::bke::volume_grid_type_to_custom_data_type (VolumeGridType type) |
Variables | |
| static CLG_LogRef | LOG = {"bke.customdata"} |
Layer Type Information (#LAYERTYPEINFO) | |
| static const LayerTypeInfo | LAYERTYPEINFO [CD_NUMTYPES] |
| static const char * | LAYERTYPENAMES [CD_NUMTYPES] |
| 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 |
| static const LayerTypeInfo * | layerType_getInfo (const eCustomDataType type) |
| static const char * | layerType_getName (const eCustomDataType type) |
| void | customData_mask_layers__print (const CustomData_MeshMasks *mask) |
Implementation of CustomData.
BKE_customdata.hh contains the function prototypes for this file.
Definition in file customdata.cc.
| #define COPY_BIT_FLAG | ( | _type, | |
| _dst, | |||
| _src, | |||
| _f ) |
Referenced by copy_bit_flag().
| #define CUSTOMDATA_GROW 5 |
Definition at line 79 of file customdata.cc.
Referenced by customData_add_layer__internal(), and CustomData_free_layer().
| #define DNA_DEPRECATED_ALLOW |
Definition at line 15 of file customdata.cc.
| #define SOURCE_BUF_SIZE 100 |
Definition at line 3572 of file customdata.cc.
Referenced by CustomData_bmesh_interp(), and CustomData_interp().
|
static |
Definition at line 5416 of file customdata.cc.
References BKE_defvert_blend_read(), blend_read_mdisps(), blend_read_paint_mask(), BLI_STATIC_ASSERT, BLO_read_float_array(), BLO_read_struct_array, BLO_read_struct_by_name_array(), BLO_read_uint8_array(), CD_FLAG_EXTERNAL, CD_GRID_PAINT_MASK, CD_MDEFORMVERT, CD_MDISPS, CD_PROP_BOOL, CLOG_WARN, count, CustomData_file_write_info(), CustomData_layer_ensure_data_exists(), CustomData_sizeof(), GridPaintMask::data, LOG, and CLG_LogRef::type.
|
static |
Definition at line 5371 of file customdata.cc.
References BLI_BITMAP_SIZE, BLO_read_float3_array(), BLO_read_int8_array(), count, MDisps::disps, MDisps::hidden, int, MDisps::level, logf, M_LN2, sqrtf, and MDisps::totdisp.
Referenced by blend_read_layer_data().
|
static |
Definition at line 5401 of file customdata.cc.
References BKE_ccg_gridsize(), BLO_read_float_array(), count, GridPaintMask::data, and GridPaintMask::level.
Referenced by blend_read_layer_data().
|
static |
Definition at line 5303 of file customdata.cc.
References BKE_defvert_blend_write(), BLI_STATIC_ASSERT, BLO_write_float_array(), BLO_write_is_undo(), BLO_write_struct_array_by_name(), BLO_write_uint8_array(), CD_FLAG_EXTERNAL, CD_GRID_PAINT_MASK, CD_MDEFORMVERT, CD_MDISPS, CD_PROP_BOOL, count, CustomData_file_write_info(), printf, write_grid_paint_mask(), and write_mdisps().
| BLI_STATIC_ASSERT | ( | BOUNDED_ARRAY_TYPE_SIZE< | decltypeCustomData::typemap)>( = =CD_NUMTYPES, |
| "size mismatch" | ) |
| void bpy_bm_generic_invalidate | ( | struct BPy_BMGeneric * | self | ) |
Definition at line 749 of file customdata.cc.
Referenced by BM_mesh_free(), and layerFree_bmesh_elem_py_ptr().
|
static |
Definition at line 4491 of file customdata.cc.
References CD_MASK_PROP_ALL, and CD_TYPE_AS_MASK.
Referenced by customdata_unique_check().
|
static |
Definition at line 5010 of file customdata.cc.
References flag.
Referenced by customdata_data_transfer_interp_generic().
|
static |
Definition at line 4979 of file customdata.cc.
References COPY_BIT_FLAG, and flag.
Referenced by customdata_data_transfer_interp_generic().
|
static |
Definition at line 2381 of file customdata.cc.
References LayerTypeInfo::alignment, LayerTypeInfo::copy, layerType_getInfo(), MEM_mallocN_aligned(), and LayerTypeInfo::size.
Referenced by customdata_merge_internal(), and ensure_layer_data_is_mutable().
| void * CustomData_add_layer | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| eCDAllocType | alloctype, | ||
| int | totelem ) |
Adds a layer of the given type to the CustomData object. The new layer is initialized based on the given alloctype.
Definition at line 3207 of file customdata.cc.
References customData_add_layer__internal(), CustomData_update_typemap(), LayerTypeInfo::defaultname, and layerType_getInfo().
Referenced by BKE_mesh_calc_edges_tessface(), BKE_mesh_ensure_skin_customdata(), BKE_mesh_legacy_bevel_weight_to_layers(), BKE_mesh_legacy_edge_crease_to_layers(), BKE_mesh_new_nomain_from_template_ex(), BKE_mesh_orco_ensure(), BKE_sculpt_mask_layers_ensure(), BM_data_layer_add(), BM_mesh_bm_from_me(), ccgDM_get_edge_data_layer(), ccgDM_get_poly_data_layer(), ccgDM_get_vert_data_layer(), convert_mfaces_to_mpolys(), blender::ed::object::convert_psys_to_mesh(), copy_ccg_data(), customdata_version_242(), data_transfer_dtdata_type_postprocess(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), data_transfer_layersmapping_generate(), data_transfer_layersmapping_vgroups(), data_transfer_layersmapping_vgroups_multisrc_to_dst(), deform_verts(), blender::bke::CurvesGeometry::deform_verts_for_write(), dynamicPaint_Modifier_apply(), blender::bke::editbmesh_calc_modifiers(), ensure_orig_index_layer(), blender::bke::mesh_calc_modifiers(), mesh_customdata_custom_splitnormals_add_exec(), blender::bke::mesh::mesh_set_custom_normals(), mesh_wrapper_ensure_subdivision(), blender::ed::object::modifier_skin_armature_create(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), blender::modifyGeometry(), 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::bke::orco_coord_layer_ensure(), blender::io::alembic::read_generated_coordinates(), sculpt_multires_modifier_get(), skin_set_orig_indices(), and triangulate_mesh().
|
static |
Definition at line 3085 of file customdata.cc.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, LayerTypeInfo::alignment, BLI_assert, CD_CONSTRUCT, CD_SET_DEFAULT, LayerTypeInfo::construct, CustomData_get_layer_index(), CUSTOMDATA_GROW, CustomData_has_layer(), customData_resize(), CustomData_set_layer_unique_name(), customData_update_offsets(), CustomDataLayer::data, DATA_, LayerTypeInfo::defaultname, CustomDataLayer::flag, flag, layerType_getInfo(), layerType_getName(), make_implicit_sharing_info_for_layer(), MEM_mallocN_aligned(), MEM_SAFE_FREE, CustomDataLayer::name, LayerTypeInfo::set_default_value, CustomDataLayer::sharing_info, LayerTypeInfo::size, and CustomDataLayer::type.
Referenced by CustomData_add_layer(), CustomData_add_layer_named(), CustomData_add_layer_named_with_data(), CustomData_add_layer_with_data(), and customdata_merge_internal().
| void * CustomData_add_layer_named | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| eCDAllocType | alloctype, | ||
| int | totelem, | ||
| blender::StringRef | name ) |
Same as CustomData_add_layer but accepts a name.
Definition at line 3244 of file customdata.cc.
References customData_add_layer__internal(), and CustomData_update_typemap().
Referenced by blender::io::alembic::add_customdata_cb(), blender::bke::add_generic_custom_data_layer(), add_mface_layers(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_add_loop_tangent_named_layer_for_uv(), BKE_mesh_calc_edges_tessface(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_legacy_convert_edges_to_generic(), BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_verts_to_positions(), BM_data_layer_add_named(), BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata_all_layers(), blender::bm_to_mesh_edges(), blender::bm_to_mesh_loops(), blender::bm_to_mesh_verts(), convert_mfaces_to_mpolys(), blender::ed::object::convert_psys_to_mesh(), CustomData_to_bmeshpoly(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), data_transfer_layersmapping_generate(), dm_getCornerEdgeArray(), dm_getCornerVertArray(), dm_getEdgeArray(), dm_getVertArray(), dynamicPaint_Modifier_apply(), ED_mesh_join_objects_exec(), ED_mesh_uv_add(), ensure_corner_boolean_attribute(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::bke::get_mutable_attribute(), blender::bke::greasepencil::get_mutable_attribute(), join_mesh_single(), mesh_add_edges(), mesh_add_loops(), mesh_add_verts(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), multires_unsubdivide_add_original_index_datalayers(), blender::io::alembic::read_edge_creases(), blender::io::alembic::read_vertex_creases(), blender::bke::Instances::reference_handles_for_write(), and blender::bke::Instances::transforms_for_write().
| const void * CustomData_add_layer_named_with_data | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| void * | layer_data, | ||
| int | totelem, | ||
| const StringRef | name, | ||
| const ImplicitSharingInfo * | sharing_info ) |
Definition at line 3260 of file customdata.cc.
References customData_add_layer__internal(), and CustomData_update_typemap().
Referenced by blender::bke::add_generic_custom_data_layer_with_existing_data(), BKE_mesh_legacy_face_set_to_generic(), ED_mesh_uv_add(), blender::bke::mesh_sculpt_mask_to_generic(), move_face_map_data_to_attributes(), replace_custom_data_layer_with_named(), and blender::bke::subdiv::subdiv_to_mesh().
| const void * CustomData_add_layer_with_data | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| void * | layer_data, | ||
| int | totelem, | ||
| const blender::ImplicitSharingInfo * | sharing_info ) |
Adds a layer of the given type to the CustomData object. The new layer takes ownership of the passed in layer_data. If a #ImplicitSharingInfo is passed in, its user count is increased.
Definition at line 3225 of file customdata.cc.
References customData_add_layer__internal(), CustomData_update_typemap(), LayerTypeInfo::defaultname, and layerType_getInfo().
Referenced by blender::ed::object::add_shapekey_layers(), BKE_mesh_calc_edges_legacy(), customdata_version_242(), and mesh_tessface_calc().
| void CustomData_blend_read | ( | BlendDataReader * | reader, |
| CustomData * | data, | ||
| const int | count ) |
Definition at line 5466 of file customdata.cc.
References BLO_read_shared(), BLO_read_struct, BLO_read_struct_array, CD_FLAG_EXTERNAL, count, CustomData_reset(), CustomData_verify_versions(), CustomDataLayer::flag, make_implicit_sharing_info_for_layer(), and UNLIKELY.
Referenced by blender::bke::CurvesGeometry::blend_read(), grease_pencil_blend_read_data(), mesh_blend_read_data(), and pointcloud_blend_read_data().
| void CustomData_blend_write | ( | BlendWriter * | writer, |
| CustomData * | data, | ||
| blender::Span< CustomDataLayer > | layers_to_write, | ||
| int | count, | ||
| eCustomDataMask | cddata_mask, | ||
| ID * | id ) |
| layers_to_write | Layers created by CustomData_blend_write_prepare. |
Definition at line 5344 of file customdata.cc.
References BLO_write_is_undo(), BLO_write_shared(), BLO_write_struct, BLO_write_struct_array_at_address, count, CustomData_external_write(), CustomData_sizeof(), and blender::Span< T >::data().
Referenced by blender::bke::CurvesGeometry::blend_write(), grease_pencil_blend_write(), mesh_blend_write(), and pointcloud_blend_write().
| void CustomData_blend_write_prepare | ( | CustomData & | data, |
| blender::Vector< CustomDataLayer, 16 > & | layers_to_write, | ||
| const blender::Set< std::string > & | skip_names = {} ) |
Prepare given custom data for file writing.
| data | The custom-data to tweak for .blend file writing (modified in place). |
| layers_to_write | A reduced set of layers to be written to file. |
Definition at line 4422 of file customdata.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::attribute_name_is_anonymous(), CD_FLAG_NOCOPY, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::bke::CurvesGeometry::blend_write_prepare(), grease_pencil_blend_write(), mesh_blend_write(), and pointcloud_blend_write().
| void CustomData_bmesh_alloc_block | ( | CustomData * | data, |
| void ** | block ) |
Definition at line 3988 of file customdata.cc.
References BLI_mempool_alloc(), and CustomData_bmesh_free_block().
Referenced by CustomData_bmesh_set_default(), and mesh_attributes_copy_to_bmesh_block().
| void CustomData_bmesh_copy_block | ( | CustomData & | data, |
| void * | src_block, | ||
| void ** | dst_block ) |
Copy all layers from the source to the destination block. Allocate the result block if necessary, otherwise free its existing layer data.
Definition at line 4122 of file customdata.cc.
References BLI_mempool_alloc(), LayerTypeInfo::copy, LayerTypeInfo::free, layerType_getInfo(), POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by bm_data_interp_from_elem(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_elem_attrs_copy(), BM_face_copy_shared(), BM_face_split_edgenet(), bm_interp_face_store(), bm_loop_create(), BM_mesh_copy(), bm_mesh_copy_new_face(), bmo_inset_region_exec(), bmo_pointmerge_facedata_exec(), blender::bke::pbvh::copy_edge_data(), and update_data_blocks().
| void CustomData_bmesh_copy_block | ( | CustomData & | dst_data, |
| const BMCustomDataCopyMap & | map, | ||
| const void * | src_block, | ||
| void ** | dst_block ) |
Copy custom data layers for one element between two potentially different formats with a precalculated map.
Definition at line 4087 of file customdata.cc.
References BLI_mempool_alloc(), BMCustomDataCopyMap::copies, BMCustomDataCopyMap::defaults, BMCustomDataCopyMap::free, POINTER_OFFSET, CustomData::pool, CustomData::totsize, BMCustomDataCopyMap::trivial_copies, and BMCustomDataCopyMap::trivial_defaults.
Referenced by CustomData_bmesh_merge_layout().
| BMCustomDataCopyMap CustomData_bmesh_copy_map_calc | ( | const CustomData & | src, |
| const CustomData & | dst, | ||
| eCustomDataMask | mask_exclude = 0 ) |
Precalculate a map for more efficient copying between custom data formats.
Definition at line 4050 of file customdata.cc.
References CD_TYPE_AS_MASK, LayerTypeInfo::copy, CustomData_get_offset_named(), LayerTypeInfo::free, CustomData::layers, layerType_getInfo(), LayerTypeInfo::set_default_value, LayerTypeInfo::size, and CustomData::totlayer.
Referenced by BM_mesh_copy(), BM_mesh_copy_arrays(), bmo_mesh_copy(), bpy_bm_elem_copy_from(), bpy_bmedgeseq_new(), bpy_bmvertseq_new(), CustomData_bmesh_merge_layout(), mesh_customdatacorrect_face_substitute_set(), mesh_customdatacorrect_init_vert(), mesh_customdatacorrect_restore(), and update_data_blocks().
| void CustomData_bmesh_free_block | ( | CustomData * | data, |
| void ** | block ) |
Definition at line 3949 of file customdata.cc.
References BLI_mempool_free(), LayerTypeInfo::free, layerType_getInfo(), and POINTER_OFFSET.
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_layout(), and update_data_blocks().
| void CustomData_bmesh_free_block_data | ( | CustomData * | data, |
| void * | block ) |
Same as CustomData_bmesh_free_block but zero the memory rather than freeing.
Definition at line 3971 of file customdata.cc.
References LayerTypeInfo::free, layerType_getInfo(), and POINTER_OFFSET.
Referenced by bmo_inset_region_exec().
| void CustomData_bmesh_free_block_data_exclude_by_type | ( | CustomData * | data, |
| void * | block, | ||
| eCustomDataMask | mask_exclude ) |
A selective version of CustomData_bmesh_free_block_data.
Definition at line 4002 of file customdata.cc.
References CD_TYPE_AS_MASK, LayerTypeInfo::free, layerType_getInfo(), POINTER_OFFSET, and LayerTypeInfo::size.
| void * CustomData_bmesh_get | ( | const CustomData * | data, |
| void * | block, | ||
| const eCustomDataType | type ) |
Definition at line 4151 of file customdata.cc.
References CustomData_get_active_layer_index(), and POINTER_OFFSET.
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(), mesh_skin_transdata_create(), output_frames(), similar_edge_select_exec(), similar_face_select_exec(), blender::ed::object::skin_loose_mark_clear_exec(), and blender::ed::object::skin_radii_equalize_exec().
| void * CustomData_bmesh_get_layer_n | ( | const CustomData * | data, |
| void * | block, | ||
| int | n ) |
Gets from the layer at physical index n,
Definition at line 4174 of file customdata.cc.
References POINTER_OFFSET.
Referenced by EDBM_verts_mirror_cache_clear(), and EDBM_verts_mirror_get().
| void * CustomData_bmesh_get_n | ( | const CustomData * | data, |
| void * | block, | ||
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 4161 of file customdata.cc.
References CustomData_get_layer_index(), and POINTER_OFFSET.
Referenced by BM_data_layer_copy(), bmo_mirror_exec(), bpy_bmlayeritem_ptr_get(), CustomData_bmesh_set_n(), edbm_blend_from_shape_exec(), shape_propagate(), and skin_smooth_hulls().
| bool CustomData_bmesh_has_free | ( | const CustomData * | data | ) |
A non bmesh version would have to check layer->data.
Definition at line 4219 of file customdata.cc.
References LayerTypeInfo::free, and layerType_getInfo().
Referenced by BM_mesh_data_free().
| void CustomData_bmesh_init_pool | ( | CustomData * | data, |
| const int | totelem, | ||
| const char | htype ) |
Definition at line 3823 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, 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_layout(), and update_data_blocks().
| void CustomData_bmesh_interp | ( | CustomData * | data, |
| const void ** | src_blocks, | ||
| const float * | weights, | ||
| const float * | sub_weights, | ||
| int | count, | ||
| void * | dst_block ) |
Definition at line 4361 of file customdata.cc.
References copy_vn_fl(), count, CustomData_bmesh_interp_n(), ELEM, LayerTypeInfo::interp, layerType_getInfo(), MEM_freeN(), MEM_malloc_arrayN, MEM_mallocN, POINTER_OFFSET, and SOURCE_BUF_SIZE.
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 | ( | CustomData * | data, |
| const void ** | src_blocks, | ||
| const float * | weights, | ||
| const float * | sub_weights, | ||
| int | count, | ||
| void * | dst_block_ofs, | ||
| int | n ) |
Definition at line 4344 of file customdata.cc.
References BLI_assert, count, LayerTypeInfo::interp, and layerType_getInfo().
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_layout | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| eCustomDataMask | mask, | ||
| eCDAllocType | alloctype, | ||
| BMesh * | bm, | ||
| char | htype ) |
BMesh version of CustomData_merge_layout; 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.
Definition at line 3855 of file customdata.cc.
References BLI_assert_msg, BLI_mempool_destroy(), bm, BM_EDGE, BM_EDGES_OF_MESH, BM_FACE, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOP, BM_LOOPS_OF_FACE, BM_VERT, BM_VERTS_OF_MESH, CustomData_bmesh_copy_block(), CustomData_bmesh_copy_map_calc(), CustomData_bmesh_free_block(), CustomData_bmesh_init_pool(), CustomData_merge_layout(), CustomData_number_of_layers_typemask(), BMHeader::data, BMLoop::head, l, CustomData::layers, MEM_dupallocN, MEM_freeN(), CustomData::pool, BMesh::totedge, BMesh::totface, BMesh::totloop, and BMesh::totvert.
Referenced by BM_mesh_bm_from_me().
| void CustomData_bmesh_set_default | ( | CustomData * | data, |
| void ** | block ) |
Definition at line 4039 of file customdata.cc.
References CustomData_bmesh_alloc_block(), and CustomData_bmesh_set_default_n().
Referenced by BM_edge_create(), BM_face_create(), bm_loop_create(), and BM_vert_create().
|
static |
Definition at line 4032 of file customdata.cc.
References CustomData_data_set_default_value(), and POINTER_OFFSET.
Referenced by CustomData_bmesh_set_default().
| void CustomData_bmesh_set_n | ( | CustomData * | data, |
| void * | block, | ||
| const eCustomDataType | type, | ||
| const int | n, | ||
| const void * | source ) |
Definition at line 4326 of file customdata.cc.
References LayerTypeInfo::copy, CustomData_bmesh_get_n(), layerType_getInfo(), and LayerTypeInfo::size.
Referenced by BM_data_layer_copy().
| void CustomData_clear_layer_flag | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | flag ) |
Definition at line 3058 of file customdata.cc.
| void CustomData_copy_data | ( | const CustomData * | source, |
| 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).
Definition at line 3499 of file customdata.cc.
References count, CustomData_copy_data_layer(), CustomData::layers, CustomData::totlayer, and CustomDataLayer::type.
Referenced by add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_faces_to_new_mesh(), arrayModifier_doArray(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_strip_loose_faces(), copy_masked_edges_to_new_mesh(), copy_masked_faces_to_new_mesh(), copy_masked_verts_to_new_mesh(), blender::geometry::create_merged_mesh(), blender::geometry::customdata_weld(), cutEdges(), DM_copy_vert_data(), explodeMesh(), get_dface(), blender::ed::greasepencil::join_object_with_active(), blender::bke::subdiv::loop_interpolation_from_corner(), blender::geometry::merge_customdata_all(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), mesh_merge_transform(), mesh_strip_edges(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), modify_mesh(), modify_mesh(), blender::geometry::reorder_customdata(), reorder_customdata(), blender::geometry::reorder_customdata_groups(), set_ccgdm_all_geometry(), shrink_customdata(), strip_loose_faces_corners(), blender::bke::subdiv::subdiv_copy_edge_data(), blender::bke::subdiv::subdiv_mesh_face(), blender::bke::subdiv::subdiv_vertex_data_copy(), subdivide_base(), and blender::bke::subdiv::vertex_interpolation_from_corner().
| void CustomData_copy_data_layer | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| const int | src_layer_index, | ||
| const int | dst_layer_index, | ||
| const int | src_index, | ||
| const int | dst_index, | ||
| const int | count ) |
Definition at line 3438 of file customdata.cc.
References BLI_assert, CLOG_WARN, LayerTypeInfo::copy, count, CustomDataLayer::data, layer_is_mutable(), 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 CustomData * | source, |
| CustomData * | dest, | ||
| const int | source_index, | ||
| const int | dest_index, | ||
| const int | count ) |
Definition at line 3480 of file customdata.cc.
References count, CustomData_copy_data_layer(), CustomData_get_named_layer_index(), CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by join_mesh_single().
| void CustomData_copy_elements | ( | const eCustomDataType | type, |
| void * | src_data_ofs, | ||
| void * | dst_data_ofs, | ||
| const int | count ) |
Definition at line 3423 of file customdata.cc.
References LayerTypeInfo::copy, count, layerType_getInfo(), and LayerTypeInfo::size.
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 CustomData * | source, |
| CustomData * | destination, | ||
| eCustomDataType | type, | ||
| int | source_index, | ||
| int | destination_index, | ||
| int | count ) |
Copies data of a single layer of a given type.
Definition at line 3534 of file customdata.cc.
References count, CustomData_copy_data_layer(), and CustomData_get_layer_index().
Referenced by copy_ccg_data(), and blender::geometry::customdata_weld().
| void CustomData_count_memory | ( | const CustomData & | data, |
| const int | totelem, | ||
| blender::MemoryCounter & | memory ) |
Definition at line 5597 of file customdata.cc.
References blender::memory_counter::MemoryCounter::add(), blender::memory_counter::MemoryCounter::add_shared(), and CustomData_get_elem_size().
Referenced by blender::bke::CurvesGeometry::count_memory(), and blender::bke::Instances::count_memory().
| void CustomData_data_add | ( | const eCustomDataType | type, |
| void * | data1, | ||
| const void * | data2 ) |
Definition at line 4317 of file customdata.cc.
References LayerTypeInfo::add, and layerType_getInfo().
Referenced by bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), bmo_pointmerge_facedata_exec(), and blender::geometry::customdata_weld().
| void CustomData_data_copy_value | ( | eCustomDataType | type, |
| const void * | source, | ||
| void * | dest ) |
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 4242 of file customdata.cc.
References LayerTypeInfo::copy, layerType_getInfo(), and LayerTypeInfo::size.
Referenced by bm_loop_customdata_merge(), blender::bmesh_block_copy_to_mesh_attributes(), bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), and mesh_attributes_copy_to_bmesh_block().
| void CustomData_data_dominmax | ( | const eCustomDataType | type, |
| const void * | data, | ||
| void * | min, | ||
| void * | max ) |
Definition at line 4299 of file customdata.cc.
References LayerTypeInfo::dominmax, layerType_getInfo(), and min.
Referenced by bmo_average_vert_facedata_exec(), and bmo_collapsecon_do_layer().
| bool CustomData_data_equals | ( | eCustomDataType | type, |
| const void * | data1, | ||
| const void * | data2 ) |
Compares if data1 is equal to data2. type is a valid CustomData type enum (e.g. CD_PROP_FLOAT). the layer type's equal function is used to compare the data, if it exists, otherwise #memcmp is used.
Definition at line 4279 of file customdata.cc.
References LayerTypeInfo::equal, layerType_getInfo(), and LayerTypeInfo::size.
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().
| void CustomData_data_initminmax | ( | const eCustomDataType | type, |
| void * | min, | ||
| void * | max ) |
Definition at line 4290 of file customdata.cc.
References LayerTypeInfo::initminmax, layerType_getInfo(), and min.
Referenced by bmo_average_vert_facedata_exec(), and bmo_collapsecon_do_layer().
| void CustomData_data_mix_value | ( | eCustomDataType | 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 4258 of file customdata.cc.
References LayerTypeInfo::copyvalue, layerType_getInfo(), and LayerTypeInfo::size.
Referenced by bm_loop_customdata_merge(), customdata_data_transfer_interp_generic(), and customdata_data_transfer_interp_normal_normals().
| void CustomData_data_multiply | ( | const eCustomDataType | type, |
| void * | data, | ||
| const float | fac ) |
Definition at line 4308 of file customdata.cc.
References layerType_getInfo(), and LayerTypeInfo::multiply.
Referenced by bmo_average_vert_facedata_exec(), bmo_collapsecon_do_layer(), bmo_pointmerge_facedata_exec(), and blender::geometry::customdata_weld().
| void CustomData_data_set_default_value | ( | const eCustomDataType | type, |
| void * | elem ) |
Definition at line 4021 of file customdata.cc.
References layerType_getInfo(), LayerTypeInfo::set_default_value, and LayerTypeInfo::size.
Referenced by CustomData_bmesh_set_default_n(), and mesh_attributes_copy_to_bmesh_block().
| void CustomData_data_transfer | ( | const MeshPairRemap * | me_remap, |
| const CustomDataTransferLayerMap * | laymap ) |
Those functions assume src_n and dst_n layers of given type exist in resp. src and dst.
Definition at line 5178 of file customdata.cc.
References CD_FAKE, customdata_data_transfer_interp_generic(), CustomDataTransferLayerMap::data_dst, CustomDataTransferLayerMap::data_offset, CustomDataTransferLayerMap::data_size, CustomDataTransferLayerMap::data_src, CustomDataTransferLayerMap::data_type, CustomDataTransferLayerMap::elem_size, MeshPairRemapItem::indices_src, CustomDataTransferLayerMap::interp, interp(), MeshPairRemap::items, MeshPairRemap::items_num, layerType_getInfo(), MEM_malloc_arrayN, MEM_reallocN, MEM_SAFE_FREE, CustomDataTransferLayerMap::mix_factor, CustomDataTransferLayerMap::mix_weights, POINTER_OFFSET, LayerTypeInfo::size, MeshPairRemapItem::sources_num, UNLIKELY, and MeshPairRemapItem::weights_src.
Referenced by BKE_object_data_transfer_ex().
|
static |
Definition at line 5027 of file customdata.cc.
References BLI_assert, CD_FAKE, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD, CDT_MIX_TRANSFER, check_bit_flag(), LayerTypeInfo::copy, copy_bit_flag(), count, CustomData_data_mix_value(), CustomDataTransferLayerMap::data_flag, CustomDataTransferLayerMap::data_size, CustomDataTransferLayerMap::data_type, LayerTypeInfo::interp, layerType_getInfo(), MEM_freeN(), MEM_mallocN, CustomDataTransferLayerMap::mix_mode, and LayerTypeInfo::size.
Referenced by CustomData_data_transfer().
| void customdata_data_transfer_interp_normal_normals | ( | const CustomDataTransferLayerMap * | laymap, |
| void * | data_dst, | ||
| const void ** | sources, | ||
| const float * | weights, | ||
| int | count, | ||
| float | mix_factor ) |
Normals are special, we need to take care of source & destination spaces.
Definition at line 5143 of file customdata.cc.
References BLI_assert, BLI_space_transform_invert_normal(), CD_NORMAL, count, CustomData_data_mix_value(), CustomDataTransferLayerMap::data_type, LayerTypeInfo::interp, CustomDataTransferLayerMap::interp_data, layerType_getInfo(), and CustomDataTransferLayerMap::mix_mode.
Referenced by data_transfer_layersmapping_generate().
| void CustomData_debug_info_from_layers | ( | const CustomData * | data, |
| const char * | indent, | ||
| DynStr * | dynstr ) |
Use to inspect mesh data when debugging.
Definition at line 5518 of file customdata.cc.
References BLI_dynstr_appendf(), CD_NUMTYPES, CustomData_file_write_info(), CustomData_get_layer(), CustomData_has_layer(), CustomData_layertype_name(), CustomData_sizeof(), int, and MEM_allocN_len.
Referenced by BKE_mesh_debug_info(), and BM_mesh_debug_info().
| void CustomData_ensure_data_is_mutable | ( | CustomDataLayer * | layer, |
| int | totelem ) |
Custom data layers can be shared through implicit sharing (BLI_implicit_sharing.h). This function makes sure that the layer is unshared if it was shared, which makes it mutable.
Definition at line 2613 of file customdata.cc.
References ensure_layer_data_is_mutable().
Referenced by BKE_attribute_search_for_write().
| void CustomData_ensure_layers_are_mutable | ( | CustomData * | data, |
| int | totelem ) |
Definition at line 2618 of file customdata.cc.
References ensure_layer_data_is_mutable().
Referenced by mesh_remove_edges(), mesh_remove_faces(), mesh_remove_loops(), and mesh_remove_verts().
| void CustomData_external_add | ( | CustomData * | data, |
| ID * | id, | ||
| const eCustomDataType | type, | ||
| const int | totelem, | ||
| const char * | filepath ) |
Definition at line 4907 of file customdata.cc.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CustomData_get_active_layer_index(), CustomDataExternal::filepath, and STRNCPY.
Referenced by bm_corners_to_loops_ex(), and blender::ed::object::multires_external_save_exec().
|
static |
Definition at line 4702 of file customdata.cc.
References BLI_path_abs(), BLI_strncpy(), FILE_MAX, CustomDataExternal::filepath, and ID_BLEND_PATH_FROM_GLOBAL.
Referenced by CustomData_external_read(), and CustomData_external_write().
|
static |
Definition at line 2728 of file customdata.cc.
References MEM_freeN().
Referenced by CustomData_free(), and CustomData_free_typemask().
| void CustomData_external_read | ( | CustomData * | data, |
| ID * | id, | ||
| eCustomDataMask | mask, | ||
| const int | totelem ) |
Definition at line 4728 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(), FILE_MAX, layerType_getInfo(), layerType_getName(), LOG, LayerTypeInfo::read, CDataFile::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 | ( | CustomData * | data, |
| ID * | id, | ||
| eCustomDataMask | mask, | ||
| int | totelem ) |
Definition at line 4710 of file customdata.cc.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, LayerTypeInfo::free, and layerType_getInfo().
Referenced by multires_force_external_reload().
| void CustomData_external_remove | ( | CustomData * | data, |
| ID * | id, | ||
| const eCustomDataType | type, | ||
| const int | totelem ) |
Definition at line 4935 of file customdata.cc.
References CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_TYPE_AS_MASK, CustomData_external_read(), and CustomData_get_active_layer_index().
Referenced by multires_customdata_delete(), and blender::ed::object::multires_external_pack_exec().
| bool CustomData_external_test | ( | CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 4962 of file customdata.cc.
References CD_FLAG_EXTERNAL, and CustomData_get_active_layer_index().
Referenced by bm_corners_to_loops_ex(), multires_ensure_external_read(), blender::ed::object::multires_external_pack_exec(), blender::ed::object::multires_external_save_exec(), and blender::ed::object::multires_external_save_invoke().
| void CustomData_external_write | ( | CustomData * | data, |
| ID * | id, | ||
| eCustomDataMask | mask, | ||
| const int | totelem, | ||
| const int | free ) |
Definition at line 4804 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(), FILE_MAX, LayerTypeInfo::filesize, free(), LayerTypeInfo::free, layerType_getInfo(), LOG, CDataFile::type, update(), and LayerTypeInfo::write.
Referenced by CustomData_blend_write(), and blender::ed::object::multires_external_save_exec().
| void CustomData_file_write_info | ( | eCustomDataType | type, |
| const char ** | r_struct_name, | ||
| int * | r_struct_num ) |
Query info over types.
Definition at line 4412 of file customdata.cc.
References layerType_getInfo(), LayerTypeInfo::structname, and LayerTypeInfo::structnum.
Referenced by blend_read_layer_data(), blend_write_layer_data(), and CustomData_debug_info_from_layers().
| void CustomData_free | ( | CustomData * | data, |
| int | totelem ) |
Frees data associated with a CustomData object (doesn't free the object itself, though).
Definition at line 2742 of file customdata.cc.
References CustomData_external_free(), customData_free_layer__internal(), CustomData_reset(), and MEM_freeN().
Referenced by BKE_grease_pencil_nomain_to_grease_pencil(), BKE_mesh_calc_edges_tessface(), BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_to_pointcloud(), BKE_pointcloud_nomain_to_pointcloud(), BM_mesh_data_free(), convert_mfaces_to_mpolys(), DM_release(), blender::draw::extract_tangents(), blender::draw::extract_tangents_subdiv(), blender::ed::sculpt_paint::undo::geometry_free_data(), grease_pencil_free_data(), blender::bke::subdiv::loop_interpolation_end(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), blender::bke::mesh_calc_edges(), mesh_clear_geometry(), mesh_tessface_calc(), mesh_tessface_clear_intern(), pointcloud_free_data(), blender::nodes::node_geo_curve_to_points_cc::pointcloud_from_curves(), blender::geometry::reorder_customdata(), reorder_customdata(), blender::geometry::reorder_customdata_groups(), shrink_customdata(), blender::ed::geometry::store_result_geometry(), blender::bke::subdiv::subdiv_mesh_context_free(), blender::bke::subdiv::subdiv_mesh_topology_info(), blender::bke::subdiv::vertex_interpolation_end(), blender::bke::CurvesGeometry::~CurvesGeometry(), blender::bke::greasepencil::tests::GreasePencilHelper::~GreasePencilHelper(), blender::bke::Instances::~Instances(), and blender::ed::greasepencil::undo::StepObject::~StepObject().
| void CustomData_free_elem | ( | CustomData * | data, |
| int | index, | ||
| int | count ) |
Frees data in a CustomData object. This is only expected to be called if the data layers are not shared (CustomData_ensure_layers_are_mutable).
Definition at line 3558 of file customdata.cc.
References BLI_assert, count, LayerTypeInfo::free, layer_is_mutable(), layerType_getInfo(), POINTER_OFFSET, and LayerTypeInfo::size.
Referenced by BKE_mesh_strip_loose_faces(), cutEdges(), blender::bke::subdiv::loop_interpolation_from_corner(), mesh_remove_edges(), mesh_remove_faces(), mesh_remove_loops(), mesh_remove_verts(), mesh_strip_edges(), and strip_loose_faces_corners().
| bool CustomData_free_layer | ( | CustomData * | data, |
| eCustomDataType | 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 3277 of file customdata.cc.
References CustomDataLayer::active, BLI_assert, customData_free_layer__internal(), CustomData_get_layer_index(), CustomData_get_layer_index__notypemap(), CUSTOMDATA_GROW, customData_resize(), and customData_update_offsets().
Referenced by BKE_mesh_legacy_face_set_to_generic(), 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(), blender::bke::mesh_sculpt_mask_to_generic(), mesh_validate_customdata(), move_face_map_data_to_attributes(), multires_unsubdivide_free_original_datalayers(), replace_custom_data_layer_with_named(), and blender::bke::CustomDataAttributeProvider::try_delete().
|
static |
Definition at line 2714 of file customdata.cc.
References free_layer_data().
Referenced by CustomData_free(), CustomData_free_layer(), and CustomData_free_typemask().
| bool CustomData_free_layer_active | ( | CustomData * | data, |
| eCustomDataType | 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 3344 of file customdata.cc.
References CustomData_free_layer(), and CustomData_get_active_layer_index().
Referenced by BKE_object_defgroup_remove_all_ex(), blo_do_versions_250(), BM_data_layer_free(), blender::ed::object::modifier_skin_customdata_delete(), multires_customdata_delete(), and object_defgroup_remove_common().
| bool CustomData_free_layer_named | ( | CustomData * | data, |
| const StringRef | name, | ||
| const int | totelem ) |
Definition at line 3332 of file customdata.cc.
References CustomData_free_layer().
Referenced by BM_data_layer_free_named(), BM_mesh_bm_from_me(), blender::bm_to_mesh_edges(), blender::bm_to_mesh_loops(), blender::bm_to_mesh_verts(), blender::bke::curve_to_mesh_sweep(), blender::bke::curves_new_no_attributes(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), getCCGDerivedMesh(), blender::bke::mesh_new_no_attributes(), MOD_solidify_nonmanifold_modifyMesh(), blender::bke::pointcloud_new_no_attributes(), blender::bke::subdiv::subdiv_mesh_topology_info(), blender::bke::BuiltinCustomDataLayerProvider::try_delete(), blender::bke::bake::try_load_curves_geometry(), blender::bke::bake::try_load_mesh(), and blender::bke::bake::try_load_pointcloud().
| void CustomData_free_layers | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| int | totelem ) |
Same as CustomData_free_layer_active, but free all layers with type.
Definition at line 3353 of file customdata.cc.
References CustomData_free_layer(), and CustomData_get_layer_index().
Referenced by blo_do_versions_260(), blo_do_versions_280(), BLO_update_defaults_startup_blend(), data_transfer_dtdata_type_postprocess(), blender::bke::mesh_calc_modifiers(), mesh_customdata_clear_exec__internal(), mesh_customdata_custom_splitnormals_clear_exec(), mesh_wrapper_ensure_subdivision(), modify_mesh(), modify_mesh(), modify_mesh(), multires_create_grids_in_unsubdivided_base_mesh(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::remove_unsupported_corner_data(), blender::nodes::node_geo_extrude_mesh_cc::remove_unsupported_edge_data(), blender::nodes::node_geo_extrude_mesh_cc::remove_unsupported_face_data(), blender::nodes::node_geo_extrude_mesh_cc::remove_unsupported_vert_data(), and triangulate_mesh().
| void CustomData_free_typemask | ( | CustomData * | data, |
| int | totelem, | ||
| eCustomDataMask | mask ) |
Same as CustomData_free, but only frees layers which matches the given mask.
Definition at line 2756 of file customdata.cc.
References CD_TYPE_AS_MASK, CustomData_external_free(), customData_free_layer__internal(), CustomData_reset(), and MEM_freeN().
| int CustomData_get_active_layer | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2892 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by BKE_mesh_calc_loop_tangent_step_0(), BM_uv_map_get_offsets(), bpy_bmlayercollection_active_get(), bpy_bmlayercollection_verify(), GeometryExporter::create_mesh_primitive_list(), CustomData_bmesh_do_versions_update_active_layers(), data_transfer_layersmapping_cdlayers(), ED_mesh_uv_add(), ED_mesh_uv_loop_reset(), blender::draw::extract_edituv_stretch_angle_subdiv(), blender::draw::extract_tan_init_common(), blender::io::alembic::get_uv_sample(), blender::draw::mesh_cd_calc_active_uv_layer(), blender::draw::mesh_extract_uv_format_init(), overlay_edit_uv_cache_populate(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), update_active_fdata_layers(), uv_texture_remove_poll(), and blender::io::alembic::write_custom_data().
| int CustomData_get_active_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2851 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by InstanceWriter::add_material_bindings(), blender::ed::object::bake_object_check(), bc_CustomData_get_active_layer_name(), bc_get_active_UVLayer(), BKE_mesh_legacy_attribute_flags_to_strings(), BKE_paint_canvas_uvmap_layer_index_get(), blo_do_versions_300(), GeometryExporter::createTexcoordsSource(), CustomData_bmesh_get(), CustomData_external_add(), CustomData_external_remove(), CustomData_external_test(), CustomData_free_layer_active(), CustomData_get_active_layer_name(), CustomData_get_layer(), CustomData_get_layer_for_write(), CustomData_get_offset(), CustomData_validate_layer_name(), and lineart_geometry_object_load().
| const char * CustomData_get_active_layer_name | ( | const CustomData * | data, |
| eCustomDataType | type ) |
Returns name of the active layer of the given type or NULL if no such active layer is defined.
Definition at line 2920 of file customdata.cc.
References CustomData_get_active_layer_index().
Referenced by BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_calc_loop_tangent_single(), BKE_mesh_legacy_convert_uvs_to_generic(), do_lasso_select_mesh_uv(), DRW_shgroup_call_sculpt(), ED_uvedit_ensure_uvs(), ED_uvedit_selectmode_clean(), ED_uvedit_selectmode_flush(), blender::geometry::execute_realize_mesh_tasks(), blender::draw::extract_face_dots_uv_mesh(), blender::draw::extract_uv_stretch_angle_mesh(), blender::io::ply::generate_vertex_map(), get_mesh_active_uvlayer_name(), get_uv_attribute(), blender::io::ply::load_custom_attributes(), mesh_uv_texture_remove_exec(), blender::ed::object::object_curves_empty_hair_add_exec(), RE_generate_texturemargin_adjacentfaces(), blender::draw::sculpt_batches_get(), blender::geometry::separate_geometry(), blender::io::obj::OBJMesh::store_uv_coords_and_indices(), blender::ed::curves::surface_set::surface_set_exec(), blender::bke::pbvh::pixels::update_pixels(), uv_box_select_exec(), uv_circle_select_exec(), uv_hide_exec(), uv_mouse_select_multi(), uv_pin_exec(), uv_reveal_exec(), uv_rip_object(), 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_split_exec(), uvedit_deselect_flush(), and uvedit_select_flush().
| int CustomData_get_clone_layer | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2906 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), proj_paint_layer_clone_init(), and update_active_fdata_layers().
| int CustomData_get_clone_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2865 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
| size_t CustomData_get_elem_size | ( | const CustomDataLayer * | layer | ) |
Definition at line 5592 of file customdata.cc.
References LAYERTYPEINFO, and LayerTypeInfo::size.
Referenced by bm_to_mesh_copy_info_calc(), CustomData_count_memory(), ED_mesh_color_add(), and mesh_to_bm_copy_info_calc().
| void * CustomData_get_for_write | ( | CustomData * | data, |
| int | index, | ||
| eCustomDataType | type, | ||
| int | totelem ) |
Retrieve a pointer to an element of the active layer of the given type, chosen by the index, if it exists.
Definition at line 3670 of file customdata.cc.
References BLI_assert, CustomData_get_layer_for_write(), layerType_getInfo(), and POINTER_OFFSET.
Referenced by bm_corners_to_loops_ex(), join_mesh_single(), psys_face_mat(), and psys_get_dupli_texture().
| const void * CustomData_get_layer | ( | const CustomData * | data, |
| eCustomDataType | type ) |
Retrieve the data array of the active layer of the given type, if it exists. Return null otherwise.
Definition at line 3695 of file customdata.cc.
References CustomData_get_active_layer_index().
Referenced by blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter(), blender::ed::object::bake_targets_populate_pixels_color_attributes(), base_skin(), BKE_bvhtree_from_mesh_get(), BKE_keyblock_mesh_calc_normals(), BKE_mesh_calc_edges_legacy(), BKE_mesh_calc_loop_tangents(), BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_do_versions_cd_flag_init(), BKE_mesh_do_versions_convert_mfaces_to_mpolys(), 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_legacy_convert_edges_to_generic(), BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_mpoly_to_material_indices(), BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_legacy_convert_verts_to_positions(), BKE_mesh_legacy_sharp_faces_from_flags(), BKE_mesh_new_nomain_from_template_ex(), BKE_object_as_kdtree(), BKE_object_data_transfer_ex(), BKE_subdiv_ccg_mask_init_from_paint(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_300(), blender::ed::spreadsheet::build_mesh_debug_columns(), cdDM_from_mesh_ex(), cloth_from_object(), construct_param_handle_subsurfed(), contarget_get_mesh_mat(), convert_mfaces_to_mpolys(), create_mesh(), CustomData_debug_info_from_layers(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_vgroups(), blender::bke::CurvesGeometry::deform_verts(), deformVerts_do(), blender::bke::subdiv::displacement_init_data(), blender::draw::draw_subdiv_topology_info_cb(), blender::draw::DRW_mesh_batch_cache_create_requested(), ED_mesh_pick_face_vert(), ED_mesh_uv_add(), ED_operator_uvmap_mesh(), blender::bke::editbmesh_calc_modifiers(), blender::draw::extract_orco(), blender::draw::extract_tan_init_common(), final_skin(), get_levels_from_disps(), get_particle_uv(), get_vertex_group(), give_parvert(), imapaint_pick_uv(), blender::io::obj::OBJImportTest::import_and_check(), Freestyle::BlenderFileLoader::insertShapeNode(), join_mesh_single(), lattice_deform_coords_impl(), make_duplis_faces(), make_duplis_verts(), mask_init_data(), mesh_calc_tri_tessface(), mesh_get_x_mirror_faces(), mesh_loops_to_tessdata(), blender::draw::mesh_render_data_create(), multires_apply_smat(), multires_ensure_external_read(), multires_modifier_update_mdisps(), multires_output_hidden_to_ccgdm(), multiresModifier_set_levels_from_disps(), paintface_flush_flags(), paintvert_flush_flags(), blender::draw::particle_calculate_parent_mcol(), blender::draw::particle_calculate_parent_uvs(), blender::draw::particle_interpolate_children_mcol(), blender::draw::particle_interpolate_children_uvs(), particle_intersect_mesh(), PE_mirror_x(), pointdensity_cache_vertex_weight(), 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_particle_dm_face_lookup(), psys_particle_on_dm(), psys_thread_context_init_distribute(), RE_bake_pixels_populate(), recalc_emitter_field(), remap_hair_emitter(), sculpt_multires_modifier_get(), set_ccgdm_all_geometry(), subdivide_base(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), weightvg_do_mask(), blender::io::hydra::HairData::write_curves(), and blender::io::alembic::write_generated_coordinates().
| void * CustomData_get_layer_for_write | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | totelem ) |
Definition at line 3705 of file customdata.cc.
References CustomData_get_active_layer_index(), and ensure_layer_data_is_mutable().
Referenced by BKE_mesh_calc_edges_legacy(), BKE_mesh_calc_edges_tessface(), BKE_mesh_is_valid(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_runtime_is_valid(), BKE_mesh_validate(), blo_do_versions_250(), blo_do_versions_290(), blo_update_defaults_scene(), context_init_grid_pointers(), createFacepa(), CustomData_get_for_write(), cutEdges(), data_transfer_dtdata_type_postprocess(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_generate(), data_transfer_layersmapping_vgroups(), deform_verts(), blender::bke::CurvesGeometry::deform_verts_for_write(), distribute_children_exec(), distribute_from_faces_exec(), distribute_from_verts_exec(), distribute_from_volume_exec(), distribute_grid(), DM_get_edge_data_layer(), DM_get_loop_data_layer(), DM_get_poly_data_layer(), DM_get_vert_data_layer(), dynamicPaint_Modifier_apply(), ensure_displacement_grids(), ensure_mask_grids(), explodeMesh(), get_dface(), blender::nodes::node_geo_extrude_mesh_cc::get_orig_index_layer(), get_particle_uv(), blender::bke::mesh_calc_modifiers(), blender::bke::mesh_flip_faces(), blender::bke::mesh_init_origspace(), mesh_merge_transform(), blender::bke::mesh::mesh_set_custom_normals(), mesh_wrapper_ensure_subdivision(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), blender::ed::object::modifier_skin_armature_create(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), multires_apply_uniform_scale(), multires_del_higher(), multires_modifier_update_hidden(), multires_set_tot_mdisps(), multires_subdivide_create_object_space_linear_grids(), multires_topology_changed(), multiresModifier_del_levels(), multiresModifier_disp_run(), normalEditModifier_do(), blender::bke::orco_coord_layer_ensure(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), psys_face_mat(), psys_interpolate_value_from_verts(), psys_map_index_on_dm(), psys_particle_dm_face_lookup(), psys_particle_on_dm(), psys_thread_context_init_distribute(), blender::io::alembic::read_generated_coordinates(), blender::bke::subdiv::subdiv_mesh_ctx_cache_custom_data_layers(), subdivide_base(), and triangulate_mesh().
| int CustomData_get_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2806 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
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(), bpy_bmlayercollection_items(), bpy_bmlayercollection_keys(), bpy_bmlayercollection_values(), copy_ccg_data(), customData_add_layer__internal(), CustomData_bmesh_get_n(), CustomData_copy_layer_type_data(), CustomData_free_layer(), CustomData_free_layers(), CustomData_get_layer_index_n(), CustomData_has_layer(), do_multires_bake(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), blender::draw::extract_tan_init_common(), and lineart_geometry_object_load().
|
static |
Definition at line 2791 of file customdata.cc.
Referenced by CustomData_free_layer().
| int CustomData_get_layer_index_n | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 2812 of file customdata.cc.
References BLI_assert, and CustomData_get_layer_index().
Referenced by blender::ed::object::add_shapekey_layers(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_calc_loop_tangent_ex(), BM_data_layer_free_n(), BM_mesh_bm_from_me(), bm_to_mesh_copy_info_calc(), BM_uv_map_get_offsets_from_layer(), bpy_bmlayeritem_get(), GeometryExporter::createTexcoordsSource(), CustomData_get_layer_n(), CustomData_get_layer_n_for_write(), CustomData_get_layer_name(), CustomData_get_n_offset(), CustomData_layer_is_anonymous(), CustomData_set_layer_name(), DRW_shgroup_call_sculpt_with_materials(), mesh_to_bm_copy_info_calc(), move_shapekey_layers_to_keyblocks(), and blender::draw::sculpt_batches_per_material_get().
| const void * CustomData_get_layer_n | ( | const CustomData * | data, |
| eCustomDataType | type, | ||
| int | n ) |
Retrieve the data array of the nth layer of the given type, if it exists. Return null otherwise.
Definition at line 3718 of file customdata.cc.
References CustomData_get_layer_index_n().
Referenced by GeometryExporter::createTexcoordsSource(), GeometryExporter::createVertexColorSource(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::bke::subdiv::eval_refine_from_mesh(), blender::draw::extract_tangents(), blender::draw::extract_tangents_subdiv(), blender::io::alembic::get_uv_sample(), make_duplis_faces(), mesh_loops_to_tessdata(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), blender::bke::subdiv::precalc_uv_layer(), proj_paint_layer_clone_init(), project_paint_begin(), psys_get_dupli_texture(), RE_bake_pixels_populate(), set_subsurf_legacy_uv(), and blender::io::alembic::write_custom_data().
| void * CustomData_get_layer_n_for_write | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n, | ||
| const int | totelem ) |
Definition at line 3727 of file customdata.cc.
References CustomData_get_layer_index_n(), and ensure_layer_data_is_mutable().
Referenced by arrayModifier_doArray(), BKE_mesh_merge_customdata_for_apply_modifier(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), CustomData_get_n_for_write(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), ED_mesh_uv_loop_reset_ex(), blender::bke::flip_custom_data_type(), mesh_loops_to_tessdata(), modify_mesh(), 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(), and blender::bke::subdiv::subdiv_mesh_ctx_cache_uv_layers().
| const char * CustomData_get_layer_name | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 3812 of file customdata.cc.
References CustomData_get_layer_index_n().
Referenced by BKE_mesh_calc_loop_tangent_step_0(), BKE_mesh_legacy_convert_uvs_to_generic(), blender::bm_face_loop_table_build(), BM_mesh_bm_from_me(), BM_uv_map_ensure_select_and_pin_attrs(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::ed::object::dt_add_vcol_layers(), blender::ed::object::dt_layers_select_src_itemf(), ED_mesh_uv_map_edge_select_layer_ensure(), ED_mesh_uv_map_edge_select_layer_get(), ED_mesh_uv_map_pin_layer_ensure(), ED_mesh_uv_map_pin_layer_get(), ED_mesh_uv_map_vert_select_layer_ensure(), ED_mesh_uv_map_vert_select_layer_get(), blender::draw::ensure_attributes(), blender::draw::extract_tan_init_common(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::io::alembic::get_uv_sample(), blender::draw::mesh_extract_uv_format_init(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), and blender::io::alembic::write_custom_data().
| const void * CustomData_get_layer_named | ( | const CustomData * | data, |
| eCustomDataType | type, | ||
| blender::StringRef | name ) |
Retrieve the data array of the layer with the given name and type, if it exists. Return null otherwise.
Definition at line 3741 of file customdata.cc.
References CustomData_get_named_layer_index().
Referenced by BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_legacy_convert_uvs_to_generic(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_object_defgroup_clear(), data_transfer_layersmapping_generate(), dm_getCornerEdgeArray(), do_multires_bake(), dynamicPaint_createUVSurface(), dynamicPaint_setInitialColor(), blender::draw::extract_tangents(), blender::draw::extract_tangents_subdiv(), get_particle_uv(), blender::bke::get_span_attribute(), blender::bke::get_varray_attribute(), imapaint_pick_uv(), mesh_loop_boolean_custom_data_get_by_name(), mesh_tessface_calc(), mesh_to_softbody(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), multires_unsubdivide_extract_grids(), multires_unsubdivide_prepare_original_bmesh_for_extract(), paint_sample_color(), pointdensity_cache_vertex_color(), proj_paint_face_lookup_init(), proj_paint_state_mesh_eval_init(), project_paint_clone_face_skip(), project_paint_prepare_all_faces(), blender::bke::Instances::reference_handles(), remap_hair_emitter(), ss_sync_ccg_from_derivedmesh(), blender::bke::Instances::transforms(), and blender::ed::object::vgroup_smooth_subset().
| void * CustomData_get_layer_named_for_write | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name, | ||
| const int | totelem ) |
Definition at line 3752 of file customdata.cc.
References CustomData_get_named_layer_index(), and ensure_layer_data_is_mutable().
Referenced by blender::io::alembic::add_customdata_cb(), BKE_mesh_calc_edges_tessface(), cdDM_from_mesh_ex(), convert_grease_pencil_stroke_hardness_to_softness(), convert_mfaces_to_mpolys(), data_transfer_layersmapping_generate(), blender::ed::sculpt_paint::dyntopo::disable(), dm_getCornerVertArray(), dm_getEdgeArray(), dm_getVertArray(), dynamicPaint_Modifier_apply(), ensure_corner_boolean_attribute(), explodeMesh(), fix_built_in_curve_attribute_defaults(), blender::bke::get_mutable_attribute(), blender::bke::greasepencil::get_mutable_attribute(), join_mesh_single(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modify_mesh(), modify_mesh(), blender::bke::Instances::reference_handles_for_write(), blender::bke::Instances::transforms_for_write(), blender::bke::BuiltinCustomDataLayerProvider::try_get_for_write(), and blender::bke::CustomDataAttributeProvider::try_get_for_write().
| void * CustomData_get_n_for_write | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| int | index, | ||
| int | n, | ||
| int | totelem ) |
Retrieve a pointer to an element of the nth layer of the given type, chosen by the index, if it exists.
Definition at line 3683 of file customdata.cc.
References BLI_assert, CustomData_get_layer_n_for_write(), layerType_getInfo(), and POINTER_OFFSET.
Referenced by bm_corners_to_loops_ex().
| int CustomData_get_n_offset | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 3775 of file customdata.cc.
References CustomData_get_layer_index_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(), and make_duplis_faces().
| int CustomData_get_named_layer | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name ) |
Definition at line 2882 of file customdata.cc.
References BLI_assert, CustomData_get_named_layer_index(), and customdata_typemap_is_valid().
Referenced by blender::ed::object::bake(), bpy_bmlayercollection_get(), bpy_bmlayercollection_subscript_str(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::draw::drw_custom_data_match_attribute(), ED_mesh_color_add(), blender::draw::ensure_attributes(), blender::geometry::execute_realize_mesh_tasks(), blender::draw::mesh_cd_calc_used_gpu_layers(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), RE_bake_pixels_populate(), blender::draw::request_attribute(), blender::geometry::separate_geometry(), and update_active_fdata_layers().
| int CustomData_get_named_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name ) |
Definition at line 2825 of file customdata.cc.
Referenced by bevel_set_weighted_normal_face_strength(), BKE_attribute_new(), BKE_editmesh_loop_tangent_calc(), BKE_mesh_add_loop_tangent_named_layer_for_uv(), BKE_mesh_calc_loop_tangent_ex(), BKE_paint_canvas_uvmap_layer_index_get(), BM_data_layer_ensure_named(), blender::bm_face_loop_table_build(), BM_mesh_bm_from_me(), bm_to_mesh_copy_info_calc(), bpy_bmlayercollection_contains(), convert_grease_pencil_stroke_hardness_to_softness(), CustomData_copy_data_named(), CustomData_get_layer_named(), CustomData_get_layer_named_for_write(), CustomData_get_named_layer(), CustomData_get_offset_named(), CustomData_has_layer_named(), customdata_merge_internal(), CustomData_validate_layer_name(), dynamicPaint_outputLayerExists(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), mesh_to_bm_copy_info_calc(), multires_unsubdivide_free_original_datalayers(), and blender::bke::BuiltinCustomDataLayerProvider::try_get_for_read().
| int CustomData_get_named_layer_index_notype | ( | const CustomData * | data, |
| const StringRef | name ) |
Definition at line 2840 of file customdata.cc.
Referenced by BKE_attribute_remove().
| int CustomData_get_offset | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 3766 of file customdata.cc.
References CustomData_get_active_layer_index().
Referenced by armature_deform_coords_impl(), bevel_harden_normals(), BKE_object_defgroup_clear(), 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_loop_interp_multires(), BM_loop_normal_editdata_array_init(), BM_mesh_bm_from_me(), BM_mesh_calc_uvs_cube(), BM_mesh_remap(), BM_mesh_wireframe(), bm_to_mesh_shape(), bm_to_mesh_vertex_map(), 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_handle(), construct_param_handle_multi(), correct_uv_aspect(), correct_uv_aspect_per_face(), curve_deform_coords_impl(), deformVerts_do(), ED_mesh_active_dvert_get_em(), edbm_average_normals_exec(), edbm_decimate_exec(), edbm_select_ungrouped_exec(), edbm_select_ungrouped_poll(), edbm_set_normals_from_faces_exec(), blender::draw::extract_face_dots_uv_bm(), blender::draw::extract_skin_roots(), blender::draw::extract_uv_stretch_angle_bm(), blender::draw::extract_weights_bm(), blender::ed::object::get_vert_def_nr(), get_weights_array(), lattice_deform_coords_impl(), blender::geometry::boolean::mesh_bm_concat(), mesh_customdatacorrect_init_container_generic(), blender::draw::mesh_render_data_create(), blender::draw::mesh_render_data_update_corner_normals(), normals_split(), object_defgroup_remove_edit_mode(), overlay_edit_mesh_add_ob_to_pass(), blender::ed::object::return_editmesh_vgroup(), select_linked_delimit_begin(), similar_vert_select_exec(), blender::ed::object::skin_root_mark_exec(), stitch_process_data(), uv_copy_exec(), uv_find_nearest_face_ex(), uv_find_nearest_loop_from_edge(), uv_find_nearest_loop_from_vert(), uv_from_view_exec(), uv_paste_exec(), uv_sculpt_stroke_apply(), uv_select_overlap(), uv_select_similar_island_exec(), v3d_editvertex_buts(), blender::ed::object::vgroup_assign_verts(), blender::ed::object::vgroup_copy_active_to_sel(), blender::ed::object::vgroup_copy_active_to_sel_single(), blender::ed::object::vgroup_do_remap(), blender::ed::object::vgroup_mirror(), blender::ed::object::vgroup_normalize_active_vertex(), blender::ed::object::vgroup_parray_alloc(), blender::ed::object::vgroup_select_verts(), and blender::ed::object::vgroup_vert_active_mirror().
| int CustomData_get_offset_named | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name ) |
Definition at line 3785 of file customdata.cc.
References CustomData_get_named_layer_index().
Referenced by blender::ed::sculpt_paint::expand::any_nonzero_mask(), blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_from_settings(), blender::ed::object::bake_targets_output_vertex_colors(), BKE_pbvh_bmesh_after_stroke(), 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_mesh_wireframe(), BM_uv_map_get_offsets_from_layer(), blender::ed::sculpt_paint::undo::bmesh_push(), blender::bke::pbvh::bmesh_update_topology(), bmo_bevel_exec(), blender::ed::sculpt_paint::pose::calc_average_face_set_center(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), createTransEdge(), createTransMeshVertCData(), CustomData_bmesh_copy_map_calc(), blender::ed::sculpt_paint::do_mask_brush(), blender::ed::sculpt_paint::do_smooth_mask_brush(), blender::ed::sculpt_paint::mask::duplicate_mask(), blender::ed::sculpt_paint::face_set::ensure_face_sets_bmesh(), blender::draw::extract_attribute(), blender::draw::extract_sculpt_data(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::mask::fill_mask_bmesh(), blender::draw::pbvh::fill_vbos_bmesh(), blender::ed::sculpt_paint::face_set::find_next_available_id(), blender::bke::pbvh::Tree::from_bmesh(), blender::ed::sculpt_paint::mask::gather_mask_bmesh(), geometry_extract_tag_face_set(), geometry_extract_tag_masked_faces(), blender::ed::sculpt_paint::face_set::gesture_apply_bmesh(), blender::ed::sculpt_paint::mask::gesture_apply_for_symmetry_pass(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::auto_mask::init_boundary_masking_bmesh(), blender::ed::sculpt_paint::boundary::init_falloff_bmesh(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::ed::sculpt_paint::mask::invert_mask_bmesh(), blender::draw::mesh_render_data_create(), modify_mesh(), mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), multires_unsubdivide_extract_grids(), blender::ed::sculpt_paint::hide::partialvis_masked_update_bmesh(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::mask::scatter_mask_bmesh(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), similar_edge_select_exec(), similar_vert_select_exec(), slice_paint_mask(), blender::ed::sculpt_paint::expand::update_for_vert(), blender::bke::pbvh::update_mask_bmesh(), v3d_editvertex_buts(), and blender::ed::sculpt_paint::expand::write_mask_data().
| int CustomData_get_render_layer | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2899 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by BKE_mesh_calc_loop_tangent_step_0(), blender::draw::curves_sub_pass_setup_implementation(), CustomData_bmesh_do_versions_update_active_layers(), blender::draw::DRW_shgroup_curves_create_sub(), blender::draw::ensure_attributes(), blender::draw::extract_tan_init_common(), make_duplis_faces(), blender::draw::mesh_cd_calc_used_gpu_layers(), blender::draw::mesh_extract_uv_format_init(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), psys_get_dupli_texture(), and update_active_fdata_layers().
| int CustomData_get_render_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2858 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by BKE_mesh_legacy_attribute_flags_to_strings(), blo_do_versions_300(), and CustomData_get_render_layer_name().
| const char * CustomData_get_render_layer_name | ( | const CustomData * | data, |
| eCustomDataType | type ) |
Returns name of the default layer of the given type or NULL if no such active layer is defined.
Definition at line 2927 of file customdata.cc.
References CustomData_get_render_layer_index().
Referenced by attr_create_subd_uv_map(), attr_create_uv_map(), BKE_mesh_calc_loop_tangent_ex(), BKE_mesh_legacy_convert_uvs_to_generic(), blender::geometry::execute_realize_mesh_tasks(), and blender::geometry::separate_geometry().
| int CustomData_get_stencil_layer | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2913 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), blender::draw::mesh_cd_calc_active_mask_uv_layer(), blender::draw::mesh_extract_uv_format_init(), project_paint_begin(), and update_active_fdata_layers().
| int CustomData_get_stencil_layer_index | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 2872 of file customdata.cc.
References BLI_assert, and customdata_typemap_is_valid().
| bool CustomData_has_interp | ( | const CustomData * | data | ) |
Definition at line 4230 of file customdata.cc.
References CustomData_layer_has_interp().
Referenced by bm_grid_fill_array(), and BM_mesh_decimate_collapse().
| bool CustomData_has_layer | ( | const CustomData * | data, |
| eCustomDataType | type ) |
Returns true if a layer with the specified type exists.
Definition at line 3368 of file customdata.cc.
References CustomData_get_layer_index().
Referenced by blender::ed::spreadsheet::add_mesh_debug_column_names(), BKE_main_mesh_legacy_convert_auto_smooth(), BKE_mesh_ensure_skin_customdata(), BKE_mesh_has_custom_loop_normals(), BKE_mesh_legacy_bevel_weight_to_layers(), BKE_mesh_legacy_convert_mpoly_to_material_indices(), BKE_mesh_legacy_convert_uvs_to_generic(), BKE_mesh_legacy_edge_crease_to_layers(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_nomain_to_mesh(), BKE_mesh_orco_ensure(), BKE_sculpt_mask_layers_ensure(), BKE_subsurf_modifier_use_custom_loop_normals(), BKE_view_layer_filter_edit_mesh_has_uvs(), blo_do_versions_280(), blo_update_defaults_scene(), 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(), bmesh_edit_begin(), bmesh_edit_end(), blender::draw::bmesh_normals_domain(), 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(), createTransMeshSkin(), blender::draw::curves_sub_pass_setup_implementation(), customData_add_layer__internal(), CustomData_bmesh_do_versions_update_active_layers(), CustomData_debug_info_from_layers(), blender::bke::subdiv::displacement_attach_from_multires(), displaceModifier_do(), blender::draw::draw_subdiv_create_requested_buffers(), blender::draw::draw_subdiv_invalidate_evaluator_for_orco(), blender::draw::DRW_shgroup_curves_create_sub(), dynamicPaint_createUVSurface(), ED_mesh_uv_add(), 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(), blender::bke::editbmesh_calc_modifiers(), ensure_orig_index_layer(), GeometryExporter::export_key_mesh(), flip_custom_normals_init_data(), give_parvert(), blender::io::obj::OBJImportTest::import_and_check(), math_layer_info_init(), blender::bke::mesh_calc_modifiers(), mesh_customdata_clear_exec__internal(), mesh_customdata_custom_splitnormals_clear_exec(), mesh_customdata_mask_clear_poll(), mesh_customdata_skin_state(), mesh_customdatacorrect_create_impl(), mesh_loops_to_tessdata(), MOD_get_texture_coords(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), modify_mesh(), blender::modifyGeometry(), 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(), blender::ed::object::multiresbake_check(), multiresModifier_disp_run(), multiresModifier_subdivide_to_level(), blender::ed::object::object_convert_exec(), blender::workbench::ObjectState::ObjectState(), GeometryExporter::operator()(), paint_sample_color(), paintface_minmax(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), pointdensity_cache_vertex_color(), proj_paint_state_mesh_eval_init(), blender::io::alembic::read_generated_coordinates(), select_linked_delimit_validate(), shape_itemf(), shape_propagate(), similar_edge_select_exec(), similar_face_select_exec(), blender::ed::object::skin_armature_create_exec(), blender::ed::object::skin_loose_mark_clear_exec(), blender::ed::object::skin_radii_equalize_exec(), update_active_fdata_layers(), uvedit_unwrap(), blender::ed::object::vgroup_assign_verts(), and blender::io::alembic::write_custom_data().
| bool CustomData_has_layer_named | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name ) |
Definition at line 3361 of file customdata.cc.
References CustomData_get_named_layer_index().
Referenced by assert_bmesh_has_no_mesh_only_attributes(), BKE_mesh_legacy_convert_edges_to_generic(), BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_verts_to_positions(), createTransEdge(), createTransMeshVertCData(), data_transfer_layersmapping_generate(), edgetag_ensure_cd_flag(), blender::ed::sculpt_paint::face_set::ensure_face_sets_bmesh(), blender::bke::BuiltinCustomDataLayerProvider::exists(), mesh_add_edges(), mesh_add_loops(), mesh_add_verts(), mesh_customdata_mask_clear_poll(), blender::draw::overlay::Sculpts::mesh_sync(), OVERLAY_sculpt_cache_populate(), similar_edge_select_exec(), similar_vert_select_exec(), blender::bke::BuiltinCustomDataLayerProvider::try_create(), and v3d_editvertex_buts().
| bool CustomData_has_math | ( | const CustomData * | data | ) |
Checks if any of the custom-data layers has math.
Definition at line 4207 of file customdata.cc.
References CustomData_layer_has_math().
Referenced by BM_face_split_edgenet(), BM_mesh_decimate_collapse(), bmo_collapse_uvs_exec(), bmo_inset_region_exec(), mesh_customdatacorrect_create_impl(), and mesh_customdatacorrect_init_container_merge_group().
| void CustomData_init_from | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| eCustomDataMask | mask, | ||
| int | totelem ) |
Initializes a CustomData object with the same layer setup as source. mask is a bit-field where (mask & (1 << (layer type))) indicates if a layer should be copied or not. Data layers using implicit-sharing will not actually be copied but will be shared between source and destination.
dest CustomData, code must call CustomData_free first if needed. Definition at line 2685 of file customdata.cc.
References CustomData_merge(), CustomData_reset(), CustomData::external, and MEM_dupallocN.
Referenced by BKE_grease_pencil_nomain_to_grease_pencil(), BKE_mesh_nomain_to_mesh(), BKE_pointcloud_nomain_to_pointcloud(), blender::bke::curves::copy_only_curve_domain(), blender::bke::CurvesGeometry::CurvesGeometry(), grease_pencil_copy_data(), blender::bke::Instances::Instances(), mesh_copy_data(), pointcloud_copy_data(), blender::ed::sculpt_paint::undo::restore_geometry_data(), blender::ed::sculpt_paint::undo::store_geometry_data(), and blender::bke::subdiv::subdiv_mesh_topology_info().
| void CustomData_init_layout_from | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| eCustomDataMask | mask, | ||
| eCDAllocType | alloctype, | ||
| int | totelem ) |
Initializes a CustomData object with the same layers as source. The data is not copied from the source. Instead, the new layers are initialized using the given alloctype.
dest CustomData, code must call CustomData_free first if needed. Definition at line 2699 of file customdata.cc.
References CustomData_merge_layout(), CustomData_reset(), CustomData::external, and MEM_dupallocN.
Referenced by BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_new_nomain_from_template_ex(), BM_mesh_bm_from_me(), BM_mesh_copy_init_customdata(), BM_mesh_copy_init_customdata_from_mesh_array(), DM_from_template(), blender::bke::subdiv::loop_interpolation_init(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), blender::geometry::reorder_customdata(), reorder_customdata(), blender::geometry::reorder_customdata_groups(), shrink_customdata(), blender::bke::subdiv::subdiv_mesh_topology_info(), and blender::bke::subdiv::vertex_interpolation_init().
| void CustomData_interp | ( | const CustomData * | source, |
| 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. |
Definition at line 3574 of file customdata.cc.
References copy_vn_fl(), count, CustomDataLayer::data, ELEM, LayerTypeInfo::interp, CustomData::layers, layerType_getInfo(), MEM_freeN(), MEM_malloc_arrayN, MEM_mallocN, POINTER_OFFSET, LayerTypeInfo::size, SOURCE_BUF_SIZE, CustomData::totlayer, and CustomDataLayer::type.
Referenced by add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_faces_to_new_mesh(), blender::geometry::customdata_weld(), DM_interp_vert_data(), blender::bke::subdiv::loop_interpolation_from_corner(), blender::bke::subdiv::loop_interpolation_init(), set_ccgdm_all_geometry(), blender::bke::subdiv::subdiv_interpolate_corner_data(), blender::bke::subdiv::subdiv_mesh_vertex_of_loose_edge_interpolate(), blender::bke::subdiv::subdiv_vertex_data_interpolate(), blender::bke::subdiv::vertex_interpolation_from_corner(), and blender::bke::subdiv::vertex_interpolation_init().
|
static |
Definition at line 4640 of file customdata.cc.
References BLI_assert, CD_PROP_BOOL, CD_PROP_FLOAT2, CLOG_WARN, count, layerType_getInfo(), layerType_getName(), LOG, MEM_calloc_arrayN, LayerTypeInfo::set_default_value, LayerTypeInfo::size, and CLG_LogRef::type.
Referenced by blend_read_layer_data(), and CustomData_layer_validate().
| bool CustomData_layer_has_interp | ( | const CustomData * | data, |
| const int | layer_n ) |
Definition at line 4196 of file customdata.cc.
References LayerTypeInfo::interp, and layerType_getInfo().
Referenced by CustomData_has_interp(), and blender::geometry::customdata_weld().
| bool CustomData_layer_has_math | ( | const CustomData * | data, |
| int | layer_n ) |
Checks if the layer at physical offset layer_n (in data->layers) support math the below operations.
Definition at line 4183 of file customdata.cc.
References LayerTypeInfo::add, LayerTypeInfo::dominmax, LayerTypeInfo::equal, LayerTypeInfo::initminmax, layerType_getInfo(), and LayerTypeInfo::multiply.
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(), CustomData_has_math(), blender::geometry::customdata_weld(), and mesh_customdatacorrect_init_container_merge_group().
| bool CustomData_layer_is_anonymous | ( | const CustomData * | data, |
| eCustomDataType | type, | ||
| int | n ) |
Definition at line 3069 of file customdata.cc.
References blender::bke::attribute_name_is_anonymous(), BLI_assert, and CustomData_get_layer_index_n().
Referenced by blender::draw::extract_edituv_stretch_angle_subdiv(), blender::draw::mesh_cd_calc_used_gpu_layers(), and blender::draw::mesh_extract_uv_format_init().
| bool CustomData_layer_validate | ( | 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 4676 of file customdata.cc.
References BLI_assert, CustomData_layer_ensure_data_exists(), layerType_getInfo(), MEM_allocN_len, LayerTypeInfo::size, and LayerTypeInfo::validate.
Referenced by mesh_validate_customdata().
| bool CustomData_layertype_is_dynamic | ( | eCustomDataType | 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 4469 of file customdata.cc.
References LayerTypeInfo::free, and layerType_getInfo().
Referenced by um_arraystore_cd_compact().
| bool CustomData_layertype_is_singleton | ( | eCustomDataType | type | ) |
Can only ever be one of these.
Definition at line 4463 of file customdata.cc.
References LayerTypeInfo::defaultname, and layerType_getInfo().
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 | ( | eCustomDataType | type | ) |
Definition at line 4476 of file customdata.cc.
References LayerTypeInfo::defaultname, LayerTypeInfo::layers_max, and layerType_getInfo().
Referenced by customdata_merge_internal().
| const char * CustomData_layertype_name | ( | eCustomDataType | type | ) |
Get the name of a layer type.
Definition at line 4458 of file customdata.cc.
References layerType_getName().
Referenced by CustomData_debug_info_from_layers().
| void customData_mask_layers__print | ( | const CustomData_MeshMasks * | mask | ) |
Definition at line 2299 of file customdata.cc.
References CD_NUMTYPES, CD_TYPE_AS_MASK, layerType_getName(), printf, and PRIx64.
| bool CustomData_merge | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| eCustomDataMask | mask, | ||
| int | totelem ) |
Copies all layers from source to destination that don't exist there yet.
Definition at line 2496 of file customdata.cc.
References customdata_merge_internal().
Referenced by BKE_mesh_to_pointcloud(), BKE_pointcloud_to_mesh(), cdDM_from_mesh_ex(), and CustomData_init_from().
|
static |
Definition at line 2404 of file customdata.cc.
References CustomDataLayer::active, CustomDataLayer::active_clone, CustomDataLayer::active_mask, CustomDataLayer::active_rnd, CD_FLAG_EXTERNAL, CD_FLAG_IN_MEMORY, CD_FLAG_NOCOPY, CD_TYPE_AS_MASK, copy_layer_data(), customData_add_layer__internal(), CustomData_get_named_layer_index(), CustomData_layertype_layers_max(), CustomData_number_of_layers(), CustomData_update_typemap(), CustomDataLayer::data, CustomDataLayer::flag, CustomData::layers, CustomDataLayer::name, CustomDataLayer::sharing_info, CustomData::totlayer, CustomDataLayer::type, and CustomDataLayer::uid.
Referenced by CustomData_merge(), and CustomData_merge_layout().
| bool CustomData_merge_layout | ( | const CustomData * | source, |
| CustomData * | dest, | ||
| eCustomDataMask | mask, | ||
| eCDAllocType | alloctype, | ||
| int | totelem ) |
Copies all layers from source to destination that don't exist there yet. The layer data is not copied. Instead the newly created layers are initialized using the given alloctype.
Definition at line 2504 of file customdata.cc.
References customdata_merge_internal().
Referenced by BM_mesh_bm_to_me_compact(), BM_mesh_copy_init_customdata_from_mesh_array(), CustomData_bmesh_merge_layout(), CustomData_init_layout_from(), join_mesh_single(), and blender::ed::greasepencil::join_object_with_active().
| 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 101 of file customdata.cc.
References CustomData_MeshMasks::emask, CustomData_MeshMasks::fmask, CustomData_MeshMasks::lmask, CustomData_MeshMasks::pmask, and CustomData_MeshMasks::vmask.
Referenced by blender::bke::editbmesh_get_eval_cage(), and blender::bke::mesh_get_eval_deform().
| 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 91 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_for_eval(), blender::ed::object::duplibase_for_convert(), ED_view3d_screen_datamask(), blender::bke::editbmesh_calc_modifiers(), blender::bke::mesh_calc_modifiers(), mesh_copy_data(), blender::bke::mesh_get_eval_deform(), blender::ed::object::object_convert_exec(), screen_opengl_render_init(), and wm_event_do_depsgraph().
| int CustomData_name_maxncpy_calc | ( | blender::StringRef | name | ) |
Definition at line 4529 of file customdata.cc.
References MAX_CUSTOMDATA_LAYER_NAME, MAX_CUSTOMDATA_LAYER_NAME_NO_PREFIX, UV_EDGESEL_NAME, UV_PINNED_NAME, and UV_VERTSEL_NAME.
Referenced by BKE_attribute_rename(), and CustomData_set_layer_unique_name().
| int CustomData_number_of_anonymous_layers | ( | const CustomData * | data, |
| const eCustomDataType | type ) |
Definition at line 3386 of file customdata.cc.
References blender::bke::attribute_name_is_anonymous().
| int CustomData_number_of_layers | ( | const CustomData * | data, |
| eCustomDataType | type ) |
Returns the number of layers with this type.
Definition at line 3373 of file customdata.cc.
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_legacy_convert_uvs_to_generic(), BKE_mesh_merge_customdata_for_apply_modifier(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_validate_all_customdata(), bm_edge_delimit_cdata(), blender::bm_face_loop_table_build(), BM_mesh_bm_from_me(), BM_mesh_decimate_dissolve_ex(), BM_uv_map_ensure_select_and_pin_attrs(), 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(), customdata_merge_internal(), CustomData_set_layer_active(), CustomData_set_layer_active_index(), CustomData_set_layer_clone(), CustomData_set_layer_clone_index(), CustomData_set_layer_render(), CustomData_set_layer_render_index(), CustomData_set_layer_stencil(), CustomData_set_layer_stencil_index(), cutEdges(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), blender::ed::object::dt_add_vcol_layers(), blender::ed::object::dt_layers_select_src_itemf(), ED_mesh_uv_add(), ED_mesh_uv_ensure(), ED_paint_proj_mesh_data_check(), edbm_blend_from_shape_exec(), blender::bke::subdiv::eval_refine_from_mesh(), blender::bke::flip_custom_data_type(), blender::bke::subdiv::get_num_uv_layers(), getActiveUVLayerName(), mesh_ensure_tessellation_customdata(), mesh_loops_to_tessdata(), mesh_validate_customdata(), modify_mesh(), move_shapekey_layers_to_keyblocks(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), set_ccgdm_all_geometry(), shape_propagate(), skin_smooth_hulls(), blender::bke::subdiv::subdiv_mesh_ctx_cache_uv_layers(), and blender::io::alembic::write_custom_data().
| int CustomData_number_of_layers_typemask | ( | const CustomData * | data, |
| const eCustomDataMask | mask ) |
Definition at line 3401 of file customdata.cc.
References CD_TYPE_AS_MASK.
Referenced by BKE_attributes_length(), and CustomData_bmesh_merge_layout().
| void CustomData_realloc | ( | CustomData * | data, |
| int | old_size, | ||
| int | new_size, | ||
| eCDAllocType | alloctype = CD_CONSTRUCT ) |
Reallocate custom data to a new element count. If the new size is larger, the new values use the CD_CONSTRUCT behavior, so trivial types must be initialized by the caller. After being resized, the CustomData does not contain any referenced layers.
Definition at line 2625 of file customdata.cc.
References LayerTypeInfo::alignment, BLI_assert, CD_CONSTRUCT, CD_SET_DEFAULT, LayerTypeInfo::construct, LayerTypeInfo::copy, layerType_getInfo(), make_implicit_sharing_info_for_layer(), MEM_mallocN_aligned(), POINTER_OFFSET, LayerTypeInfo::set_default_value, and LayerTypeInfo::size.
Referenced by blender::bke::Instances::add_instance(), BKE_pointcloud_new_nomain(), blender::nodes::node_geo_extrude_mesh_cc::expand_mesh(), pointcloud_random(), blender::geometry::propagate_edge_attributes(), blender::geometry::propagate_vert_attributes(), blender::bke::CurvesGeometry::resize(), blender::bke::Instances::resize(), and shrink_customdata().
| void CustomData_reset | ( | CustomData * | data | ) |
NULL's all members and resets the CustomData.typemap.
Definition at line 2736 of file customdata.cc.
References CD_NUMTYPES, and copy_vn_i().
Referenced by BKE_mesh_calc_edges_tessface(), BKE_mesh_legacy_convert_polys_to_offsets(), BM_mesh_clear(), BM_mesh_create(), bmo_get_loop_color_ref(), blender::bke::CurvesGeometry::CurvesGeometry(), blender::bke::CurvesGeometry::CurvesGeometry(), CustomData_blend_read(), CustomData_free(), CustomData_free_typemask(), CustomData_init_from(), CustomData_init_layout_from(), ED_mesh_join_objects_exec(), blender::draw::extract_tan_init_common(), grease_pencil_init_data(), blender::bke::greasepencil::tests::GreasePencilHelper::GreasePencilHelper(), blender::bke::Instances::Instances(), blender::bke::Instances::Instances(), blender::bke::mesh_calc_edges(), mesh_init_data(), mesh_tessface_clear_intern(), blender::nodes::node_geo_curve_to_points_cc::pointcloud_from_curves(), and pointcloud_init_data().
|
static |
Definition at line 3078 of file customdata.cc.
References MEM_reallocN.
Referenced by customData_add_layer__internal(), and CustomData_free_layer().
| void CustomData_set_layer_active | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| int | n ) |
Sets the nth layer of type as active.
Definition at line 2933 of file customdata.cc.
References BLI_assert, and CustomData_number_of_layers().
Referenced by CustomData_bmesh_do_versions_update_active_layers(), ED_mesh_uv_add(), blender::geometry::execute_realize_mesh_tasks(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::geometry::separate_geometry(), and update_active_fdata_layers().
| void CustomData_set_layer_active_index | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| int | n ) |
For using with an index from CustomData_get_active_layer_index and CustomData_get_render_layer_index.
Definition at line 2985 of file customdata.cc.
References BLI_assert, CustomData_number_of_layers(), and customdata_typemap_is_valid().
Referenced by BKE_editmesh_loop_tangent_calc(), and BKE_mesh_calc_loop_tangent_ex().
| void CustomData_set_layer_clone | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 2959 of file customdata.cc.
References BLI_assert, and CustomData_number_of_layers().
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), and update_active_fdata_layers().
| void CustomData_set_layer_clone_index | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 3017 of file customdata.cc.
References BLI_assert, CustomData_number_of_layers(), and customdata_typemap_is_valid().
| void CustomData_set_layer_flag | ( | CustomData * | data, |
| eCustomDataType | type, | ||
| int | flag ) |
Adds flag to the layer flags.
Definition at line 3049 of file customdata.cc.
References flag.
Referenced by BM_custom_loop_normals_to_vector_layer(), dm_getEdgeArray(), and dm_getVertArray().
| bool CustomData_set_layer_name | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n, | ||
| const StringRef | name ) |
Definition at line 3797 of file customdata.cc.
References CustomData_get_layer_index_n().
Referenced by blo_do_versions_270().
| void CustomData_set_layer_render | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 2946 of file customdata.cc.
References BLI_assert, and CustomData_number_of_layers().
Referenced by CustomData_bmesh_do_versions_update_active_layers(), blender::geometry::execute_realize_mesh_tasks(), blender::geometry::separate_geometry(), and update_active_fdata_layers().
| void CustomData_set_layer_render_index | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 3001 of file customdata.cc.
References BLI_assert, CustomData_number_of_layers(), and customdata_typemap_is_valid().
Referenced by BKE_editmesh_loop_tangent_calc(), and BKE_mesh_calc_loop_tangent_ex().
| void CustomData_set_layer_stencil | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 2972 of file customdata.cc.
References BLI_assert, and CustomData_number_of_layers().
Referenced by BKE_mesh_validate_all_customdata(), CustomData_bmesh_do_versions_update_active_layers(), and update_active_fdata_layers().
| void CustomData_set_layer_stencil_index | ( | CustomData * | data, |
| const eCustomDataType | type, | ||
| const int | n ) |
Definition at line 3033 of file customdata.cc.
References BLI_assert, CustomData_number_of_layers(), and customdata_typemap_is_valid().
| void CustomData_set_layer_unique_name | ( | CustomData * | data, |
| int | index ) |
Make sure the name of layer at index is unique.
Definition at line 4544 of file customdata.cc.
References BLI_uniquename_cb(), CustomData_name_maxncpy_calc(), customdata_unique_check(), data, DATA_, LayerTypeInfo::defaultname, layerType_getInfo(), CustomDataLayer::name, STRNCPY_UTF8, and CustomDataLayer::type.
Referenced by customData_add_layer__internal().
| void CustomData_set_only_copy | ( | const 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
Definition at line 3414 of file customdata.cc.
References CD_FLAG_NOCOPY, and CD_TYPE_AS_MASK.
Referenced by DM_set_only_copy(), blender::bke::mesh_set_only_copy(), and blender::ed::object::multiresbake_create_hiresdm().
| CustomData CustomData_shallow_copy_remove_non_bmesh_attributes | ( | const CustomData * | src, |
| eCustomDataMask | mask ) |
Remove layers that aren't stored in BMesh or are stored as flags on BMesh. The layers array of the returned CustomData must be freed, but may be null. Used during conversion of Mesh data to BMesh storage format.
Definition at line 2513 of file customdata.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), BM_attribute_stored_in_bmesh_builtin(), CD_TYPE_AS_MASK, CustomData_update_typemap(), blender::Vector< T, InlineBufferCapacity, Allocator >::data(), CustomData::layers, CustomData::maxlayer, MEM_calloc_arrayN, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and CustomData::totlayer.
Referenced by BM_mesh_bm_from_me(), and BM_mesh_copy_init_customdata_from_mesh_array().
| int CustomData_sizeof | ( | const eCustomDataType | type | ) |
Definition at line 4451 of file customdata.cc.
References layerType_getInfo(), and LayerTypeInfo::size.
Referenced by blend_read_layer_data(), 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_blend_write(), CustomData_debug_info_from_layers(), blender::geometry::customdata_weld(), blender::bke::flip_custom_data_type(), um_arraystore_cd_compact(), um_arraystore_cd_expand(), and um_arraystore_cd_free().
| void CustomData_swap_corners | ( | 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 3657 of file customdata.cc.
References layerType_getInfo(), POINTER_OFFSET, LayerTypeInfo::size, and LayerTypeInfo::swap.
Referenced by BKE_mesh_mface_index_validate().
|
static |
Definition at line 2373 of file customdata.cc.
References CustomData_update_typemap(), data, and CustomData::typemap.
Referenced by CustomData_get_active_layer(), CustomData_get_active_layer_index(), CustomData_get_clone_layer(), CustomData_get_clone_layer_index(), CustomData_get_layer_index(), CustomData_get_named_layer(), CustomData_get_render_layer(), CustomData_get_render_layer_index(), CustomData_get_stencil_layer(), CustomData_get_stencil_layer_index(), CustomData_set_layer_active_index(), CustomData_set_layer_clone_index(), CustomData_set_layer_render_index(), and CustomData_set_layer_stencil_index().
|
static |
Definition at line 4523 of file customdata.cc.
References cd_layer_find_dupe(), CustomDataUniqueCheckData::data, CustomDataUniqueCheckData::index, and CustomDataUniqueCheckData::type.
Referenced by CustomData_set_layer_unique_name().
|
static |
Definition at line 2774 of file customdata.cc.
References CustomData_update_typemap(), layerType_getInfo(), and LayerTypeInfo::size.
Referenced by customData_add_layer__internal(), and CustomData_free_layer().
| void CustomData_update_typemap | ( | CustomData * | data | ) |
Definition at line 2354 of file customdata.cc.
References CD_NUMTYPES.
Referenced by BKE_editmesh_loop_tangent_calc(), blo_do_versions_260(), blo_do_versions_280(), CustomData_add_layer(), CustomData_add_layer_named(), CustomData_add_layer_named_with_data(), CustomData_add_layer_with_data(), customdata_merge_internal(), CustomData_shallow_copy_remove_non_bmesh_attributes(), customdata_typemap_is_valid(), and customData_update_offsets().
| void CustomData_validate_layer_name | ( | const CustomData * | data, |
| const eCustomDataType | type, | ||
| const StringRef | name, | ||
| char * | outname ) |
Definition at line 4567 of file customdata.cc.
References BLI_strncpy_utf8(), CustomData_get_active_layer_index(), CustomData_get_named_layer_index(), and MAX_CUSTOMDATA_LAYER_NAME.
Referenced by dynamicPaint_createUVSurface(), dynamicPaint_setInitialColor(), MOD_get_texture_coords(), modify_mesh(), and pointdensity_cache_vertex_color().
| bool CustomData_verify_versions | ( | 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 4593 of file customdata.cc.
References CD_NUMTYPES, CLOG_WARN, LayerTypeInfo::defaultname, ELEM, layerType_getInfo(), LOG, and LayerTypeInfo::structnum.
Referenced by CustomData_blend_read().
|
static |
If the layer data is currently shared (hence it is immutable), create a copy that can be edited.
Definition at line 2582 of file customdata.cc.
References copy_layer_data(), and make_implicit_sharing_info_for_layer().
Referenced by CustomData_ensure_data_is_mutable(), CustomData_ensure_layers_are_mutable(), CustomData_get_layer_for_write(), CustomData_get_layer_n_for_write(), and CustomData_get_layer_named_for_write().
|
static |
Definition at line 2395 of file customdata.cc.
References LayerTypeInfo::free, layerType_getInfo(), and MEM_freeN().
Referenced by customData_free_layer__internal().
|
static |
Definition at line 2605 of file customdata.cc.
Referenced by CustomData_copy_data_layer(), and CustomData_free_elem().
|
static |
Definition at line 1041 of file customdata.cc.
References add_v2_v2(), and OrigSpaceLoop::uv.
|
static |
Definition at line 890 of file customdata.cc.
References MLoopCol::a, MLoopCol::b, MLoopCol::g, and MLoopCol::r.
|
static |
Definition at line 1306 of file customdata.cc.
References add_v4_v4(), and MPropCol::color.
|
static |
Definition at line 1437 of file customdata.cc.
|
static |
Definition at line 1385 of file customdata.cc.
|
static |
Definition at line 796 of file customdata.cc.
References count.
|
static |
Definition at line 330 of file customdata.cc.
References count.
|
static |
Definition at line 682 of file customdata.cc.
References count.
|
static |
Definition at line 738 of file customdata.cc.
References count, POINTER_OFFSET, and ptr.
|
static |
Definition at line 771 of file customdata.cc.
References count, GridPaintMask::data, GridPaintMask::level, and MEM_dupallocN.
|
static |
Definition at line 209 of file customdata.cc.
References count, MDeformVert::dw, MEM_malloc_arrayN, POINTER_OFFSET, and MDeformVert::totweight.
|
static |
Definition at line 651 of file customdata.cc.
References count, MDisps::disps, MDisps::hidden, MDisps::level, MEM_dupallocN, and MDisps::totdisp.
|
static |
Definition at line 1187 of file customdata.cc.
References count.
|
static |
Definition at line 554 of file customdata.cc.
References count.
|
static |
Definition at line 478 of file customdata.cc.
References count.
|
static |
Definition at line 543 of file customdata.cc.
References count.
|
static |
Definition at line 404 of file customdata.cc.
References count.
|
static |
Definition at line 998 of file customdata.cc.
References copy_v2_v2(), and OrigSpaceLoop::uv.
|
static |
Definition at line 807 of file customdata.cc.
References MLoopCol::a, MLoopCol::b, blend_color_add_byte(), blend_color_interpolate_byte(), blend_color_mix_byte(), blend_color_mul_byte(), blend_color_sub_byte(), CDT_MIX_ADD, CDT_MIX_MIX, CDT_MIX_MUL, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD, CDT_MIX_SUB, ELEM, float, MLoopCol::g, and MLoopCol::r.
|
static |
Definition at line 360 of file customdata.cc.
References add_v3_v3v3(), CDT_MIX_ADD, CDT_MIX_MIX, CDT_MIX_MUL, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD, CDT_MIX_SUB, copy_v3_v3(), ELEM, interp_v3_v3v3_slerp_safe(), mul_v3_v3v3(), normalize_v3(), and sub_v3_v3v3().
|
static |
Definition at line 1239 of file customdata.cc.
References blend_color_add_float(), blend_color_interpolate_float(), blend_color_mix_float(), blend_color_mul_float(), blend_color_sub_float(), CDT_MIX_ADD, CDT_MIX_MIX, CDT_MIX_MUL, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD, CDT_MIX_SUB, MPropCol::color, copy_v4_v4(), and ELEM.
|
static |
Definition at line 1482 of file customdata.cc.
References b, CDT_MIX_NOMIX, and blender::math::interpolate().
|
static |
Definition at line 1132 of file customdata.cc.
References count.
|
static |
Definition at line 949 of file customdata.cc.
References count.
|
static |
Definition at line 1177 of file customdata.cc.
References copy_v3_fl(), count, data, and MVertSkin::flag.
|
static |
Definition at line 1142 of file customdata.cc.
References copy_vn_i(), count, and ORIGINDEX_NONE.
|
static |
Definition at line 605 of file customdata.cc.
References count.
|
static |
Definition at line 1330 of file customdata.cc.
References MPropCol::color, copy_v4_v4(), and count.
|
static |
Definition at line 1557 of file customdata.cc.
References count, and blender::MutableSpan< T >::fill().
|
static |
Definition at line 1527 of file customdata.cc.
References count, and blender::MutableSpan< T >::fill().
|
static |
Definition at line 457 of file customdata.cc.
References count.
|
static |
Definition at line 1032 of file customdata.cc.
References data, min, minmax_v2v2_v2(), and OrigSpaceLoop::uv.
|
static |
Definition at line 901 of file customdata.cc.
References MLoopCol::a, MLoopCol::b, data, MLoopCol::g, min, and MLoopCol::r.
|
static |
Definition at line 1313 of file customdata.cc.
References MPropCol::color, data, min, and minmax_v4v4_v4().
|
static |
Definition at line 1474 of file customdata.cc.
References b, data, and blender::math::min_max().
|
static |
Definition at line 1009 of file customdata.cc.
References len_squared_v2v2(), and OrigSpaceLoop::uv.
|
static |
Definition at line 866 of file customdata.cc.
References MLoopCol::a, b, MLoopCol::b, MLoopCol::g, and MLoopCol::r.
|
static |
Definition at line 1286 of file customdata.cc.
References MPropCol::color.
|
static |
Definition at line 1460 of file customdata.cc.
References b, and blender::math::distance_squared().
Definition at line 719 of file customdata.cc.
|
static |
Definition at line 755 of file customdata.cc.
References bpy_bm_generic_invalidate(), count, POINTER_OFFSET, and ptr.
|
static |
Definition at line 788 of file customdata.cc.
References count, and MEM_SAFE_FREE.
|
static |
Definition at line 231 of file customdata.cc.
References count, and MEM_freeN().
|
static |
Definition at line 672 of file customdata.cc.
References count, and MEM_SAFE_FREE.
|
static |
Definition at line 1024 of file customdata.cc.
References INIT_MINMAX2, and min.
|
static |
Definition at line 933 of file customdata.cc.
References min, and MLoopCol::r.
|
static |
Definition at line 1321 of file customdata.cc.
References copy_v4_fl(), FLT_MAX, and min.
|
static |
Definition at line 1467 of file customdata.cc.
References INIT_MINMAX2, and min.
|
static |
Definition at line 242 of file customdata.cc.
References count, MDeformWeight::def_nr, MDeformVert::dw, MEM_freeN(), MEM_malloc_arrayN, next, node, MDeformVert::totweight, and MDeformWeight::weight.
|
static |
Definition at line 1049 of file customdata.cc.
References copy_v2_v2(), count, madd_v2_v2fl(), OrigSpaceLoop::uv, and zero_v2().
|
static |
Definition at line 958 of file customdata.cc.
References MLoopCol::a, b, MLoopCol::b, col, count, MLoopCol::g, MLoopCol::r, and round_fl_to_uchar_clamp().
|
static |
Definition at line 1192 of file customdata.cc.
References copy_v3_v3(), count, MVertSkin::flag, madd_v3_v3fl(), MVertSkin::radius, and zero_v3().
|
static |
Definition at line 341 of file customdata.cc.
References count, madd_v3_v3fl(), and normalize_v3_v3().
|
static |
Definition at line 564 of file customdata.cc.
References count, madd_v2_v2fl(), and OrigSpaceFace::uv.
|
static |
Definition at line 1506 of file customdata.cc.
References count.
|
static |
Definition at line 1340 of file customdata.cc.
References col, MPropCol::color, copy_v4_v4(), count, and madd_v4_v4fl().
|
static |
Definition at line 483 of file customdata.cc.
References count.
|
static |
Definition at line 1415 of file customdata.cc.
References copy_v2_v2(), count, madd_v2_v2fl(), and vec2f::x.
|
static |
Definition at line 1362 of file customdata.cc.
References copy_v3_v3(), count, madd_v3_v3fl(), and vec3f::x.
|
static |
Definition at line 521 of file customdata.cc.
|
static |
Definition at line 1533 of file customdata.cc.
|
static |
Definition at line 1147 of file customdata.cc.
References copy_v3_v3(), count, madd_v3_v3fl(), and zero_v3().
|
static |
Definition at line 413 of file customdata.cc.
References count, madd_v2_v2fl(), and MTFace::uv.
|
static |
Definition at line 467 of file customdata.cc.
References MAX_MTFACE.
|
static |
Definition at line 1017 of file customdata.cc.
References data, mul_v2_fl(), and OrigSpaceLoop::uv.
|
static |
Definition at line 880 of file customdata.cc.
References MLoopCol::a, MLoopCol::b, data, float, MLoopCol::g, and MLoopCol::r.
|
static |
Definition at line 1300 of file customdata.cc.
References MPropCol::color, data, and mul_v4_fl().
|
static |
Definition at line 1430 of file customdata.cc.
|
static |
Definition at line 687 of file customdata.cc.
References cdf_read_data(), CLOG_ERROR, count, data, MDisps::disps, float, LOG, and MEM_calloc_arrayN.
|
static |
Definition at line 1220 of file customdata.cc.
References copy_v3_v3_short(), and data.
|
static |
Definition at line 1120 of file customdata.cc.
|
static |
Definition at line 621 of file customdata.cc.
References data, float, MEM_calloc_arrayN, MEM_freeN(), and multires_mdisp_corners().
|
static |
Definition at line 594 of file customdata.cc.
References copy_v2_v2(), data, and OrigSpaceFace::uv.
|
static |
Definition at line 444 of file customdata.cc.
References copy_v2_v2(), data, and MTFace::uv.
|
static |
Definition at line 2281 of file customdata.cc.
References CD_NUMTYPES, and LAYERTYPEINFO.
Referenced by copy_layer_data(), CustomData_add_layer(), customData_add_layer__internal(), CustomData_add_layer_with_data(), CustomData_bmesh_copy_block(), CustomData_bmesh_copy_map_calc(), CustomData_bmesh_free_block(), CustomData_bmesh_free_block_data(), CustomData_bmesh_free_block_data_exclude_by_type(), CustomData_bmesh_has_free(), CustomData_bmesh_interp(), CustomData_bmesh_interp_n(), CustomData_bmesh_set_n(), CustomData_copy_data_layer(), CustomData_copy_elements(), CustomData_data_add(), CustomData_data_copy_value(), CustomData_data_dominmax(), CustomData_data_equals(), CustomData_data_initminmax(), CustomData_data_mix_value(), CustomData_data_multiply(), CustomData_data_set_default_value(), CustomData_data_transfer(), customdata_data_transfer_interp_generic(), customdata_data_transfer_interp_normal_normals(), CustomData_external_read(), CustomData_external_reload(), CustomData_external_write(), CustomData_file_write_info(), CustomData_free_elem(), CustomData_get_for_write(), CustomData_get_n_for_write(), CustomData_interp(), CustomData_layer_ensure_data_exists(), CustomData_layer_has_interp(), CustomData_layer_has_math(), CustomData_layer_validate(), CustomData_layertype_is_dynamic(), CustomData_layertype_is_singleton(), CustomData_layertype_layers_max(), CustomData_realloc(), CustomData_set_layer_unique_name(), CustomData_sizeof(), CustomData_swap_corners(), customData_update_offsets(), CustomData_verify_versions(), and free_layer_data().
|
static |
Definition at line 2290 of file customdata.cc.
References CD_NUMTYPES, and LAYERTYPENAMES.
Referenced by customData_add_layer__internal(), CustomData_copy_data_layer(), CustomData_external_read(), CustomData_layer_ensure_data_exists(), CustomData_layertype_name(), and customData_mask_layers__print().
|
static |
Definition at line 498 of file customdata.cc.
References data, and MFloatProperty::f.
|
static |
Definition at line 1445 of file customdata.cc.
References data.
|
static |
Definition at line 1394 of file customdata.cc.
References data.
Definition at line 705 of file customdata.cc.
References cdf_write_data(), CLOG_ERROR, count, data, and LOG.
|
static |
Create a #ImplicitSharingInfo that takes ownership of the data.
Definition at line 2572 of file customdata.cc.
Referenced by customData_add_layer__internal(), CustomData_blend_read(), CustomData_realloc(), and ensure_layer_data_is_mutable().
|
static |
Definition at line 5287 of file customdata.cc.
References BKE_ccg_gridsize(), BLO_write_float_array(), BLO_write_struct_array, count, GridPaintMask::data, and GridPaintMask::level.
Referenced by blend_write_layer_data().
|
static |
Definition at line 5263 of file customdata.cc.
References BLI_BITMAP_SIZE, BLO_write_float3_array(), BLO_write_int8_array(), BLO_write_struct_array, count, MDisps::disps, MDisps::hidden, and MDisps::totdisp.
Referenced by blend_write_layer_data().
| const CustomData_MeshMasks CD_MASK_BAREMESH |
Definition at line 2219 of file customdata.cc.
Referenced by BKE_crazyspace_get_first_deform_matrices_editbmesh(), BKE_crazyspace_get_mapped_editverts(), BKE_editmesh_vert_coords_alloc(), BKE_multires_create_mesh(), BKE_object_handle_data_update(), bvh_get_mesh(), blender::ed::object::dt_layers_select_src_itemf(), ED_mesh_shapes_join_objects_exec(), ED_view3d_screen_datamask(), blender::bke::editbmesh_calc_modifiers(), mesh_foreachScreenEdge(), mesh_foreachScreenEdge_clip_bb_segment(), mesh_foreachScreenFace(), mesh_foreachScreenVert(), blender::ed::object::modifier_skin_armature_create(), multires_modifier_update_mdisps(), multires_reshape_create_subdiv(), blender::ed::object::multiresbake_create_hiresdm(), blender::ed::object::multiresbake_create_loresdm(), and pointdensity_cache_object().
| const CustomData_MeshMasks CD_MASK_BAREMESH_ORIGINDEX |
Definition at line 2226 of file customdata.cc.
Referenced by blender::bke::mesh_calc_modifiers().
| const CustomData_MeshMasks CD_MASK_BMESH |
Definition at line 2255 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().
| const CustomData_MeshMasks CD_MASK_DERIVEDMESH |
Definition at line 2243 of file customdata.cc.
Referenced by BM_mesh_bm_to_me_for_eval(), DM_from_template(), mesh_copy_data(), and blender::ed::object::object_force_modifier_update_for_bind().
| const CustomData_MeshMasks CD_MASK_EVERYTHING |
Definition at line 2265 of file customdata.cc.
Referenced by BKE_mesh_new_nomain_from_template(), cutEdges(), explodeMesh(), blender::bke::subdiv::loop_interpolation_init(), blender::bke::subdiv::subdiv_mesh_topology_info(), and blender::bke::subdiv::vertex_interpolation_init().
| const CustomData_MeshMasks CD_MASK_MESH |
Definition at line 2233 of file customdata.cc.
Referenced by BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_nomain_to_mesh(), BKE_mesh_validate_all_customdata(), CDDM_from_mesh(), blender::ed::object::duplibase_for_convert(), join_mesh_single(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), mesh_blend_write(), mesh_copy_data(), mesh_new_from_mesh_object_with_layers(), blender::ed::object::multires_external_save_exec(), blender::ed::object::object_convert_exec(), blender::ed::sculpt_paint::undo::restore_geometry_data(), and blender::ed::sculpt_paint::undo::store_geometry_data().
|
static |
Definition at line 1569 of file customdata.cc.
Referenced by CustomData_get_elem_size(), and layerType_getInfo().
|
static |
Definition at line 2161 of file customdata.cc.
Referenced by layerType_getName().
|
static |
Definition at line 85 of file customdata.cc.
Referenced by blend_read_layer_data(), CustomData_copy_data_layer(), CustomData_external_read(), CustomData_external_write(), CustomData_layer_ensure_data_exists(), CustomData_verify_versions(), layerRead_mdisps(), and layerWrite_mdisps().