GPencil: Primitive: Polyline Tool
[blender.git] / source / blender / blenkernel / intern / data_transfer_intern.h
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2014 Blender Foundation.
17  * All rights reserved.
18  */
19
20 /** \file
21  * \ingroup bke
22  */
23
24 #ifndef __DATA_TRANSFER_INTERN_H__
25 #define __DATA_TRANSFER_INTERN_H__
26
27 #include "BKE_customdata.h" /* For cd_datatransfer_interp */
28
29 struct CustomData;
30 struct CustomDataTransferLayerMap;
31 struct ListBase;
32
33 float data_transfer_interp_float_do(const int mix_mode,
34                                     const float val_dst,
35                                     const float val_src,
36                                     const float mix_factor);
37
38 void data_transfer_layersmapping_add_item(struct ListBase *r_map,
39                                           const int data_type,
40                                           const int mix_mode,
41                                           const float mix_factor,
42                                           const float *mix_weights,
43                                           const void *data_src,
44                                           void *data_dst,
45                                           const int data_src_n,
46                                           const int data_dst_n,
47                                           const size_t elem_size,
48                                           const size_t data_size,
49                                           const size_t data_offset,
50                                           const uint64_t data_flag,
51                                           cd_datatransfer_interp interp,
52                                           void *interp_data);
53
54 /* Type-specific. */
55
56 bool data_transfer_layersmapping_vgroups(struct ListBase *r_map,
57                                          const int mix_mode,
58                                          const float mix_factor,
59                                          const float *mix_weights,
60                                          const int num_elem_dst,
61                                          const bool use_create,
62                                          const bool use_delete,
63                                          struct Object *ob_src,
64                                          struct Object *ob_dst,
65                                          struct CustomData *cd_src,
66                                          struct CustomData *cd_dst,
67                                          const bool use_dupref_dst,
68                                          const int fromlayers,
69                                          const int tolayers);
70
71 /* Defined in customdata.c */
72 void customdata_data_transfer_interp_normal_normals(const CustomDataTransferLayerMap *laymap,
73                                                     void *data_dst,
74                                                     const void **sources,
75                                                     const float *weights,
76                                                     const int count,
77                                                     const float mix_factor);
78
79 #endif /* __DATA_TRANSFER_INTERN_H__ */