Blender
V4.5
source
blender
io
collada
ExportSettings.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
9
#pragma once
10
11
#include "
BLI_linklist.h
"
12
#include "
BlenderContext.h
"
13
14
#ifdef __cplusplus
15
# include "
BCMath.h
"
16
# include <vector>
17
18
extern
"C"
{
19
#endif
20
21
enum
BC_export_mesh_type
{
22
BC_MESH_TYPE_VIEW
,
23
BC_MESH_TYPE_RENDER
,
24
};
25
26
enum
BC_export_transformation_type
{
27
BC_TRANSFORMATION_TYPE_MATRIX
,
28
BC_TRANSFORMATION_TYPE_DECOMPOSED
,
29
};
30
31
enum
BC_export_animation_type
{
32
BC_ANIMATION_EXPORT_SAMPLES
,
33
BC_ANIMATION_EXPORT_KEYS
,
34
};
35
36
enum
BC_ui_export_section
{
37
BC_UI_SECTION_MAIN
,
38
BC_UI_SECTION_GEOMETRY
,
39
BC_UI_SECTION_ARMATURE
,
40
BC_UI_SECTION_ANIMATION
,
41
BC_UI_SECTION_COLLADA
,
42
};
43
44
struct
ExportSettings
{
45
bool
apply_modifiers
;
46
BC_global_forward_axis
global_forward
;
47
BC_global_up_axis
global_up
;
48
bool
apply_global_orientation
;
49
50
BC_export_mesh_type
export_mesh_type
;
51
52
bool
selected
;
53
bool
include_children
;
54
bool
include_armatures
;
55
bool
include_shapekeys
;
56
bool
deform_bones_only
;
57
bool
include_animations
;
58
bool
include_all_actions
;
59
int
sampling_rate
;
60
bool
keep_smooth_curves
;
61
bool
keep_keyframes
;
62
bool
keep_flat_curves
;
63
64
bool
active_uv_only
;
65
BC_export_animation_type
export_animation_type
;
66
bool
use_texture_copies
;
67
68
bool
triangulate
;
69
bool
use_object_instantiation
;
70
bool
use_blender_profile
;
71
bool
sort_by_name
;
72
BC_export_transformation_type
object_transformation_type
;
73
BC_export_transformation_type
animation_transformation_type
;
74
75
bool
open_sim
;
76
bool
limit_precision
;
77
bool
keep_bind_info
;
78
79
char
*
filepath
;
80
LinkNode
*
export_set
;
81
};
82
83
#ifdef __cplusplus
84
}
85
86
void
bc_get_children
(std::vector<Object *> &child_set,
87
Object
*ob,
88
const
Scene
*
scene
,
89
ViewLayer
*view_layer);
90
91
class
BCExportSettings {
92
93
private
:
94
const
ExportSettings
&export_settings;
95
BlenderContext
&blender_context;
96
const
BCMatrix
global_transform;
97
98
public
:
99
BCExportSettings(
ExportSettings
*exportSettings,
BlenderContext
&blenderContext)
100
: export_settings(*exportSettings),
101
blender_context(blenderContext),
102
global_transform(
BCMatrix
(exportSettings->global_forward, exportSettings->global_up))
103
{
104
}
105
106
const
BCMatrix
&get_global_transform()
107
{
108
return
global_transform;
109
}
110
111
bool
get_apply_modifiers()
112
{
113
return
export_settings.
apply_modifiers
;
114
}
115
116
BC_global_forward_axis
get_global_forward()
117
{
118
return
export_settings.
global_forward
;
119
}
120
121
BC_global_up_axis
get_global_up()
122
{
123
return
export_settings.
global_up
;
124
}
125
126
bool
get_apply_global_orientation()
127
{
128
return
export_settings.
apply_global_orientation
;
129
}
130
131
BC_export_mesh_type
get_export_mesh_type()
132
{
133
return
export_settings.
export_mesh_type
;
134
}
135
136
bool
get_selected()
137
{
138
return
export_settings.
selected
;
139
}
140
141
bool
get_include_children()
142
{
143
return
export_settings.
include_children
;
144
}
145
146
bool
get_include_armatures()
147
{
148
return
export_settings.
include_armatures
;
149
}
150
151
bool
get_include_shapekeys()
152
{
153
return
export_settings.
include_shapekeys
;
154
}
155
156
bool
get_deform_bones_only()
157
{
158
return
export_settings.
deform_bones_only
;
159
}
160
161
bool
get_include_animations()
162
{
163
return
export_settings.
include_animations
;
164
}
165
166
bool
get_include_all_actions()
167
{
168
return
export_settings.
include_all_actions
;
169
}
170
171
int
get_sampling_rate()
172
{
173
return
export_settings.
sampling_rate
;
174
}
175
176
bool
get_keep_smooth_curves()
177
{
178
return
export_settings.
keep_smooth_curves
;
179
}
180
181
bool
get_keep_keyframes()
182
{
183
return
export_settings.
keep_keyframes
;
184
}
185
186
bool
get_keep_flat_curves()
187
{
188
return
export_settings.
keep_flat_curves
;
189
}
190
191
bool
get_active_uv_only()
192
{
193
return
export_settings.
active_uv_only
;
194
}
195
196
BC_export_animation_type
get_export_animation_type()
197
{
198
return
export_settings.
export_animation_type
;
199
}
200
201
bool
get_use_texture_copies()
202
{
203
return
export_settings.
use_texture_copies
;
204
}
205
206
bool
get_triangulate()
207
{
208
return
export_settings.
triangulate
;
209
}
210
211
bool
get_use_object_instantiation()
212
{
213
return
export_settings.
use_object_instantiation
;
214
}
215
216
bool
get_use_blender_profile()
217
{
218
return
export_settings.
use_blender_profile
;
219
}
220
221
bool
get_sort_by_name()
222
{
223
return
export_settings.
sort_by_name
;
224
}
225
226
BC_export_transformation_type
get_object_transformation_type()
227
{
228
return
export_settings.
object_transformation_type
;
229
}
230
231
BC_export_transformation_type
get_animation_transformation_type()
232
{
233
return
export_settings.
animation_transformation_type
;
234
}
235
236
bool
get_open_sim()
237
{
238
return
export_settings.
open_sim
;
239
}
240
241
bool
get_limit_precision()
242
{
243
return
export_settings.
limit_precision
;
244
}
245
246
bool
get_keep_bind_info()
247
{
248
return
export_settings.
keep_bind_info
;
249
}
250
251
char
*get_filepath()
252
{
253
return
export_settings.
filepath
;
254
}
255
256
LinkNode
*get_export_set()
257
{
258
return
export_settings.
export_set
;
259
}
260
261
BlenderContext
&get_blender_context()
262
{
263
return
blender_context;
264
}
265
266
Scene
*get_scene()
267
{
268
return
blender_context.
get_scene
();
269
}
270
271
ViewLayer
*get_view_layer()
272
{
273
return
blender_context.
get_view_layer
();
274
}
275
276
bool
is_export_root(
Object
*ob)
277
{
278
return
bc_is_base_node
(get_export_set(), ob, get_scene(), get_view_layer());
279
}
280
};
281
282
#endif
BCMath.h
BLI_linklist.h
bc_is_base_node
bool bc_is_base_node(LinkNode *export_set, Object *ob, const Scene *scene, ViewLayer *view_layer)
Definition
BlenderContext.cpp:19
bc_get_children
void bc_get_children(std::vector< Object * > &child_set, Object *ob, const Scene *scene, ViewLayer *view_layer)
Definition
BlenderContext.cpp:40
BlenderContext.h
BC_global_up_axis
BC_global_up_axis
Definition
BlenderTypes.h:26
BC_global_forward_axis
BC_global_forward_axis
Definition
BlenderTypes.h:17
BC_export_animation_type
BC_export_animation_type
Definition
ExportSettings.h:31
BC_ANIMATION_EXPORT_KEYS
@ BC_ANIMATION_EXPORT_KEYS
Definition
ExportSettings.h:33
BC_ANIMATION_EXPORT_SAMPLES
@ BC_ANIMATION_EXPORT_SAMPLES
Definition
ExportSettings.h:32
BC_export_mesh_type
BC_export_mesh_type
Definition
ExportSettings.h:21
BC_MESH_TYPE_RENDER
@ BC_MESH_TYPE_RENDER
Definition
ExportSettings.h:23
BC_MESH_TYPE_VIEW
@ BC_MESH_TYPE_VIEW
Definition
ExportSettings.h:22
BC_ui_export_section
BC_ui_export_section
Definition
ExportSettings.h:36
BC_UI_SECTION_ANIMATION
@ BC_UI_SECTION_ANIMATION
Definition
ExportSettings.h:40
BC_UI_SECTION_MAIN
@ BC_UI_SECTION_MAIN
Definition
ExportSettings.h:37
BC_UI_SECTION_ARMATURE
@ BC_UI_SECTION_ARMATURE
Definition
ExportSettings.h:39
BC_UI_SECTION_GEOMETRY
@ BC_UI_SECTION_GEOMETRY
Definition
ExportSettings.h:38
BC_UI_SECTION_COLLADA
@ BC_UI_SECTION_COLLADA
Definition
ExportSettings.h:41
BC_export_transformation_type
BC_export_transformation_type
Definition
ExportSettings.h:26
BC_TRANSFORMATION_TYPE_MATRIX
@ BC_TRANSFORMATION_TYPE_MATRIX
Definition
ExportSettings.h:27
BC_TRANSFORMATION_TYPE_DECOMPOSED
@ BC_TRANSFORMATION_TYPE_DECOMPOSED
Definition
ExportSettings.h:28
BCMatrix
Definition
BCMath.h:44
BlenderContext
Definition
BlenderContext.h:42
BlenderContext::get_view_layer
ViewLayer * get_view_layer()
Definition
BlenderContext.cpp:140
BlenderContext::get_scene
Scene * get_scene()
Definition
BlenderContext.cpp:123
scene
Scene scene
Definition
deg_eval_copy_on_write.cc:98
ExportSettings
Definition
ExportSettings.h:44
ExportSettings::keep_flat_curves
bool keep_flat_curves
Definition
ExportSettings.h:62
ExportSettings::triangulate
bool triangulate
Definition
ExportSettings.h:68
ExportSettings::limit_precision
bool limit_precision
Definition
ExportSettings.h:76
ExportSettings::use_object_instantiation
bool use_object_instantiation
Definition
ExportSettings.h:69
ExportSettings::export_animation_type
BC_export_animation_type export_animation_type
Definition
ExportSettings.h:65
ExportSettings::include_animations
bool include_animations
Definition
ExportSettings.h:57
ExportSettings::keep_smooth_curves
bool keep_smooth_curves
Definition
ExportSettings.h:60
ExportSettings::apply_global_orientation
bool apply_global_orientation
Definition
ExportSettings.h:48
ExportSettings::global_forward
BC_global_forward_axis global_forward
Definition
ExportSettings.h:46
ExportSettings::apply_modifiers
bool apply_modifiers
Definition
ExportSettings.h:45
ExportSettings::selected
bool selected
Definition
ExportSettings.h:52
ExportSettings::sampling_rate
int sampling_rate
Definition
ExportSettings.h:59
ExportSettings::animation_transformation_type
BC_export_transformation_type animation_transformation_type
Definition
ExportSettings.h:73
ExportSettings::object_transformation_type
BC_export_transformation_type object_transformation_type
Definition
ExportSettings.h:72
ExportSettings::deform_bones_only
bool deform_bones_only
Definition
ExportSettings.h:56
ExportSettings::include_all_actions
bool include_all_actions
Definition
ExportSettings.h:58
ExportSettings::export_set
LinkNode * export_set
Definition
ExportSettings.h:80
ExportSettings::include_shapekeys
bool include_shapekeys
Definition
ExportSettings.h:55
ExportSettings::use_blender_profile
bool use_blender_profile
Definition
ExportSettings.h:70
ExportSettings::export_mesh_type
BC_export_mesh_type export_mesh_type
Definition
ExportSettings.h:50
ExportSettings::keep_keyframes
bool keep_keyframes
Definition
ExportSettings.h:61
ExportSettings::open_sim
bool open_sim
Definition
ExportSettings.h:75
ExportSettings::global_up
BC_global_up_axis global_up
Definition
ExportSettings.h:47
ExportSettings::filepath
char * filepath
Definition
ExportSettings.h:79
ExportSettings::sort_by_name
bool sort_by_name
Definition
ExportSettings.h:71
ExportSettings::active_uv_only
bool active_uv_only
Definition
ExportSettings.h:64
ExportSettings::include_armatures
bool include_armatures
Definition
ExportSettings.h:54
ExportSettings::include_children
bool include_children
Definition
ExportSettings.h:53
ExportSettings::keep_bind_info
bool keep_bind_info
Definition
ExportSettings.h:77
ExportSettings::use_texture_copies
bool use_texture_copies
Definition
ExportSettings.h:66
LinkNode
Definition
BLI_linklist.h:19
Object
Definition
DNA_object_types.h:192
Scene
Definition
DNA_scene_types.h:2106
ViewLayer
Definition
DNA_layer_types.h:149
Generated on Fri Apr 3 2026 06:33:18 for Blender by
doxygen
1.11.0