merge from master
[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 struct bContext;
50 struct Scene;
51 struct ViewLayer;
52 struct EvaluationContext;
53
54 /*
55  * both return 1 on success, 0 on error
56  */
57 int collada_import(struct bContext *C,
58                    const char *filepath,
59                                    int import_units,
60                                    int find_chains,
61                                    int auto_connect,
62                                    int fix_orientation,
63                                    int min_chain_length,
64
65                                    int keep_bind_info);
66
67 int collada_export(
68         EvaluationContext *eval_ctx,
69         Scene *sce,
70         const char *filepath,
71
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 include_animations,
81         int sampling_rate,
82
83         int active_uv_only,
84         int include_material_textures,
85         int use_texture_copies,
86
87         int triangulate,
88         int use_object_instantiation,
89         int use_blender_profile,
90         int sort_by_name,
91         BC_export_transformation_type export_transformation_type,
92
93         int open_sim,
94         int limit_precision,
95         int keep_bind_info);
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101 #endif