44 const int dtdata_type = 1 << i;
47 if (!(dtdata_types & dtdata_type)) {
54 r_data_masks->
vmask |= 1LL << cddata_type;
57 r_data_masks->
emask |= 1LL << cddata_type;
60 r_data_masks->
lmask |= 1LL << cddata_type;
63 r_data_masks->
pmask |= 1LL << cddata_type;
81 bool *r_advanced_mixing,
86 *r_advanced_mixing =
false;
89 for (
int i = 0; (i <
DT_TYPE_MAX) && !(
ret && *r_advanced_mixing && *r_threshold); i++) {
90 const int dtdata_type = 1 << i;
92 if (!(dtdata_types & dtdata_type)) {
96 switch (dtdata_type) {
99 *r_advanced_mixing =
true;
137 *r_advanced_mixing =
true;
142 *r_advanced_mixing =
true;
164 const int dtdata_type = 1 << i;
166 if (!(dtdata_types & dtdata_type)) {
189 switch (dtdata_type) {
232 switch (dtdata_type) {
258 const int dtdata_type,
259 const bool dirty_nors_dst)
264 const int num_verts_dst = me_dst->
totvert;
266 const int num_edges_dst = me_dst->
totedge;
268 const int num_polys_dst = me_dst->
totpoly;
270 const int num_loops_dst = me_dst->
totloop;
274 const float split_angle_dst = me_dst->
smoothresh;
280 float(*loop_nors_dst)[3];
285 const bool do_loop_nors_dst = (loop_nors_dst ==
NULL);
286 if (do_loop_nors_dst) {
290 if (dirty_nors_dst || do_loop_nors_dst) {
315 const int dtdata_type,
325 const int num_verts_dst = me_dst->
totvert;
327 const int num_edges_dst = me_dst->
totedge;
329 const int num_polys_dst = me_dst->
totpoly;
331 const int num_loops_dst = me_dst->
totloop;
338 if (!custom_nors_dst) {
363 switch (cddata_type) {
375 const float mix_factor)
389 val_ret = (val_dst + val_src) * 0.5f;
392 val_ret = val_dst + val_src;
395 val_ret = val_dst - val_src;
398 val_ret = val_dst * val_src;
405 return interpf(val_ret, val_dst, mix_factor);
410 const void **sources,
411 const float *weights,
413 const float mix_factor)
415 const char **data_src = (
const char **)sources;
416 char *data_dst = (
char *)
dest;
418 const int mix_mode = laymap->
mix_mode;
419 float val_src = 0.0f;
420 const float val_dst = (
float)(*data_dst) / 255.0f;
422 for (
int i =
count; i--;) {
423 val_src += ((
float)(*data_src[i]) / 255.0f) * weights[i];
428 CLAMP(val_src, 0.0f, 1.0f);
430 *data_dst = (char)(val_src * 255.0f);
437 const int cddata_type,
439 const float mix_factor,
440 const float *mix_weights,
441 const void *data_src,
443 const int data_src_n,
444 const int data_dst_n,
445 const size_t elem_size,
446 const size_t data_size,
447 const size_t data_offset,
478 const int cddata_type,
480 const float mix_factor,
481 const float *mix_weights,
482 const void *data_src,
521 const int cddata_type,
523 const float mix_factor,
524 const float *mix_weights,
525 const int num_elem_dst,
526 const bool use_create,
527 const bool use_delete,
530 const bool use_dupref_dst,
532 const bool *use_layers_src,
533 const int num_layers_src,
537 const void *data_src;
538 void *data_dst =
NULL;
539 int idx_src = num_layers_src;
541 bool *data_dst_to_delete =
NULL;
543 if (!use_layers_src) {
559 while (idx_src-- && !use_layers_src[idx_src]) {
564 if (idx_dst < idx_src) {
567 for (; idx_dst < idx_src; idx_dst++) {
576 else if (use_delete && idx_dst > idx_src) {
577 while (idx_dst-- > idx_src) {
583 if (!use_layers_src[idx_src]) {
589 if (use_dupref_dst) {
591 cd_dst, cddata_type, idx_src, num_elem_dst);
611 data_dst_to_delete =
MEM_mallocN(
sizeof(*data_dst_to_delete) * (
size_t)tot_dst,
613 memset(data_dst_to_delete,
true,
sizeof(*data_dst_to_delete) * (
size_t)tot_dst);
620 if (!use_layers_src[idx_src]) {
638 else if (data_dst_to_delete) {
639 data_dst_to_delete[idx_dst] =
false;
644 if (use_dupref_dst) {
646 cd_dst, cddata_type, idx_dst, num_elem_dst);
663 if (data_dst_to_delete) {
668 for (idx_dst = tot_dst; idx_dst--;) {
669 if (data_dst_to_delete[idx_dst]) {
685 const int cddata_type,
687 const float mix_factor,
688 const float *mix_weights,
689 const int num_elem_dst,
690 const bool use_create,
691 const bool use_delete,
694 const bool use_dupref_dst,
695 const int fromlayers,
700 int idx_src, idx_dst;
701 const void *data_src;
702 void *data_dst =
NULL;
719 else if (use_dupref_dst && r_map) {
740 if (fromlayers >= 0) {
741 idx_src = fromlayers;
757 if (use_dupref_dst && r_map) {
759 cd_dst, cddata_type, idx_dst, num_elem_dst);
775 if (use_dupref_dst && r_map) {
777 cd_dst, cddata_type, idx_dst, num_elem_dst);
787 if (num <= idx_dst) {
792 for (; num <= idx_dst; num++) {
798 if (use_dupref_dst && r_map) {
800 cd_dst, cddata_type, idx_dst, num_elem_dst);
817 if (use_dupref_dst && r_map) {
819 cd_dst, cddata_type, idx_dst, num_elem_dst);
847 bool *use_layers_src = num_src ?
848 MEM_mallocN(
sizeof(*use_layers_src) * (
size_t)num_src, __func__) :
852 if (use_layers_src) {
853 memset(use_layers_src,
true,
sizeof(*use_layers_src) * num_src);
873 if (use_layers_src) {
894 const float *mix_weights,
895 const int num_elem_dst,
896 const bool use_create,
897 const bool use_delete,
898 const int fromlayers,
905 void *interp_data =
NULL;
908 if (!(cddata_type &
CD_FAKE)) {
909 cd_src = &me_src->
vdata;
910 cd_dst = &me_dst->
vdata;
922 me_dst != ob_dst->
data,
933 const size_t elem_size =
sizeof(*((
MVert *)
NULL));
934 const size_t data_size =
sizeof(((
MVert *)
NULL)->bweight);
935 const size_t data_offset = offsetof(
MVert, bweight);
967 cd_src = &me_src->
vdata;
968 cd_dst = &me_dst->
vdata;
981 me_dst != ob_dst->
data,
995 else if (elem_type ==
ME_EDGE) {
996 if (!(cddata_type &
CD_FAKE)) {
997 cd_src = &me_src->
edata;
998 cd_dst = &me_dst->
edata;
1010 me_dst != ob_dst->
data,
1021 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1022 const size_t data_size =
sizeof(((
MEdge *)
NULL)->crease);
1023 const size_t data_offset = offsetof(
MEdge, crease);
1053 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1054 const size_t data_size =
sizeof(((
MEdge *)
NULL)->bweight);
1055 const size_t data_offset = offsetof(
MEdge, bweight);
1085 const size_t elem_size =
sizeof(*((
MEdge *)
NULL));
1086 const size_t data_size =
sizeof(((
MEdge *)
NULL)->flag);
1087 const size_t data_offset = offsetof(
MEdge, flag);
1110 else if (elem_type ==
ME_LOOP) {
1118 interp_data = space_transform;
1122 if (!(cddata_type &
CD_FAKE)) {
1123 cd_src = &me_src->
ldata;
1124 cd_dst = &me_dst->
ldata;
1136 me_dst != ob_dst->
data,
1149 else if (elem_type ==
ME_POLY) {
1154 if (!(cddata_type &
CD_FAKE)) {
1155 cd_src = &me_src->
pdata;
1156 cd_dst = &me_dst->
pdata;
1168 me_dst != ob_dst->
data,
1179 const size_t elem_size =
sizeof(*((
MPoly *)
NULL));
1180 const size_t data_size =
sizeof(((
MPoly *)
NULL)->flag);
1181 const size_t data_offset = offsetof(
MPoly, flag);
1212 const int data_types,
1213 const bool use_delete,
1220 const bool use_create =
true;
1226 me_dst = ob_dst->
data;
1237 const int dtdata_type = 1 << i;
1239 int fromlayers, tolayers, fromto_idx;
1241 if (!(data_types & dtdata_type)) {
1250 fromlayers = fromlayers_select[fromto_idx];
1251 tolayers = tolayers_select[fromto_idx];
1254 fromlayers = tolayers = 0;
1258 const int num_elem_dst = me_dst->
totvert;
1278 const int num_elem_dst = me_dst->
totedge;
1298 const int num_elem_dst = me_dst->
totloop;
1318 const int num_elem_dst = me_dst->
totpoly;
1345 const int data_types,
1347 const int map_vert_mode,
1348 const int map_edge_mode,
1349 const int map_loop_mode,
1350 const int map_poly_mode,
1352 const bool auto_transform,
1353 const float max_distance,
1354 const float ray_radius,
1355 const float islands_handling_precision,
1359 const float mix_factor,
1360 const char *vgroup_name,
1361 const bool invert_vgroup,
1374 bool dirty_nors_dst =
true;
1381 bool geom_map_init[
DATAMAX] = {0};
1383 bool changed =
false;
1384 bool is_modifier =
false;
1386 const bool use_delete =
false;
1400 me_dst = ob_dst->
data;
1413 map_vert_mode, map_edge_mode, map_loop_mode, map_poly_mode, &me_src_mask);
1417 if (me_src ==
NULL ||
1419 CLOG_WARN(&
LOG,
"Data Transfer: source mesh data is not ready - dependency cycle?");
1431 if (auto_transform) {
1432 if (space_transform ==
NULL) {
1433 space_transform = &auto_space_transform;
1437 me_dst->
mvert, me_dst->
totvert, me_src, space_transform);
1443 const int dtdata_type = 1 << i;
1445 int fromlayers, tolayers, fromto_idx;
1447 if (!(data_types & dtdata_type)) {
1457 fromlayers = fromlayers_select[fromto_idx];
1458 tolayers = tolayers_select[fromto_idx];
1461 fromlayers = tolayers = 0;
1466 const int num_verts_dst = me_dst->
totvert;
1468 if (!geom_map_init[
VDATA]) {
1469 const int num_verts_src = me_src->
totvert;
1474 "Source and destination meshes do not have the same amount of vertices, "
1475 "'Topology' mapping cannot be used in this case");
1481 "Source mesh doesn't have any edges, "
1482 "None of the 'Edge' mappings can be used in this case");
1488 "Source mesh doesn't have any faces, "
1489 "None of the 'Face' mappings can be used in this case");
1492 if (
ELEM(0, num_verts_dst, num_verts_src)) {
1495 "Source or destination meshes do not have any vertices, cannot transfer "
1510 geom_map_init[
VDATA] =
true;
1513 if (mdef && vg_idx != -1 && !weights[
VDATA]) {
1516 mdef, vg_idx, num_verts_dst, invert_vgroup, weights[
VDATA]);
1539 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1548 const int num_verts_dst = me_dst->
totvert;
1550 const int num_edges_dst = me_dst->
totedge;
1552 if (!geom_map_init[
EDATA]) {
1553 const int num_edges_src = me_src->
totedge;
1558 "Source and destination meshes do not have the same amount of edges, "
1559 "'Topology' mapping cannot be used in this case");
1565 "Source mesh doesn't have any faces, "
1566 "None of the 'Face' mappings can be used in this case");
1569 if (
ELEM(0, num_edges_dst, num_edges_src)) {
1573 "Source or destination meshes do not have any edges, cannot transfer edge data");
1589 geom_map_init[
EDATA] =
true;
1592 if (mdef && vg_idx != -1 && !weights[
EDATA]) {
1595 mdef, vg_idx, num_verts_dst, edges_dst, num_edges_dst, invert_vgroup, weights[
EDATA]);
1618 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1627 const int num_verts_dst = me_dst->
totvert;
1629 const int num_edges_dst = me_dst->
totedge;
1631 const int num_polys_dst = me_dst->
totpoly;
1633 const int num_loops_dst = me_dst->
totloop;
1638 if (!geom_map_init[
LDATA]) {
1639 const int num_loops_src = me_src->
totloop;
1644 "Source and destination meshes do not have the same amount of face corners, "
1645 "'Topology' mapping cannot be used in this case");
1651 "Source mesh doesn't have any edges, "
1652 "None of the 'Edge' mappings can be used in this case");
1655 if (
ELEM(0, num_loops_dst, num_loops_src)) {
1659 "Source or destination meshes do not have any faces, cannot transfer corner data");
1682 islands_handling_precision,
1684 geom_map_init[
LDATA] =
true;
1687 if (mdef && vg_idx != -1 && !weights[
LDATA]) {
1690 mdef, vg_idx, num_verts_dst, loops_dst, num_loops_dst, invert_vgroup, weights[
LDATA]);
1713 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1722 const int num_verts_dst = me_dst->
totvert;
1724 const int num_polys_dst = me_dst->
totpoly;
1726 const int num_loops_dst = me_dst->
totloop;
1728 if (!geom_map_init[
PDATA]) {
1729 const int num_polys_src = me_src->
totpoly;
1734 "Source and destination meshes do not have the same amount of faces, "
1735 "'Topology' mapping cannot be used in this case");
1741 "Source mesh doesn't have any edges, "
1742 "None of the 'Edge' mappings can be used in this case");
1745 if (
ELEM(0, num_polys_dst, num_polys_src)) {
1749 "Source or destination meshes do not have any faces, cannot transfer face data");
1764 geom_map_init[
PDATA] =
true;
1767 if (mdef && vg_idx != -1 && !weights[
PDATA]) {
1800 for (lay_mapit = lay_map.
first; lay_mapit; lay_mapit = lay_mapit->
next) {
1811 for (
int i = 0; i <
DATAMAX; i++) {
1829 const int data_types,
1830 const bool use_create,
1831 const int map_vert_mode,
1832 const int map_edge_mode,
1833 const int map_loop_mode,
1834 const int map_poly_mode,
1836 const bool auto_transform,
1837 const float max_distance,
1838 const float ray_radius,
1839 const float islands_handling_precision,
1843 const float mix_factor,
1844 const char *vgroup_name,
1845 const bool invert_vgroup,
1863 islands_handling_precision,
typedef float(TangentPoint)[2]
Generic geometry attributes built on CustomData.
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)
bool CustomData_layertype_is_singleton(int type)
void(* cd_datatransfer_interp)(const struct CustomDataTransferLayerMap *laymap, void *dest, const void **sources, const float *weights, int count, float mix_factor)
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 * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
void * CustomData_get_layer(const struct CustomData *data, int type)
@ CDT_MIX_REPLACE_BELOW_THRESHOLD
@ CDT_MIX_REPLACE_ABOVE_THRESHOLD
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)
void * CustomData_duplicate_referenced_layer(struct CustomData *data, int type, int totelem)
void * CustomData_duplicate_referenced_layer_n(struct CustomData *data, int type, int n, int totelem)
@ DT_MULTILAYER_INDEX_MAX
@ DT_MULTILAYER_INDEX_MDEFORMVERT
@ DT_MULTILAYER_INDEX_INVALID
@ DT_MULTILAYER_INDEX_SHAPEKEY
@ DT_MULTILAYER_INDEX_VCOL_VERT
@ DT_MULTILAYER_INDEX_VCOL_LOOP
#define DT_DATATYPE_IS_POLY(_dt)
#define DT_DATATYPE_IS_LOOP(_dt)
#define DT_DATATYPE_IS_EDGE(_dt)
#define DT_DATATYPE_IS_VERT(_dt)
const float(* BKE_mesh_poly_normals_ensure(const struct Mesh *mesh))[3]
void BKE_mesh_normals_loop_custom_set(const struct MVert *mverts, const float(*vert_normals)[3], int numVerts, struct MEdge *medges, int numEdges, struct MLoop *mloops, float(*r_custom_loopnors)[3], int numLoops, struct MPoly *mpolys, const float(*polynors)[3], int numPolys, short(*r_clnors_data)[2])
const float(* BKE_mesh_vertex_normals_ensure(const struct Mesh *mesh))[3]
bool BKE_mesh_vertex_normals_are_dirty(const struct Mesh *mesh)
void BKE_mesh_normals_loop_split(const struct MVert *mverts, const float(*vert_normals)[3], int numVerts, struct MEdge *medges, int numEdges, struct MLoop *mloops, float(*r_loopnors)[3], int numLoops, struct MPoly *mpolys, const float(*polynors)[3], int numPolys, bool use_split_normals, float split_angle, MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], int *r_loop_to_poly)
bool(* MeshRemapIslandsCalc)(struct MVert *verts, int totvert, struct MEdge *edges, int totedge, struct MPoly *polys, int totpoly, struct MLoop *loops, int totloop, struct MeshIslandStore *r_island_store)
bool BKE_mesh_calc_islands_loop_poly_edgeseam(struct MVert *verts, int totvert, struct MEdge *edges, int totedge, struct MPoly *polys, int totpoly, struct MLoop *loops, int totloop, MeshIslandStore *r_island_store)
void BKE_mesh_remap_calc_edges_from_mesh(int mode, const struct SpaceTransform *space_transform, float max_dist, float ray_radius, const struct MVert *verts_dst, int numverts_dst, const struct MEdge *edges_dst, int numedges_dst, bool dirty_nors_dst, struct Mesh *me_src, struct Mesh *me_dst, MeshPairRemap *r_map)
void BKE_mesh_remap_calc_verts_from_mesh(int mode, const struct SpaceTransform *space_transform, float max_dist, float ray_radius, const struct MVert *verts_dst, int numverts_dst, bool dirty_nors_dst, struct Mesh *me_src, struct Mesh *me_dst, MeshPairRemap *r_map)
void BKE_mesh_remap_free(MeshPairRemap *map)
void BKE_mesh_remap_find_best_match_from_mesh(const struct MVert *verts_dst, int numverts_dst, struct Mesh *me_src, struct SpaceTransform *r_space_transform)
void BKE_mesh_remap_calc_source_cddata_masks_from_map_modes(int vert_mode, int edge_mode, int loop_mode, int poly_mode, struct CustomData_MeshMasks *cddata_mask)
void BKE_mesh_remap_calc_polys_from_mesh(int mode, const struct SpaceTransform *space_transform, float max_dist, float ray_radius, struct Mesh *mesh_dst, struct MVert *verts_dst, struct MLoop *loops_dst, struct MPoly *polys_dst, int numpolys_dst, struct Mesh *me_src, struct MeshPairRemap *r_map)
void BKE_mesh_remap_calc_loops_from_mesh(int mode, const struct SpaceTransform *space_transform, float max_dist, float ray_radius, struct Mesh *mesh_dst, struct MVert *verts_dst, int numverts_dst, struct MEdge *edges_dst, int numedges_dst, struct MLoop *loops_dst, int numloops_dst, struct MPoly *polys_dst, int numpolys_dst, struct CustomData *ldata_dst, bool use_split_nors_dst, float split_angle_dst, bool dirty_nors_dst, struct Mesh *me_src, MeshRemapIslandsCalc gen_islands_src, float islands_precision_src, struct MeshPairRemap *r_map)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const 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)
General operations, lookup, etc. for blender objects.
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_unreachable()
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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position 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)
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_layersmapping_add_item_cd(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, cd_datatransfer_interp interp, void *interp_data)
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, int mix_mode, float mix_factor, const float *mix_weights, int num_elem_dst, bool use_create, bool use_delete, struct Object *ob_src, struct Object *ob_dst, struct CustomData *cd_src, struct CustomData *cd_dst, bool use_dupref_dst, int fromlayers, int tolayers)
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float2 interp(const float2 &a, const float2 &b, float t)
unsigned __int64 uint64_t
struct CustomDataTransferLayerMap * next
const float * mix_weights
cd_datatransfer_interp interp
struct MDeformVert * dvert
CustomData_MeshMasks last_data_mask