60 const int dtdata_type = 1 << i;
63 if (!(dtdata_types & dtdata_type)) {
70 r_data_masks->
vmask |= 1LL << cddata_type;
73 r_data_masks->
emask |= 1LL << cddata_type;
76 r_data_masks->
lmask |= 1LL << cddata_type;
79 r_data_masks->
pmask |= 1LL << cddata_type;
101 bool *r_advanced_mixing,
106 *r_advanced_mixing =
false;
107 *r_threshold =
false;
109 for (
int i = 0; (i <
DT_TYPE_MAX) && !(
ret && *r_advanced_mixing && *r_threshold); i++) {
110 const int dtdata_type = 1 << i;
112 if (!(dtdata_types & dtdata_type)) {
116 switch (dtdata_type) {
119 *r_advanced_mixing =
true;
154 *r_advanced_mixing =
true;
159 *r_advanced_mixing =
true;
181 const int dtdata_type = 1 << i;
183 if (!(dtdata_types & dtdata_type)) {
206 switch (dtdata_type) {
247 switch (dtdata_type) {
267 const int dtdata_type,
268 const bool dirty_nors_dst)
273 const int num_verts_dst = me_dst->
totvert;
275 const int num_edges_dst = me_dst->
totedge;
277 const int num_polys_dst = me_dst->
totpoly;
279 const int num_loops_dst = me_dst->
totloop;
284 const float split_angle_dst = me_dst->
smoothresh;
291 float(*poly_nors_dst)[3];
292 float(*loop_nors_dst)[3];
297 const bool do_poly_nors_dst = (poly_nors_dst ==
NULL);
298 if (do_poly_nors_dst) {
302 if (dirty_nors_dst || do_poly_nors_dst) {
315 const bool do_loop_nors_dst = (loop_nors_dst ==
NULL);
316 if (do_loop_nors_dst) {
320 if (dirty_nors_dst || do_loop_nors_dst) {
329 (
const float(*)[3])poly_nors_dst,
344 const int dtdata_type,
354 const int num_verts_dst = me_dst->
totvert;
356 const int num_edges_dst = me_dst->
totedge;
358 const int num_polys_dst = me_dst->
totpoly;
360 const int num_loops_dst = me_dst->
totloop;
370 if (!custom_nors_dst) {
394 switch (cddata_type) {
406 const float mix_factor)
420 val_ret = (val_dst + val_src) * 0.5f;
423 val_ret = val_dst + val_src;
426 val_ret = val_dst - val_src;
429 val_ret = val_dst * val_src;
436 return interpf(val_ret, val_dst, mix_factor);
441 const void **sources,
442 const float *weights,
444 const float mix_factor)
446 const char **data_src = (
const char **)sources;
447 char *data_dst = (
char *)dest;
449 const int mix_mode = laymap->
mix_mode;
450 float val_src = 0.0f;
451 const float val_dst = (
float)(*data_dst) / 255.0f;
453 for (
int i =
count; i--;) {
454 val_src += ((
float)(*data_src[i]) / 255.0f) * weights[i];
459 CLAMP(val_src, 0.0f, 1.0f);
461 *data_dst = (char)(val_src * 255.0f);
468 const int cddata_type,
470 const float mix_factor,
471 const float *mix_weights,
472 const void *data_src,
474 const int data_src_n,
475 const int data_dst_n,
476 const size_t elem_size,
477 const size_t data_size,
478 const size_t data_offset,
509 const int cddata_type,
511 const float mix_factor,
512 const float *mix_weights,
552 const int cddata_type,
554 const float mix_factor,
555 const float *mix_weights,
556 const int num_elem_dst,
557 const bool use_create,
558 const bool use_delete,
561 const bool use_dupref_dst,
563 const bool *use_layers_src,
564 const int num_layers_src,
568 void *data_src, *data_dst =
NULL;
569 int idx_src = num_layers_src;
571 bool *data_dst_to_delete =
NULL;
573 if (!use_layers_src) {
589 while (idx_src-- && !use_layers_src[idx_src]) {
594 if (idx_dst < idx_src) {
597 for (; idx_dst < idx_src; idx_dst++) {
606 else if (use_delete && idx_dst > idx_src) {
607 while (idx_dst-- > idx_src) {
613 if (!use_layers_src[idx_src]) {
619 if (use_dupref_dst) {
621 cd_dst, cddata_type, idx_src, num_elem_dst);
641 data_dst_to_delete =
MEM_mallocN(
sizeof(*data_dst_to_delete) * (
size_t)tot_dst,
643 memset(data_dst_to_delete,
true,
sizeof(*data_dst_to_delete) * (
size_t)tot_dst);
650 if (!use_layers_src[idx_src]) {
668 else if (data_dst_to_delete) {
669 data_dst_to_delete[idx_dst] =
false;
674 if (use_dupref_dst) {
676 cd_dst, cddata_type, idx_dst, num_elem_dst);
693 if (data_dst_to_delete) {
698 for (idx_dst = tot_dst; idx_dst--;) {
699 if (data_dst_to_delete[idx_dst]) {
715 const int cddata_type,
717 const float mix_factor,
718 const float *mix_weights,
719 const int num_elem_dst,
720 const bool use_create,
721 const bool use_delete,
724 const bool use_dupref_dst,
725 const int fromlayers,
730 int idx_src, idx_dst;
731 void *data_src, *data_dst =
NULL;
748 else if (use_dupref_dst && r_map) {
769 if (fromlayers >= 0) {
770 idx_src = fromlayers;
786 if (use_dupref_dst && r_map) {
788 cd_dst, cddata_type, idx_dst, num_elem_dst);
804 if (use_dupref_dst && r_map) {
806 cd_dst, cddata_type, idx_dst, num_elem_dst);
816 if (num <= idx_dst) {
821 for (; num <= idx_dst; num++) {
827 if (use_dupref_dst && r_map) {
829 cd_dst, cddata_type, idx_dst, num_elem_dst);
846 if (use_dupref_dst && r_map) {
848 cd_dst, cddata_type, idx_dst, num_elem_dst);
876 bool *use_layers_src = num_src ?
877 MEM_mallocN(
sizeof(*use_layers_src) * (
size_t)num_src, __func__) :
881 if (use_layers_src) {
882 memset(use_layers_src,
true,
sizeof(*use_layers_src) * num_src);
902 if (use_layers_src) {
923 const float *mix_weights,
924 const int num_elem_dst,
925 const bool use_create,
926 const bool use_delete,
927 const int fromlayers,
934 void *interp_data =
NULL;
937 if (!(cddata_type &
CD_FAKE)) {
938 cd_src = &me_src->vdata;
939 cd_dst = &me_dst->vdata;
951 me_dst != ob_dst->
data,
962 const size_t elem_size =
sizeof(*((
MVert *)
NULL));
963 const size_t data_size =
sizeof(((
MVert *)
NULL)->bweight);
964 const size_t data_offset = offsetof(
MVert, bweight);
996 cd_src = &me_src->vdata;
997 cd_dst = &me_dst->vdata;
1010 me_dst != ob_dst->
data,
1024 else if (elem_type ==
ME_EDGE) {
1025 if (!(cddata_type &
CD_FAKE)) {
1026 cd_src = &me_src->edata;
1027 cd_dst = &me_dst->edata;
1039 me_dst != ob_dst->
data,
1050 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1051 const size_t data_size =
sizeof(((
MEdge *)
NULL)->crease);
1052 const size_t data_offset = offsetof(
MEdge, crease);
1082 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1083 const size_t data_size =
sizeof(((
MEdge *)
NULL)->bweight);
1084 const size_t data_offset = offsetof(
MEdge, bweight);
1114 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1115 const size_t data_size =
sizeof(((
MEdge *)
NULL)->flag);
1116 const size_t data_offset = offsetof(
MEdge, flag);
1139 else if (elem_type ==
ME_LOOP) {
1147 interp_data = space_transform;
1151 if (!(cddata_type &
CD_FAKE)) {
1152 cd_src = &me_src->
ldata;
1153 cd_dst = &me_dst->
ldata;
1165 me_dst != ob_dst->
data,
1178 else if (elem_type ==
ME_POLY) {
1183 if (!(cddata_type &
CD_FAKE)) {
1184 cd_src = &me_src->pdata;
1185 cd_dst = &me_dst->pdata;
1197 me_dst != ob_dst->
data,
1208 const size_t elem_size =
sizeof(*((
MPoly *)
NULL));
1209 const size_t data_size =
sizeof(((
MPoly *)
NULL)->flag);
1210 const size_t data_offset = offsetof(
MPoly, flag);
1247 const int data_types,
1248 const bool use_delete,
1255 const bool use_create =
true;
1261 me_dst = ob_dst->
data;
1272 const int dtdata_type = 1 << i;
1274 int fromlayers, tolayers, fromto_idx;
1276 if (!(data_types & dtdata_type)) {
1284 fromlayers = fromlayers_select[fromto_idx];
1285 tolayers = tolayers_select[fromto_idx];
1288 fromlayers = tolayers = 0;
1292 const int num_elem_dst = me_dst->
totvert;
1312 const int num_elem_dst = me_dst->
totedge;
1332 const int num_elem_dst = me_dst->
totloop;
1352 const int num_elem_dst = me_dst->
totpoly;
1379 const int data_types,
1381 const int map_vert_mode,
1382 const int map_edge_mode,
1383 const int map_loop_mode,
1384 const int map_poly_mode,
1386 const bool auto_transform,
1387 const float max_distance,
1388 const float ray_radius,
1389 const float islands_handling_precision,
1393 const float mix_factor,
1394 const char *vgroup_name,
1395 const bool invert_vgroup,
1408 bool dirty_nors_dst =
true;
1415 bool geom_map_init[
DATAMAX] = {0};
1417 bool changed =
false;
1418 bool is_modifier =
false;
1420 const bool use_delete =
false;
1434 me_dst = ob_dst->
data;
1447 map_vert_mode, map_edge_mode, map_loop_mode, map_poly_mode, &me_src_mask);
1451 if (me_src ==
NULL ||
1453 CLOG_WARN(&
LOG,
"Data Transfer: source mesh data is not ready - dependency cycle?");
1465 if (auto_transform) {
1466 if (space_transform ==
NULL) {
1467 space_transform = &auto_space_transform;
1471 me_dst->
mvert, me_dst->
totvert, me_src, space_transform);
1477 const int dtdata_type = 1 << i;
1479 int fromlayers, tolayers, fromto_idx;
1481 if (!(data_types & dtdata_type)) {
1491 fromlayers = fromlayers_select[fromto_idx];
1492 tolayers = tolayers_select[fromto_idx];
1495 fromlayers = tolayers = 0;
1500 const int num_verts_dst = me_dst->
totvert;
1502 if (!geom_map_init[
VDATA]) {
1503 const int num_verts_src = me_src->
totvert;
1508 "Source and destination meshes do not have the same amount of vertices, "
1509 "'Topology' mapping cannot be used in this case");
1515 "Source mesh doesn't have any edges, "
1516 "None of the 'Edge' mappings can be used in this case");
1522 "Source mesh doesn't have any faces, "
1523 "None of the 'Face' mappings can be used in this case");
1526 if (
ELEM(0, num_verts_dst, num_verts_src)) {
1529 "Source or destination meshes do not have any vertices, cannot transfer "
1543 geom_map_init[
VDATA] =
true;
1546 if (mdef && vg_idx != -1 && !weights[
VDATA]) {
1549 mdef, vg_idx, num_verts_dst, weights[
VDATA], invert_vgroup);
1572 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1581 const int num_verts_dst = me_dst->
totvert;
1583 const int num_edges_dst = me_dst->
totedge;
1585 if (!geom_map_init[
EDATA]) {
1586 const int num_edges_src = me_src->
totedge;
1591 "Source and destination meshes do not have the same amount of edges, "
1592 "'Topology' mapping cannot be used in this case");
1598 "Source mesh doesn't have any faces, "
1599 "None of the 'Face' mappings can be used in this case");
1602 if (
ELEM(0, num_edges_dst, num_edges_src)) {
1606 "Source or destination meshes do not have any edges, cannot transfer edge data");
1621 geom_map_init[
EDATA] =
true;
1624 if (mdef && vg_idx != -1 && !weights[
EDATA]) {
1627 mdef, vg_idx, num_verts_dst, edges_dst, num_edges_dst, weights[
EDATA], invert_vgroup);
1650 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1659 const int num_verts_dst = me_dst->
totvert;
1661 const int num_edges_dst = me_dst->
totedge;
1663 const int num_polys_dst = me_dst->
totpoly;
1665 const int num_loops_dst = me_dst->
totloop;
1671 if (!geom_map_init[
LDATA]) {
1672 const int num_loops_src = me_src->
totloop;
1677 "Source and destination meshes do not have the same amount of face corners, "
1678 "'Topology' mapping cannot be used in this case");
1684 "Source mesh doesn't have any edges, "
1685 "None of the 'Edge' mappings can be used in this case");
1688 if (
ELEM(0, num_loops_dst, num_loops_src)) {
1692 "Source or destination meshes do not have any faces, cannot transfer corner data");
1715 islands_handling_precision,
1717 geom_map_init[
LDATA] =
true;
1720 if (mdef && vg_idx != -1 && !weights[
LDATA]) {
1723 mdef, vg_idx, num_verts_dst, loops_dst, num_loops_dst, weights[
LDATA], invert_vgroup);
1746 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1755 const int num_verts_dst = me_dst->
totvert;
1757 const int num_polys_dst = me_dst->
totpoly;
1759 const int num_loops_dst = me_dst->
totloop;
1762 if (!geom_map_init[
PDATA]) {
1763 const int num_polys_src = me_src->
totpoly;
1768 "Source and destination meshes do not have the same amount of faces, "
1769 "'Topology' mapping cannot be used in this case");
1775 "Source mesh doesn't have any edges, "
1776 "None of the 'Edge' mappings can be used in this case");
1779 if (
ELEM(0, num_polys_dst, num_polys_src)) {
1783 "Source or destination meshes do not have any faces, cannot transfer face data");
1801 geom_map_init[
PDATA] =
true;
1804 if (mdef && vg_idx != -1 && !weights[
PDATA]) {
1837 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1848 for (
int i = 0; i <
DATAMAX; i++) {
1866 const int data_types,
1867 const bool use_create,
1868 const int map_vert_mode,
1869 const int map_edge_mode,
1870 const int map_loop_mode,
1871 const int map_poly_mode,
1873 const bool auto_transform,
1874 const float max_distance,
1875 const float ray_radius,
1876 const float islands_handling_precision,
1880 const float mix_factor,
1881 const char *vgroup_name,
1882 const bool invert_vgroup,
1900 islands_handling_precision,
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
const char * CustomData_get_layer_name(const struct CustomData *data, int type, int n)
int CustomData_number_of_layers(const struct CustomData *data, int type)
bool CustomData_free_layer(struct CustomData *data, int type, int totelem, int index)
@ CDT_MIX_REPLACE_BELOW_THRESHOLD
@ CDT_MIX_REPLACE_ABOVE_THRESHOLD
bool CustomData_layertype_is_singleton(int type)
void * CustomData_duplicate_referenced_layer_n(struct CustomData *data, const int type, const int n, const int totelem)
void CustomData_data_transfer(const struct MeshPairRemap *me_remap, const CustomDataTransferLayerMap *laymap)
bool CustomData_MeshMasks_are_matching(const CustomData_MeshMasks *mask_ref, const CustomData_MeshMasks *mask_required)
void * CustomData_add_layer_named(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem, const char *name)
const CustomData_MeshMasks CD_MASK_BAREMESH
int CustomData_get_active_layer(const struct CustomData *data, int type)
void(* cd_datatransfer_interp)(const struct CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, const int count, const float mix_factor)
void * CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
void * CustomData_get_layer(const struct CustomData *data, int type)
int CustomData_get_named_layer(const struct CustomData *data, int type, const char *name)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag)
#define DT_DATATYPE_IS_POLY(_dt)
#define DT_DATATYPE_IS_LOOP(_dt)
#define DT_DATATYPE_IS_EDGE(_dt)
@ DT_MULTILAYER_INDEX_MAX
@ DT_MULTILAYER_INDEX_MDEFORMVERT
@ DT_MULTILAYER_INDEX_INVALID
@ DT_MULTILAYER_INDEX_SHAPEKEY
@ DT_MULTILAYER_INDEX_VCOL
#define DT_DATATYPE_IS_VERT(_dt)
void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_custom_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, short(*r_clnors_data)[2])
void BKE_mesh_normals_loop_split(const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, const bool use_split_normals, const float split_angle, MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], int *r_loop_to_poly)
void BKE_mesh_calc_normals_poly(struct MVert *mverts, float(*r_vertnors)[3], int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const bool only_face_normals)
bool(* MeshRemapIslandsCalc)(struct MVert *verts, const int totvert, struct MEdge *edges, const int totedge, struct MPoly *polys, const int totpoly, struct MLoop *loops, const int totloop, struct MeshIslandStore *r_island_store)
bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts, const int totvert, struct MEdge *edges, const int totedge, struct MPoly *polys, const int totpoly, struct MLoop *loops, const int totloop, MeshIslandStore *r_island_store)
void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(const int vert_mode, const int edge_mode, const int loop_mode, const int poly_mode, struct CustomData_MeshMasks *cddata_mask)
void BKE_mesh_remap_calc_edges_from_mesh(const int mode, const struct SpaceTransform *space_transform, const float max_dist, const float ray_radius, const struct MVert *verts_dst, const int numverts_dst, const struct MEdge *edges_dst, const int numedges_dst, const bool dirty_nors_dst, struct Mesh *me_src, MeshPairRemap *r_map)
void BKE_mesh_remap_calc_polys_from_mesh(const int mode, const struct SpaceTransform *space_transform, const float max_dist, const float ray_radius, struct MVert *verts_dst, const int numverts_dst, struct MLoop *loops_dst, const int numloops_dst, struct MPoly *polys_dst, const int numpolys_dst, struct CustomData *pdata_dst, const bool dirty_nors_dst, struct Mesh *me_src, struct MeshPairRemap *r_map)
void BKE_mesh_remap_free(MeshPairRemap *map)
void BKE_mesh_remap_calc_loops_from_mesh(const int mode, const struct SpaceTransform *space_transform, const float max_dist, const float ray_radius, struct MVert *verts_dst, const int numverts_dst, struct MEdge *edges_dst, const int numedges_dst, struct MLoop *loops_dst, const int numloops_dst, struct MPoly *polys_dst, const int numpolys_dst, struct CustomData *ldata_dst, struct CustomData *pdata_dst, const bool use_split_nors_dst, const float split_angle_dst, const bool dirty_nors_dst, struct Mesh *me_src, MeshRemapIslandsCalc gen_islands_src, const float islands_precision_src, struct MeshPairRemap *r_map)
void BKE_mesh_remap_calc_verts_from_mesh(const int mode, const struct SpaceTransform *space_transform, const float max_dist, const float ray_radius, const struct MVert *verts_dst, const int numverts_dst, const bool dirty_nors_dst, struct Mesh *me_src, MeshPairRemap *r_map)
void BKE_mesh_remap_find_best_match_from_mesh(const struct MVert *verts_dst, const int numverts_dst, struct Mesh *me_src, struct SpaceTransform *r_space_transform)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me)
struct Mesh * BKE_modifier_get_evaluated_mesh_from_evaluated_object(struct Object *ob_eval, const bool get_cage_mesh)
General operations, lookup, etc. for blender objects.
void BKE_report(ReportList *reports, ReportType type, const char *message)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE float interpf(float a, float b, float t)
#define CLOG_WARN(clg_ref,...)
struct Depsgraph Depsgraph
#define CD_MASK_MDEFORMVERT
#define CD_MASK_CUSTOMLOOPNORMAL
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
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 data_transfer_layersmapping_add_item(ListBase *r_map, const int cddata_type, const int mix_mode, const float mix_factor, const float *mix_weights, const void *data_src, void *data_dst, const int data_src_n, const int data_dst_n, const size_t elem_size, const size_t data_size, const size_t data_offset, const uint64_t data_flag, cd_datatransfer_interp interp, void *interp_data)
static MeshRemapIslandsCalc data_transfer_get_loop_islands_generator(const int cddata_type)
static bool data_transfer_layersmapping_generate(ListBase *r_map, Object *ob_src, Object *ob_dst, Mesh *me_src, Mesh *me_dst, const int elem_type, int cddata_type, int mix_mode, float mix_factor, const float *mix_weights, const int num_elem_dst, const bool use_create, const bool use_delete, const int fromlayers, const int tolayers, SpaceTransform *space_transform)
int BKE_object_data_transfer_dttype_to_srcdst_index(const int dtdata_type)
int BKE_object_data_transfer_get_dttypes_item_types(const int dtdata_types)
static bool data_transfer_layersmapping_cdlayers(ListBase *r_map, const int cddata_type, const int mix_mode, const float mix_factor, const float *mix_weights, const int num_elem_dst, const bool use_create, const bool use_delete, CustomData *cd_src, CustomData *cd_dst, const bool use_dupref_dst, const int fromlayers, const int tolayers, cd_datatransfer_interp interp, void *interp_data)
static bool data_transfer_layersmapping_cdlayers_multisrc_to_dst(ListBase *r_map, const int cddata_type, const int mix_mode, const float mix_factor, const float *mix_weights, const int num_elem_dst, const bool use_create, const bool use_delete, CustomData *cd_src, CustomData *cd_dst, const bool use_dupref_dst, const int tolayers, const bool *use_layers_src, const int num_layers_src, cd_datatransfer_interp interp, void *interp_data)
static void data_transfer_layersmapping_add_item_cd(ListBase *r_map, const int cddata_type, const int mix_mode, const float mix_factor, const float *mix_weights, void *data_src, void *data_dst, cd_datatransfer_interp interp, void *interp_data)
bool BKE_object_data_transfer_get_dttypes_capacity(const int dtdata_types, bool *r_advanced_mixing, bool *r_threshold)
static void data_transfer_dtdata_type_postprocess(Object *UNUSED(ob_src), Object *UNUSED(ob_dst), Mesh *UNUSED(me_src), Mesh *me_dst, const int dtdata_type, const bool changed)
bool BKE_object_data_transfer_mesh(struct Depsgraph *depsgraph, Scene *scene, Object *ob_src, Object *ob_dst, const int data_types, const bool use_create, const int map_vert_mode, const int map_edge_mode, const int map_loop_mode, const int map_poly_mode, SpaceTransform *space_transform, const bool auto_transform, const float max_distance, const float ray_radius, const float islands_handling_precision, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX], const int mix_mode, const float mix_factor, const char *vgroup_name, const bool invert_vgroup, ReportList *reports)
int BKE_object_data_transfer_dttype_to_cdtype(const int dtdata_type)
float data_transfer_interp_float_do(const int mix_mode, const float val_dst, const float val_src, const float mix_factor)
void BKE_object_data_transfer_dttypes_to_cdmask(const int dtdata_types, CustomData_MeshMasks *r_data_masks)
static void data_transfer_dtdata_type_preprocess(Mesh *me_src, Mesh *me_dst, const int dtdata_type, const bool dirty_nors_dst)
static void data_transfer_interp_char(const CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, const int count, const float mix_factor)
void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph, Scene *scene, Object *ob_src, Object *ob_dst, const int data_types, const bool use_delete, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX])
bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph, Scene *scene, Object *ob_src, Object *ob_dst, Mesh *me_dst, const int data_types, bool use_create, const int map_vert_mode, const int map_edge_mode, const int map_loop_mode, const int map_poly_mode, SpaceTransform *space_transform, const bool auto_transform, const float max_distance, const float ray_radius, const float islands_handling_precision, const int fromlayers_select[DT_MULTILAYER_INDEX_MAX], const int tolayers_select[DT_MULTILAYER_INDEX_MAX], const int mix_mode, const float mix_factor, const char *vgroup_name, const bool invert_vgroup, ReportList *reports)
bool data_transfer_layersmapping_vgroups(struct ListBase *r_map, const int mix_mode, const float mix_factor, const float *mix_weights, const int num_elem_dst, const bool use_create, const bool use_delete, struct Object *ob_src, struct Object *ob_dst, struct CustomData *cd_src, struct CustomData *cd_dst, const bool use_dupref_dst, const int fromlayers, const int tolayers)
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
unsigned __int64 uint64_t
struct CustomDataTransferLayerMap * next
const float * mix_weights
cd_datatransfer_interp interp
struct CustomData pdata ldata
struct MDeformVert * dvert
CustomData_MeshMasks last_data_mask
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)