a8f082f630c8f8c0061f08d6f8c959df776c5bb8
[blender.git] / source / blender / collada / collada.h
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov.
19  *
20  * ***** END GPL LICENSE BLOCK *****
21  */
22
23 /** \file collada.h
24  *  \ingroup collada
25  */
26
27 #ifndef __COLLADA_H__
28 #define __COLLADA_H__
29
30 #include <stdlib.h>
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #include "BLI_linklist.h"
36 #include "BLI_path_util.h"
37 #include "RNA_types.h"
38
39 typedef enum BC_export_mesh_type {
40         BC_MESH_TYPE_VIEW,
41         BC_MESH_TYPE_RENDER
42 } BC_export_mesh_type;
43
44 typedef enum BC_export_transformation_type {
45         BC_TRANSFORMATION_TYPE_MATRIX,
46         BC_TRANSFORMATION_TYPE_TRANSROTLOC
47 } BC_export_transformation_type;
48
49 typedef enum BC_export_texture_type {
50         BC_TEXTURE_TYPE_MAT,
51         BC_TEXTURE_TYPE_UV
52 } BC_export_texture_type;
53
54 struct bContext;
55 struct Scene;
56
57 /*
58  * both return 1 on success, 0 on error
59  */
60 int collada_import(struct bContext *C,
61                    const char *filepath,
62                                    int import_units,
63                                    int find_chains,
64                                    int auto_connect,
65                                    int fix_orientation,
66                                    int min_chain_length,
67
68                                    int keep_bind_info);
69
70 int collada_export(struct Scene *sce,
71                    const char *filepath,
72                    int apply_modifiers,
73                    BC_export_mesh_type export_mesh_type,
74
75                    int selected,
76                    int include_children,
77                    int include_armatures,
78                    int include_shapekeys,
79                    int deform_bones_only,
80                    int sampling_rate,
81
82                    int active_uv_only,
83                    BC_export_texture_type export_texture_type,
84                    int use_texture_copies,
85
86                    int triangulate,
87                    int use_object_instantiation,
88                    int use_blender_profile,
89                    int sort_by_name,
90                    BC_export_transformation_type export_transformation_type,
91
92                    int open_sim,
93                    int limit_precision,
94                    int keep_bind_info);
95
96 #ifdef __cplusplus
97 }
98 #endif
99
100 #endif