|
Blender V4.3
|
#include "BLI_compiler_compat.h"Go to the source code of this file.
Macros | |
| #define | DT_TYPE_MAX 30 |
| #define | DT_DATATYPE_IS_VERT(_dt) |
| #define | DT_DATATYPE_IS_EDGE(_dt) |
| #define | DT_DATATYPE_IS_LOOP(_dt) ELEM(_dt, DT_TYPE_UV, DT_TYPE_LNOR, DT_TYPE_MLOOPCOL_LOOP, DT_TYPE_MPROPCOL_LOOP) |
| #define | DT_DATATYPE_IS_FACE(_dt) ELEM(_dt, DT_TYPE_UV, DT_TYPE_SHARP_FACE, DT_TYPE_FREESTYLE_FACE) |
| #define | DT_DATATYPE_IS_MULTILAYERS(_dt) |
Functions | |
| void | BKE_object_data_transfer_dttypes_to_cdmask (int dtdata_types, struct CustomData_MeshMasks *r_data_masks) |
| bool | BKE_object_data_transfer_get_dttypes_capacity (int dtdata_types, bool *r_advanced_mixing, bool *r_threshold) |
| int | BKE_object_data_transfer_get_dttypes_item_types (int dtdata_types) |
| int | BKE_object_data_transfer_dttype_to_cdtype (int dtdata_type) |
| int | BKE_object_data_transfer_dttype_to_srcdst_index (int dtdata_type) |
| void | BKE_object_data_transfer_layout (struct Depsgraph *depsgraph, struct Object *ob_src, struct Object *ob_dst, int data_types, bool use_delete, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX]) |
| bool | BKE_object_data_transfer_mesh (struct Depsgraph *depsgraph, struct Object *ob_src, struct Object *ob_dst, int data_types, bool use_create, int map_vert_mode, int map_edge_mode, int map_loop_mode, int map_face_mode, struct SpaceTransform *space_transform, bool auto_transform, float max_distance, float ray_radius, float islands_handling_precision, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX], int mix_mode, float mix_factor, const char *vgroup_name, bool invert_vgroup, struct ReportList *reports) |
| bool | BKE_object_data_transfer_ex (struct Depsgraph *depsgraph, struct Object *ob_src, struct Object *ob_dst, struct Mesh *me_dst, int data_types, bool use_create, int map_vert_mode, int map_edge_mode, int map_loop_mode, int map_face_mode, struct SpaceTransform *space_transform, bool auto_transform, float max_distance, float ray_radius, float islands_handling_precision, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX], int mix_mode, float mix_factor, const char *vgroup_name, bool invert_vgroup, struct ReportList *reports) |
| #define DT_DATATYPE_IS_EDGE | ( | _dt | ) |
Definition at line 77 of file BKE_data_transfer.h.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_get_dttypes_item_types(), BKE_object_data_transfer_layout(), and blender::ed::object::data_transfer_poll_property().
| #define DT_DATATYPE_IS_FACE | ( | _dt | ) | ELEM(_dt, DT_TYPE_UV, DT_TYPE_SHARP_FACE, DT_TYPE_FREESTYLE_FACE) |
Definition at line 86 of file BKE_data_transfer.h.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_get_dttypes_item_types(), BKE_object_data_transfer_layout(), and blender::ed::object::data_transfer_poll_property().
| #define DT_DATATYPE_IS_LOOP | ( | _dt | ) | ELEM(_dt, DT_TYPE_UV, DT_TYPE_LNOR, DT_TYPE_MLOOPCOL_LOOP, DT_TYPE_MPROPCOL_LOOP) |
Definition at line 84 of file BKE_data_transfer.h.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_get_dttypes_item_types(), BKE_object_data_transfer_layout(), and blender::ed::object::data_transfer_poll_property().
| #define DT_DATATYPE_IS_MULTILAYERS | ( | _dt | ) |
Definition at line 88 of file BKE_data_transfer.h.
Referenced by blender::ed::object::data_transfer_poll_property().
| #define DT_DATATYPE_IS_VERT | ( | _dt | ) |
Definition at line 69 of file BKE_data_transfer.h.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_get_dttypes_item_types(), BKE_object_data_transfer_layout(), and blender::ed::object::data_transfer_poll_property().
| #define DT_TYPE_MAX 30 |
Definition at line 45 of file BKE_data_transfer.h.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_get_dttypes_capacity(), BKE_object_data_transfer_get_dttypes_item_types(), and BKE_object_data_transfer_layout().
| anonymous enum |
Definition at line 23 of file BKE_data_transfer.h.
| anonymous enum |
Definition at line 100 of file BKE_data_transfer.h.
| anonymous enum |
| Enumerator | |
|---|---|
| DT_LAYERS_ACTIVE_SRC | |
| DT_LAYERS_ALL_SRC | |
| DT_LAYERS_VGROUP_SRC | |
| DT_LAYERS_VGROUP_SRC_BONE_SELECT | |
| DT_LAYERS_VGROUP_SRC_BONE_DEFORM | |
Definition at line 114 of file BKE_data_transfer.h.
| anonymous enum |
| Enumerator | |
|---|---|
| DT_LAYERS_ACTIVE_DST | |
| DT_LAYERS_NAME_DST | |
| DT_LAYERS_INDEX_DST | |
Definition at line 126 of file BKE_data_transfer.h.
Definition at line 184 of file data_transfer.cc.
References BLI_assert_unreachable, CD_FAKE_BWEIGHT, CD_FAKE_CREASE, CD_FAKE_LNOR, CD_FAKE_MDEFORMVERT, CD_FAKE_SEAM, CD_FAKE_SHAPEKEY, CD_FAKE_SHARP, CD_FAKE_UV, CD_FREESTYLE_EDGE, CD_FREESTYLE_FACE, CD_MVERT_SKIN, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, DT_TYPE_BWEIGHT_EDGE, DT_TYPE_BWEIGHT_VERT, DT_TYPE_CREASE, DT_TYPE_FREESTYLE_EDGE, DT_TYPE_FREESTYLE_FACE, DT_TYPE_LNOR, DT_TYPE_MDEFORMVERT, DT_TYPE_MLOOPCOL_LOOP, DT_TYPE_MLOOPCOL_VERT, DT_TYPE_MPROPCOL_LOOP, DT_TYPE_MPROPCOL_VERT, DT_TYPE_SEAM, DT_TYPE_SHAPEKEY, DT_TYPE_SHARP_EDGE, DT_TYPE_SHARP_FACE, DT_TYPE_SKIN, and DT_TYPE_UV.
Referenced by BKE_object_data_transfer_dttypes_to_cdmask(), BKE_object_data_transfer_ex(), and BKE_object_data_transfer_layout().
Definition at line 227 of file data_transfer.cc.
References DT_MULTILAYER_INDEX_INVALID, DT_MULTILAYER_INDEX_MDEFORMVERT, DT_MULTILAYER_INDEX_SHAPEKEY, DT_MULTILAYER_INDEX_UV, DT_MULTILAYER_INDEX_VCOL_LOOP, DT_MULTILAYER_INDEX_VCOL_VERT, DT_TYPE_MDEFORMVERT, DT_TYPE_MLOOPCOL_LOOP, DT_TYPE_MLOOPCOL_VERT, DT_TYPE_MPROPCOL_LOOP, DT_TYPE_MPROPCOL_VERT, DT_TYPE_SHAPEKEY, and DT_TYPE_UV.
Referenced by BKE_object_data_transfer_ex(), BKE_object_data_transfer_layout(), blender::ed::object::data_transfer_exec(), and blender::ed::object::datalayout_transfer_exec().
| void BKE_object_data_transfer_dttypes_to_cdmask | ( | int | dtdata_types, |
| struct CustomData_MeshMasks * | r_data_masks ) |
Definition at line 39 of file data_transfer.cc.
References BKE_object_data_transfer_dttype_to_cdtype(), CD_FAKE, CD_FAKE_LNOR, CD_FAKE_MDEFORMVERT, CD_FAKE_UV, CD_MASK_CUSTOMLOOPNORMAL, CD_MASK_MDEFORMVERT, CD_MASK_PROP_FLOAT2, DT_DATATYPE_IS_EDGE, DT_DATATYPE_IS_FACE, DT_DATATYPE_IS_LOOP, DT_DATATYPE_IS_VERT, DT_TYPE_MAX, CustomData_MeshMasks::emask, CustomData_MeshMasks::lmask, CustomData_MeshMasks::pmask, and CustomData_MeshMasks::vmask.
Referenced by required_data_mask(), and update_depsgraph().
| bool BKE_object_data_transfer_ex | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob_src, | ||
| struct Object * | ob_dst, | ||
| struct Mesh * | me_dst, | ||
| int | data_types, | ||
| bool | use_create, | ||
| int | map_vert_mode, | ||
| int | map_edge_mode, | ||
| int | map_loop_mode, | ||
| int | map_face_mode, | ||
| struct SpaceTransform * | space_transform, | ||
| bool | auto_transform, | ||
| float | max_distance, | ||
| float | ray_radius, | ||
| float | islands_handling_precision, | ||
| const int | fromlayers_select[DT_MULTILAYER_INDEX_MAX], | ||
| const int | tolayers_select[DT_MULTILAYER_INDEX_MAX], | ||
| int | mix_mode, | ||
| float | mix_factor, | ||
| const char * | vgroup_name, | ||
| bool | invert_vgroup, | ||
| struct ReportList * | reports ) |
Definition at line 1306 of file data_transfer.cc.
References BKE_defvert_extract_vgroup_to_edgeweights(), BKE_defvert_extract_vgroup_to_faceweights(), BKE_defvert_extract_vgroup_to_loopweights(), BKE_defvert_extract_vgroup_to_vertweights(), BKE_id_defgroup_name_index(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_faces_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_verts_from_mesh(), BKE_mesh_remap_find_best_match_from_mesh(), BKE_mesh_remap_free(), BKE_mesh_wrapper_ensure_mdata(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_object_data_transfer_dttype_to_cdtype(), BKE_object_data_transfer_dttype_to_srcdst_index(), BKE_object_get_evaluated_mesh(), BKE_report(), BLI_assert, BLI_freelistN(), CD_MDEFORMVERT, Mesh::corners_num, CustomData_data_transfer(), CustomData_get_layer(), blender::MutableSpan< T >::data(), blender::Span< T >::data(), Object::data, data_transfer_dtdata_type_postprocess(), data_transfer_get_loop_islands_generator(), data_transfer_layersmapping_generate(), DATAMAX, DEG_get_evaluated_object(), depsgraph, DT_DATATYPE_IS_EDGE, DT_DATATYPE_IS_FACE, DT_DATATYPE_IS_LOOP, DT_DATATYPE_IS_VERT, DT_MULTILAYER_INDEX_INVALID, DT_TYPE_MAX, EDATA, Mesh::edges_num, ELEM, Mesh::faces_num, ListBase::first, Mesh::id, LDATA, LISTBASE_FOREACH, ME_EDGE, ME_LOOP, ME_POLY, ME_VERT, MEM_mallocN, MEM_SAFE_FREE, MREMAP_MODE_TOPOLOGY, MREMAP_USE_EDGE, MREMAP_USE_POLY, OB_MESH, PDATA, RPT_ERROR, blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), Object::type, VDATA, Mesh::vert_data, and Mesh::verts_num.
Referenced by BKE_object_data_transfer_mesh(), and modify_mesh().
| bool BKE_object_data_transfer_get_dttypes_capacity | ( | int | dtdata_types, |
| bool * | r_advanced_mixing, | ||
| bool * | r_threshold ) |
Check what can do each layer type (if it is actually handled by transfer-data, if it supports advanced mixing.
Definition at line 77 of file data_transfer.cc.
References DT_TYPE_BWEIGHT_EDGE, DT_TYPE_BWEIGHT_VERT, DT_TYPE_CREASE, DT_TYPE_FREESTYLE_EDGE, DT_TYPE_FREESTYLE_FACE, DT_TYPE_LNOR, DT_TYPE_MAX, DT_TYPE_MDEFORMVERT, DT_TYPE_MLOOPCOL_LOOP, DT_TYPE_MLOOPCOL_VERT, DT_TYPE_MPROPCOL_LOOP, DT_TYPE_MPROPCOL_VERT, DT_TYPE_SEAM, DT_TYPE_SHARP_EDGE, DT_TYPE_SHARP_FACE, DT_TYPE_SKIN, DT_TYPE_UV, and ret.
Referenced by blender::ed::object::dt_mix_mode_itemf().
Definition at line 156 of file data_transfer.cc.
References DT_DATATYPE_IS_EDGE, DT_DATATYPE_IS_FACE, DT_DATATYPE_IS_LOOP, DT_DATATYPE_IS_VERT, DT_TYPE_MAX, ME_EDGE, ME_LOOP, ME_POLY, ME_VERT, and ret.
| void BKE_object_data_transfer_layout | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob_src, | ||
| struct Object * | ob_dst, | ||
| int | data_types, | ||
| bool | use_delete, | ||
| const int | fromlayers_select[DT_MULTILAYER_INDEX_MAX], | ||
| const int | tolayers_select[DT_MULTILAYER_INDEX_MAX] ) |
Transfer data layout of selected types from source to destination object. By default, it only creates new data layers if needed on ob_dst. If use_delete is true, it will also delete data layers on ob_dst that do not match those from ob_src, to get (as much as possible) exact copy of source data layout.
Definition at line 1162 of file data_transfer.cc.
References ATTR_DOMAIN_MASK_CORNER, ATTR_DOMAIN_MASK_POINT, BKE_object_data_transfer_dttype_to_cdtype(), BKE_object_data_transfer_dttype_to_srcdst_index(), BKE_object_get_evaluated_mesh(), BLI_assert, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, Mesh::corners_num, Object::data, data_transfer_layersmapping_generate(), data_transfer_mesh_attributes_transfer_active_color_string(), data_transfer_mesh_attributes_transfer_default_color_string(), DEG_get_evaluated_object(), depsgraph, DT_DATATYPE_IS_EDGE, DT_DATATYPE_IS_FACE, DT_DATATYPE_IS_LOOP, DT_DATATYPE_IS_VERT, DT_MULTILAYER_INDEX_INVALID, DT_TYPE_MAX, Mesh::edges_num, ELEM, Mesh::faces_num, ME_EDGE, ME_LOOP, ME_POLY, ME_VERT, OB_MESH, Object::type, and Mesh::verts_num.
Referenced by blender::ed::object::datalayout_transfer_exec().
| bool BKE_object_data_transfer_mesh | ( | struct Depsgraph * | depsgraph, |
| struct Object * | ob_src, | ||
| struct Object * | ob_dst, | ||
| int | data_types, | ||
| bool | use_create, | ||
| int | map_vert_mode, | ||
| int | map_edge_mode, | ||
| int | map_loop_mode, | ||
| int | map_face_mode, | ||
| struct SpaceTransform * | space_transform, | ||
| bool | auto_transform, | ||
| float | max_distance, | ||
| float | ray_radius, | ||
| float | islands_handling_precision, | ||
| const int | fromlayers_select[DT_MULTILAYER_INDEX_MAX], | ||
| const int | tolayers_select[DT_MULTILAYER_INDEX_MAX], | ||
| int | mix_mode, | ||
| float | mix_factor, | ||
| const char * | vgroup_name, | ||
| bool | invert_vgroup, | ||
| struct ReportList * | reports ) |
Definition at line 1777 of file data_transfer.cc.
References BKE_object_data_transfer_ex(), and depsgraph.
Referenced by blender::ed::object::data_transfer_exec().