Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
ufbx.h
Go to the documentation of this file.
1#ifndef UFBX_UFBX_H_INCLUDED
2#define UFBX_UFBX_H_INCLUDED
3
4// -- User configuration
5
6#if defined(UFBX_CONFIG_HEADER)
7 #include UFBX_CONFIG_HEADER
8#endif
9
10// -- Headers
11
12#if !defined(UFBX_NO_LIBC_TYPES)
13 #include <stdint.h>
14 #include <stddef.h>
15 #include <stdbool.h>
16#endif
17
18// -- Platform
19
20#ifndef UFBX_STDC
21 #if defined(__STDC_VERSION__)
22 #define UFBX_STDC __STDC_VERSION__
23 #else
24 #define UFBX_STDC 0
25 #endif
26#endif
27
28#ifndef UFBX_CPP
29 #if defined(__cplusplus)
30 #define UFBX_CPP __cplusplus
31 #else
32 #define UFBX_CPP 0
33 #endif
34#endif
35
36#ifndef UFBX_PLATFORM_MSC
37 #if !defined(UFBX_STANDARD_C) && defined(_MSC_VER)
38 #define UFBX_PLATFORM_MSC _MSC_VER
39 #else
40 #define UFBX_PLATFORM_MSC 0
41 #endif
42#endif
43
44#ifndef UFBX_PLATFORM_GNUC
45 #if !defined(UFBX_STANDARD_C) && defined(__GNUC__)
46 #define UFBX_PLATFORM_GNUC __GNUC__
47 #else
48 #define UFBX_PLATFORM_GNUC 0
49 #endif
50#endif
51
52#ifndef UFBX_CPP11
53 // MSVC does not advertise C++11 by default so we need special detection
54 #if UFBX_CPP >= 201103L || (UFBX_CPP > 0 && UFBX_PLATFORM_MSC >= 1900)
55 #define UFBX_CPP11 1
56 #else
57 #define UFBX_CPP11 0
58 #endif
59#endif
60
61#if defined(_MSC_VER)
62 #pragma warning(push)
63 #pragma warning(disable: 4061) // enumerator 'ENUM' in switch of enum 'enum' is not explicitly handled by a case label
64 #pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union
65 #pragma warning(disable: 4505) // unreferenced local function has been removed
66 #pragma warning(disable: 4820) // type': 'N' bytes padding added after data member 'member'
67#elif defined(__clang__)
68 #pragma clang diagnostic push
69 #pragma clang diagnostic ignored "-Wpedantic"
70 #pragma clang diagnostic ignored "-Wpadded"
71 #if defined(__cplusplus)
72 #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
73 #pragma clang diagnostic ignored "-Wold-style-cast"
74 #endif
75#elif defined(__GNUC__)
76 #pragma GCC diagnostic push
77 #pragma GCC diagnostic ignored "-Wpedantic"
78 #pragma GCC diagnostic ignored "-Wpadded"
79 #if defined(__cplusplus)
80 #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
81 #pragma GCC diagnostic ignored "-Wold-style-cast"
82 #else
83 #if __GNUC__ >= 5
84 #pragma GCC diagnostic ignored "-Wc90-c99-compat"
85 #pragma GCC diagnostic ignored "-Wc99-c11-compat"
86 #endif
87 #endif
88#endif
89
90#if UFBX_PLATFORM_MSC
91 #define ufbx_inline static __forceinline
92#elif UFBX_PLATFORM_GNUC
93 #define ufbx_inline static inline __attribute__((always_inline, unused))
94#else
95 #define ufbx_inline static
96#endif
97
98// Assertion function used in ufbx, defaults to C standard `assert()`.
99// You can define this to your custom preferred assert macro, but in that case
100// make sure that it is also used within `ufbx.c`.
101// Defining `UFBX_NO_ASSERT` to any value disables assertions.
102#ifndef ufbx_assert
103 #if defined(UFBX_NO_ASSERT) || defined(UFBX_NO_LIBC)
104 #define ufbx_assert(cond) (void)0
105 #else
106 #include <assert.h>
107 #define ufbx_assert(cond) assert(cond)
108 #endif
109#endif
110
111// Pointer may be `NULL`.
112#define ufbx_nullable
113
114// Changing this value from default or calling this function can lead into
115// breaking API guarantees.
116#define ufbx_unsafe
117
118// Linkage of the main ufbx API functions.
119// Defaults to nothing, or `static` if `UFBX_STATIC` is defined.
120// If you want to isolate ufbx to a single translation unit you can do the following:
121// #define UFBX_STATIC
122// #include "ufbx.h"
123// #include "ufbx.c"
124#ifndef ufbx_abi
125 #if defined(UFBX_STATIC)
126 #define ufbx_abi static
127 #else
128 #define ufbx_abi
129 #endif
130#endif
131
132// Linkage of the main ufbx data fields in the header.
133// Defaults to `extern`, or `static` if `UFBX_STATIC` is defined.
134#ifndef ufbx_abi_data
135 #if defined(UFBX_STATIC)
136 #define ufbx_abi_data static
137 #else
138 #define ufbx_abi_data extern
139 #endif
140#endif
141
142// Linkage of the main ufbx data fields in the source.
143// Defaults to nothing, or `static` if `UFBX_STATIC` is defined.
144#ifndef ufbx_abi_data_definition
145 #if defined(UFBX_STATIC)
146 #define ufbx_abi_data_def static
147 #else
148 #define ufbx_abi_data_def
149 #endif
150#endif
151
152// -- Configuration
153
154#ifndef UFBX_REAL_TYPE
155 #if defined(UFBX_REAL_IS_FLOAT)
156 #define UFBX_REAL_TYPE float
157 #else
158 #define UFBX_REAL_TYPE double
159 #endif
160#endif
161
162// Limits for embedded arrays within structures.
163#define UFBX_ERROR_STACK_MAX_DEPTH 8
164#define UFBX_PANIC_MESSAGE_LENGTH 128
165#define UFBX_ERROR_INFO_LENGTH 256
166
167// Number of thread groups to use if threading is enabled.
168// A thread group processes a number of tasks and is then waited and potentially
169// re-used later. In essence, this controls the granularity of threading.
170#define UFBX_THREAD_GROUP_COUNT 4
171
172// -- Language
173
174// bindgen-disable
175
176#if UFBX_CPP11
177
178template <typename T, typename U>
179struct ufbxi_type_is { };
180
181template <typename T>
182struct ufbxi_type_is<T, T> { using type = int; };
183
184template <typename T>
185struct ufbx_converter { };
186
187#define UFBX_CONVERSION_IMPL(p_name) \
188 template <typename T, typename S=typename ufbxi_type_is<T, decltype(ufbx_converter<T>::from(*(const p_name*)nullptr))>::type> \
189 operator T() const { return ufbx_converter<T>::from(*this); }
190
191#define UFBX_CONVERSION_TO_IMPL(p_name) \
192 template <typename T, typename S=typename ufbxi_type_is<p_name, decltype(ufbx_converter<T>::to(*(const T*)nullptr))>::type> \
193 p_name(const T &t) { *this = ufbx_converter<T>::to(t); }
194
195#define UFBX_CONVERSION_LIST_IMPL(p_name) \
196 template <typename T, typename S=typename ufbxi_type_is<T, decltype(ufbx_converter<T>::from_list((p_name*)nullptr, (size_t)0))>::type> \
197 operator T() const { return ufbx_converter<T>::from_list(data, count); }
198
199#else
200
201#define UFBX_CONVERSION_IMPL(p_name)
202#define UFBX_CONVERSION_TO_IMPL(p_name)
203#define UFBX_CONVERSION_LIST_IMPL(p_name)
204
205#endif
206
207#if defined(__cplusplus)
208 #define UFBX_LIST_TYPE(p_name, p_type) struct p_name { p_type *data; size_t count; \
209 p_type &operator[](size_t index) const { ufbx_assert(index < count); return data[index]; } \
210 p_type *begin() const { return data; } \
211 p_type *end() const { return data + count; } \
212 UFBX_CONVERSION_LIST_IMPL(p_type) \
213 }
214#else
215 #define UFBX_LIST_TYPE(p_name, p_type) typedef struct p_name { p_type *data; size_t count; } p_name
216#endif
217
218// This cannot be enabled automatically if supported as the source file may be
219// compiled with a different compiler using different settings than the header
220// consumers, in practice it should work but it causes issues such as #70.
221#if (UFBX_STDC >= 202311L || UFBX_CPP11) && defined(UFBX_USE_EXPLICIT_ENUM)
222 #define UFBX_ENUM_REPR : int
223 #define UFBX_ENUM_FORCE_WIDTH(p_prefix)
224 #define UFBX_FLAG_REPR : int
225 #define UFBX_FLAG_FORCE_WIDTH(p_prefix)
226 #define UFBX_HAS_FORCE_32BIT 0
227#else
228 #define UFBX_ENUM_REPR
229 #define UFBX_ENUM_FORCE_WIDTH(p_prefix) p_prefix##_FORCE_32BIT = 0x7fffffff
230 #define UFBX_FLAG_REPR
231 #define UFBX_FLAG_FORCE_WIDTH(p_prefix) p_prefix##_FORCE_32BIT = 0x7fffffff
232 #define UFBX_HAS_FORCE_32BIT 1
233#endif
234
235#define UFBX_ENUM_TYPE(p_name, p_prefix, p_last) \
236 enum { p_prefix##_COUNT = p_last + 1 }
237
238#if UFBX_CPP
239 #define UFBX_VERTEX_ATTRIB_IMPL(p_type) \
240 p_type &operator[](size_t index) const { ufbx_assert(index < indices.count); return values.data[indices.data[index]]; }
241#else
242 #define UFBX_VERTEX_ATTRIB_IMPL(p_type)
243#endif
244
245#if UFBX_CPP11
246 #define UFBX_CALLBACK_IMPL(p_name, p_fn, p_return, p_params, p_args) \
247 template <typename F> static p_return _cpp_adapter p_params { F &f = *static_cast<F*>(user); return f p_args; } \
248 p_name() = default; \
249 p_name(p_fn *f) : fn(f), user(nullptr) { } \
250 template <typename F> p_name(F *f) : fn(&_cpp_adapter<F>), user(static_cast<void*>(f)) { }
251#else
252 #define UFBX_CALLBACK_IMPL(p_name, p_fn, p_return, p_params, p_args)
253#endif
254
255// bindgen-enable
256
257// -- Version
258
259// Packing/unpacking for `UFBX_HEADER_VERSION` and `ufbx_source_version`.
260#define ufbx_pack_version(major, minor, patch) ((major)*1000000u + (minor)*1000u + (patch))
261#define ufbx_version_major(version) ((uint32_t)(version)/1000000u%1000u)
262#define ufbx_version_minor(version) ((uint32_t)(version)/1000u%1000u)
263#define ufbx_version_patch(version) ((uint32_t)(version)%1000u)
264
265// Version of the ufbx header.
266// `UFBX_VERSION` is simply an alias of `UFBX_HEADER_VERSION`.
267// `ufbx_source_version` contains the version of the corresponding source file.
268// HINT: The version can be compared numerically to the result of `ufbx_pack_version()`,
269// for example `#if UFBX_VERSION >= ufbx_pack_version(0, 12, 0)`.
270#define UFBX_HEADER_VERSION ufbx_pack_version(0, 23, 0)
271#define UFBX_VERSION UFBX_HEADER_VERSION
272
273// -- Basic types
274
275// Main floating point type used everywhere in ufbx, defaults to `double`.
276// If you define `UFBX_REAL_IS_FLOAT` to any value, `ufbx_real` will be defined
277// as `float` instead.
278// You can also manually define `UFBX_REAL_TYPE` to any floating point type.
280
281// Null-terminated UTF-8 encoded string within an FBX file
282typedef struct ufbx_string {
283 const char *data;
284 size_t length;
285
288
289// Opaque byte buffer blob
290typedef struct ufbx_blob {
291 const void *data;
292 size_t size;
293
296
297// 2D vector
298typedef struct ufbx_vec2 {
299 union {
300 struct { ufbx_real x, y; };
302 };
303
306
307// 3D vector
308typedef struct ufbx_vec3 {
309 union {
310 struct { ufbx_real x, y, z; };
312 };
313
316
317// 4D vector
318typedef struct ufbx_vec4 {
319 union {
320 struct { ufbx_real x, y, z, w; };
322 };
323
326
327// Quaternion
328typedef struct ufbx_quat {
329 union {
330 struct { ufbx_real x, y, z, w; };
332 };
333
336
337// Order in which Euler-angle rotation axes are applied for a transform
338// NOTE: The order in the name refers to the order of axes *applied*,
339// not the multiplication order: eg. `UFBX_ROTATION_ORDER_XYZ` is `Z*Y*X`
340// [TODO: Figure out what the spheric rotation order is...]
352
354
355// Explicit translation+rotation+scale transformation.
356// NOTE: Rotation is a quaternion, not Euler angles!
364
365// 4x3 matrix encoding an affine transformation.
366// `cols[0..2]` are the X/Y/Z basis vectors, `cols[3]` is the translation
381
382typedef struct ufbx_void_list {
383 void *data;
384 size_t count;
386
387UFBX_LIST_TYPE(ufbx_bool_list, bool);
388UFBX_LIST_TYPE(ufbx_uint32_list, uint32_t);
389UFBX_LIST_TYPE(ufbx_real_list, ufbx_real);
390UFBX_LIST_TYPE(ufbx_vec2_list, ufbx_vec2);
391UFBX_LIST_TYPE(ufbx_vec3_list, ufbx_vec3);
392UFBX_LIST_TYPE(ufbx_vec4_list, ufbx_vec4);
393UFBX_LIST_TYPE(ufbx_string_list, ufbx_string);
394
395// Sentinel value used to represent a missing index.
396#define UFBX_NO_INDEX ((uint32_t)~0u)
397
398// -- Document object model
399
410
411 UFBX_ENUM_FORCE_WIDTH(UFBX_DOM_VALUE_TYPE)
413
415
417
418UFBX_LIST_TYPE(ufbx_int32_list, int32_t);
419UFBX_LIST_TYPE(ufbx_int64_list, int64_t);
420UFBX_LIST_TYPE(ufbx_float_list, float);
421UFBX_LIST_TYPE(ufbx_double_list, double);
422UFBX_LIST_TYPE(ufbx_blob_list, ufbx_blob);
423
431
432UFBX_LIST_TYPE(ufbx_dom_node_list, ufbx_dom_node*);
433UFBX_LIST_TYPE(ufbx_dom_value_list, ufbx_dom_value);
434
437 ufbx_dom_node_list children;
438 ufbx_dom_value_list values;
439};
440
441// -- Properties
442
443// FBX elements have properties which are arbitrary key/value pairs that can
444// have inherited default values or be animated. In most cases you don't need
445// to access these unless you need a feature not implemented directly in ufbx.
446// NOTE: Prefer using `ufbx_find_prop[_len](...)` to search for a property by
447// name as it can find it from the defaults if necessary.
448
449typedef struct ufbx_prop ufbx_prop;
450typedef struct ufbx_props ufbx_props;
451
452// Data type contained within the property. All the data fields are always
453// populated regardless of type, so there's no need to switch by type usually
454// eg. `prop->value_real` and `prop->value_int` have the same value (well, close)
455// if `prop->type == UFBX_PROP_INTEGER`. String values are not converted from/to.
456typedef enum ufbx_prop_type UFBX_ENUM_REPR {
473
474 UFBX_ENUM_FORCE_WIDTH(UFBX_PROP_TYPE)
476
478
479// Property flags: Advanced information about properties, not usually needed.
481 // Supports animation.
482 // NOTE: ufbx ignores this and allows animations on non-animatable properties.
484
485 // User defined (custom) property.
487
488 // Hidden in UI.
490
491 // Disallow modification from UI for components.
496
497 // Disable animation from components.
502
503 // Property created by ufbx when an element has a connected `ufbx_anim_prop`
504 // but doesn't contain the `ufbx_prop` it's referring to.
505 // NOTE: The property may have been found in the templated defaults.
507
508 // The property has at least one `ufbx_anim_prop` in some layer.
510
511 // Used by `ufbx_evaluate_prop()` to indicate the the property was not found.
513
514 // The property is connected to another one.
515 // This use case is relatively rare so `ufbx_prop` does not track connections
516 // directly. You can find connections from `ufbx_element.connections_dst` where
517 // `ufbx_connection.dst_prop` is this property and `ufbx_connection.src_prop` is defined.
519
520 // The value of this property is undefined (represented as zero).
522
523 // This property has been overridden by the user.
524 // See `ufbx_anim.prop_overrides` for more information.
526
527 // Value type.
528 // `REAL/VEC2/VEC3/VEC4` are mutually exclusive but may coexist with eg. `STRING`
529 // in some rare cases where the string defines the unit for the vector.
537
538 UFBX_FLAG_FORCE_WIDTH(UFBX_PROP_FLAGS)
540
541// Single property with name/type/value.
561
562UFBX_LIST_TYPE(ufbx_prop_list, ufbx_prop);
563
564// List of alphabetically sorted properties with potential defaults.
565// For animated objects in as scene from `ufbx_evaluate_scene()` this list
566// only has the animated properties, the originals are stored under `defaults`.
568 ufbx_prop_list props;
570
572};
573
574typedef struct ufbx_scene ufbx_scene;
575
576// -- Elements
577
578// Element is the lowest level representation of the FBX file in ufbx.
579// An element contains type, id, name, and properties (see `ufbx_props` above)
580// Elements may be connected to each other arbitrarily via `ufbx_connection`
581
583
584// Unknown
586
587// Nodes
588typedef struct ufbx_node ufbx_node;
589
590// Node attributes (common)
591typedef struct ufbx_mesh ufbx_mesh;
592typedef struct ufbx_light ufbx_light;
594typedef struct ufbx_bone ufbx_bone;
595typedef struct ufbx_empty ufbx_empty;
596
597// Node attributes (curves/surfaces)
603
604// Node attributes (advanced)
610
611// Deformers
619
620// Materials
623typedef struct ufbx_video ufbx_video;
626
627// Animation
632
633// Collections
637
638// Constraints
641
642// Audio
645
646// Miscellaneous
647typedef struct ufbx_pose ufbx_pose;
649
650UFBX_LIST_TYPE(ufbx_element_list, ufbx_element*);
651UFBX_LIST_TYPE(ufbx_unknown_list, ufbx_unknown*);
652UFBX_LIST_TYPE(ufbx_node_list, ufbx_node*);
653UFBX_LIST_TYPE(ufbx_mesh_list, ufbx_mesh*);
654UFBX_LIST_TYPE(ufbx_light_list, ufbx_light*);
655UFBX_LIST_TYPE(ufbx_camera_list, ufbx_camera*);
656UFBX_LIST_TYPE(ufbx_bone_list, ufbx_bone*);
657UFBX_LIST_TYPE(ufbx_empty_list, ufbx_empty*);
658UFBX_LIST_TYPE(ufbx_line_curve_list, ufbx_line_curve*);
659UFBX_LIST_TYPE(ufbx_nurbs_curve_list, ufbx_nurbs_curve*);
660UFBX_LIST_TYPE(ufbx_nurbs_surface_list, ufbx_nurbs_surface*);
661UFBX_LIST_TYPE(ufbx_nurbs_trim_surface_list, ufbx_nurbs_trim_surface*);
662UFBX_LIST_TYPE(ufbx_nurbs_trim_boundary_list, ufbx_nurbs_trim_boundary*);
663UFBX_LIST_TYPE(ufbx_procedural_geometry_list, ufbx_procedural_geometry*);
664UFBX_LIST_TYPE(ufbx_stereo_camera_list, ufbx_stereo_camera*);
665UFBX_LIST_TYPE(ufbx_camera_switcher_list, ufbx_camera_switcher*);
666UFBX_LIST_TYPE(ufbx_marker_list, ufbx_marker*);
667UFBX_LIST_TYPE(ufbx_lod_group_list, ufbx_lod_group*);
668UFBX_LIST_TYPE(ufbx_skin_deformer_list, ufbx_skin_deformer*);
669UFBX_LIST_TYPE(ufbx_skin_cluster_list, ufbx_skin_cluster*);
670UFBX_LIST_TYPE(ufbx_blend_deformer_list, ufbx_blend_deformer*);
671UFBX_LIST_TYPE(ufbx_blend_channel_list, ufbx_blend_channel*);
672UFBX_LIST_TYPE(ufbx_blend_shape_list, ufbx_blend_shape*);
673UFBX_LIST_TYPE(ufbx_cache_deformer_list, ufbx_cache_deformer*);
674UFBX_LIST_TYPE(ufbx_cache_file_list, ufbx_cache_file*);
675UFBX_LIST_TYPE(ufbx_material_list, ufbx_material*);
676UFBX_LIST_TYPE(ufbx_texture_list, ufbx_texture*);
677UFBX_LIST_TYPE(ufbx_video_list, ufbx_video*);
678UFBX_LIST_TYPE(ufbx_shader_list, ufbx_shader*);
679UFBX_LIST_TYPE(ufbx_shader_binding_list, ufbx_shader_binding*);
680UFBX_LIST_TYPE(ufbx_anim_stack_list, ufbx_anim_stack*);
681UFBX_LIST_TYPE(ufbx_anim_layer_list, ufbx_anim_layer*);
682UFBX_LIST_TYPE(ufbx_anim_value_list, ufbx_anim_value*);
683UFBX_LIST_TYPE(ufbx_anim_curve_list, ufbx_anim_curve*);
684UFBX_LIST_TYPE(ufbx_display_layer_list, ufbx_display_layer*);
685UFBX_LIST_TYPE(ufbx_selection_set_list, ufbx_selection_set*);
686UFBX_LIST_TYPE(ufbx_selection_node_list, ufbx_selection_node*);
687UFBX_LIST_TYPE(ufbx_character_list, ufbx_character*);
688UFBX_LIST_TYPE(ufbx_constraint_list, ufbx_constraint*);
689UFBX_LIST_TYPE(ufbx_audio_layer_list, ufbx_audio_layer*);
690UFBX_LIST_TYPE(ufbx_audio_clip_list, ufbx_audio_clip*);
691UFBX_LIST_TYPE(ufbx_pose_list, ufbx_pose*);
692UFBX_LIST_TYPE(ufbx_metadata_object_list, ufbx_metadata_object*);
693
695 UFBX_ELEMENT_UNKNOWN, // < `ufbx_unknown`
696 UFBX_ELEMENT_NODE, // < `ufbx_node`
697 UFBX_ELEMENT_MESH, // < `ufbx_mesh`
698 UFBX_ELEMENT_LIGHT, // < `ufbx_light`
699 UFBX_ELEMENT_CAMERA, // < `ufbx_camera`
700 UFBX_ELEMENT_BONE, // < `ufbx_bone`
701 UFBX_ELEMENT_EMPTY, // < `ufbx_empty`
702 UFBX_ELEMENT_LINE_CURVE, // < `ufbx_line_curve`
703 UFBX_ELEMENT_NURBS_CURVE, // < `ufbx_nurbs_curve`
704 UFBX_ELEMENT_NURBS_SURFACE, // < `ufbx_nurbs_surface`
705 UFBX_ELEMENT_NURBS_TRIM_SURFACE, // < `ufbx_nurbs_trim_surface`
706 UFBX_ELEMENT_NURBS_TRIM_BOUNDARY, // < `ufbx_nurbs_trim_boundary`
707 UFBX_ELEMENT_PROCEDURAL_GEOMETRY, // < `ufbx_procedural_geometry`
708 UFBX_ELEMENT_STEREO_CAMERA, // < `ufbx_stereo_camera`
709 UFBX_ELEMENT_CAMERA_SWITCHER, // < `ufbx_camera_switcher`
710 UFBX_ELEMENT_MARKER, // < `ufbx_marker`
711 UFBX_ELEMENT_LOD_GROUP, // < `ufbx_lod_group`
712 UFBX_ELEMENT_SKIN_DEFORMER, // < `ufbx_skin_deformer`
713 UFBX_ELEMENT_SKIN_CLUSTER, // < `ufbx_skin_cluster`
714 UFBX_ELEMENT_BLEND_DEFORMER, // < `ufbx_blend_deformer`
715 UFBX_ELEMENT_BLEND_CHANNEL, // < `ufbx_blend_channel`
716 UFBX_ELEMENT_BLEND_SHAPE, // < `ufbx_blend_shape`
717 UFBX_ELEMENT_CACHE_DEFORMER, // < `ufbx_cache_deformer`
718 UFBX_ELEMENT_CACHE_FILE, // < `ufbx_cache_file`
719 UFBX_ELEMENT_MATERIAL, // < `ufbx_material`
720 UFBX_ELEMENT_TEXTURE, // < `ufbx_texture`
721 UFBX_ELEMENT_VIDEO, // < `ufbx_video`
722 UFBX_ELEMENT_SHADER, // < `ufbx_shader`
723 UFBX_ELEMENT_SHADER_BINDING, // < `ufbx_shader_binding`
724 UFBX_ELEMENT_ANIM_STACK, // < `ufbx_anim_stack`
725 UFBX_ELEMENT_ANIM_LAYER, // < `ufbx_anim_layer`
726 UFBX_ELEMENT_ANIM_VALUE, // < `ufbx_anim_value`
727 UFBX_ELEMENT_ANIM_CURVE, // < `ufbx_anim_curve`
728 UFBX_ELEMENT_DISPLAY_LAYER, // < `ufbx_display_layer`
729 UFBX_ELEMENT_SELECTION_SET, // < `ufbx_selection_set`
730 UFBX_ELEMENT_SELECTION_NODE, // < `ufbx_selection_node`
731 UFBX_ELEMENT_CHARACTER, // < `ufbx_character`
732 UFBX_ELEMENT_CONSTRAINT, // < `ufbx_constraint`
733 UFBX_ELEMENT_AUDIO_LAYER, // < `ufbx_audio_layer`
734 UFBX_ELEMENT_AUDIO_CLIP, // < `ufbx_audio_clip`
735 UFBX_ELEMENT_POSE, // < `ufbx_pose`
736 UFBX_ELEMENT_METADATA_OBJECT, // < `ufbx_metadata_object`
737
740
741 UFBX_ENUM_FORCE_WIDTH(UFBX_ELEMENT_TYPE)
743
745
746// Connection between two elements.
747// Source and destination are somewhat arbitrary but the destination is
748// often the "container" like a parent node or mesh containing a deformer.
755
756UFBX_LIST_TYPE(ufbx_connection_list, ufbx_connection);
757
758// Element "base-class" common to each element.
759// Some fields (like `connections_src`) are advanced and not visible
760// in the specialized element structs.
761// NOTE: The `element_id` value is consistent when loading the
762// _same_ file, but re-exporting the file will invalidate them.
775
776// -- Unknown
777
779 // Shared "base-class" header, see `ufbx_element`.
780 union { ufbx_element element; struct {
783 uint32_t element_id;
784 uint32_t typed_id;
785 }; };
786
787 // FBX format specific type information.
788 // In ASCII FBX format:
789 // super_type: ID, "type::name", "sub_type" { ... }
793};
794
795// -- Nodes
796
797// Inherit type specifies how hierarchial node transforms are combined.
798// This only affects the final scaling, as rotation and translation are always
799// inherited correctly.
800// NOTE: These don't map to `"InheritType"` property as there may be new ones for
801// compatibility with various exporters.
803
804 // Normal matrix composition of hierarchy: `R*S*r*s`.
805 // child.node_to_world = parent.node_to_world * child.node_to_parent;
807
808 // Ignore parent scale when computing the transform: `R*r*s`.
809 // ufbx_transform t = node.local_transform;
810 // t.translation *= parent.inherit_scale;
811 // t.scale *= node.inherit_scale_node.inherit_scale;
812 // child.node_to_world = parent.unscaled_node_to_world * t;
813 // Also known as "Segment scale compensate" in some software.
815
816 // Apply parent scale component-wise: `R*r*S*s`.
817 // ufbx_transform t = node.local_transform;
818 // t.translation *= parent.inherit_scale;
819 // t.scale *= node.inherit_scale_node.inherit_scale;
820 // child.node_to_world = parent.unscaled_node_to_world * t;
822
823 UFBX_ENUM_FORCE_WIDTH(UFBX_INHERIT_MODE)
825
827
828// Axis used to mirror transformations for handedness conversion.
829typedef enum ufbx_mirror_axis UFBX_ENUM_REPR {
830
835
836 UFBX_ENUM_FORCE_WIDTH(UFBX_MIRROR_AXIS)
838
840
841// Nodes form the scene transformation hierarchy and can contain attached
842// elements such as meshes or lights. In normal cases a single `ufbx_node`
843// contains only a single attached element, so using `type/mesh/...` is safe.
844struct ufbx_node {
845 union { ufbx_element element; struct {
848 uint32_t element_id;
849 uint32_t typed_id;
850 }; };
851
852 // Node hierarchy
853
854 // Parent node containing this one if not root.
855 //
856 // Always non-`NULL` for non-root nodes unless
857 // `ufbx_load_opts.allow_nodes_out_of_root` is enabled.
859
860 // List of child nodes parented to this node.
861 ufbx_node_list children;
862
863 // Common attached element type and typed pointers. Set to `NULL` if not in
864 // use, so checking `attrib_type` is not required.
865 //
866 // HINT: If you need less common attributes access `ufbx_node.attrib`, you
867 // can use utility functions like `ufbx_as_nurbs_curve(attrib)` to convert
868 // and check the attribute in one step.
873
874 // Less common attributes use these fields.
875 //
876 // Defined even if it is one of the above, eg. `ufbx_mesh`. In case there
877 // is multiple attributes this will be the first one.
879
880 // Geometry transform helper if one exists.
881 // See `UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES`.
883
884 // Scale helper if one exists.
885 // See `UFBX_INHERIT_MODE_HANDLING_HELPER_NODES`.
887
888 // `attrib->type` if `attrib` is defined, otherwise `UFBX_ELEMENT_UNKNOWN`.
890
891 // List of _all_ attached attribute elements.
892 //
893 // In most cases there is only zero or one attributes per node, but if you
894 // have a very exotic FBX file nodes may have multiple attributes.
895 ufbx_element_list all_attribs;
896
897 // Local transform in parent, geometry transform is a non-inherited
898 // transform applied only to attachments like meshes
903
904 // Combined scale when using `UFBX_INHERIT_MODE_COMPONENTWISE_SCALE`.
905 // Contains `local_transform.scale` otherwise.
907
908 // Node where scale is inherited from for `UFBX_INHERIT_MODE_COMPONENTWISE_SCALE`
909 // and even for `UFBX_INHERIT_MODE_IGNORE_PARENT_SCALE`.
910 // For componentwise-scale nodes, this will point to `parent`, for scale ignoring
911 // nodes this will point to the parent of the nearest componentwise-scaled node
912 // in the parent chain.
914
915 // Raw Euler angles in degrees for those who want them
916
917 // Specifies the axis order `euler_rotation` is applied in.
919 // Rotation around the local X/Y/Z axes in `rotation_order`.
920 // The angles are specified in degrees.
922
923 // Matrices derived from the transformations, for transforming geometry
924 // prefer using `geometry_to_world` as that supports geometric transforms.
925
926 // Transform from this node to `parent` space.
927 // Equivalent to `ufbx_transform_to_matrix(&local_transform)`.
929 // Transform from this node to the world space, ie. multiplying all the
930 // `node_to_parent` matrices of the parent chain together.
932 // Transform from the attribute to this node. Does not affect the transforms
933 // of `children`!
934 // Equivalent to `ufbx_transform_to_matrix(&geometry_transform)`.
936 // Transform from attribute space to world space.
937 // Equivalent to `ufbx_matrix_mul(&node_to_world, &geometry_to_node)`.
939 // Transform from this node to world space, ignoring self scaling.
941
942 // ufbx-specific adjustment for switching between coodrinate/unit systems.
943 // HINT: In most cases you don't need to deal with these as these are baked
944 // into all the transforms above and into `ufbx_evaluate_transform()`.
945 ufbx_vec3 adjust_pre_translation; // < Translation applied between parent and self
946 ufbx_quat adjust_pre_rotation; // < Rotation applied between parent and self
947 ufbx_real adjust_pre_scale; // < Scaling applied between parent and self
948 ufbx_quat adjust_post_rotation; // < Rotation applied in local space at the end
949 ufbx_real adjust_post_scale; // < Scaling applied in local space at the end
950 ufbx_real adjust_translation_scale; // < Scaling applied to translation only
951 ufbx_mirror_axis adjust_mirror_axis; // < Mirror translation and rotation on this axis
952
953 // Materials used by `mesh` or other `attrib`.
954 // There may be multiple copies of a single `ufbx_mesh` with different materials
955 // in the `ufbx_node` instances.
956 ufbx_material_list materials;
957
958 // Bind pose
960
961 // Visibility state.
963
964 // True if this node is the implicit root node of the scene.
966
967 // True if the node has a non-identity `geometry_transform`.
969
970 // If `true`, you should apply `RotationOrder`, `PreRotation` and `PostRotation` properties.
971 // See `UFBX_RotationOrder`, `UFBX_PreRotation`, `UFBX_PostRotation`.
973
974 // If `true`, the transform is adjusted by ufbx, not enabled by default.
975 // See `adjust_pre_rotation`, `adjust_pre_scale`, `adjust_post_rotation`,
976 // and `adjust_post_scale`.
978
979 // Scale is adjusted by root scale.
981
982 // True if this node is a synthetic geometry transform helper.
983 // See `UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES`.
985
986 // True if the node is a synthetic scale compensation helper.
987 // See `UFBX_INHERIT_MODE_HANDLING_HELPER_NODES`.
989
990 // Parent node to children that can compensate for parent scale.
992
993 // How deep is this node in the parent hierarchy. Root node is at depth `0`
994 // and the immediate children of root at `1`.
995 uint32_t node_depth;
996};
997
998// Vertex attribute: All attributes are stored in a consistent indexed format
999// regardless of how it's actually stored in the file.
1000//
1001// `values` is a contiguous array of attribute values.
1002// `indices` maps each mesh index into a value in the `values` array.
1003//
1004// If `unique_per_vertex` is set then the attribute is guaranteed to have a
1005// single defined value per vertex accessible via:
1006// attrib.values.data[attrib.indices.data[mesh->vertex_first_index[vertex_ix]]
1007typedef struct ufbx_vertex_attrib {
1008 // Is this attribute defined by the mesh.
1010 // List of values the attribute uses.
1012 // Indices into `values[]`, indexed up to `ufbx_mesh.num_indices`.
1013 ufbx_uint32_list indices;
1014 // Number of `ufbx_real` entries per value.
1016 // `true` if this attribute is defined per vertex, instead of per index.
1018 // Optional 4th 'W' component for the attribute.
1019 // May be defined for the following:
1020 // ufbx_mesh.vertex_normal
1021 // ufbx_mesh.vertex_tangent / ufbx_uv_set.vertex_tangent
1022 // ufbx_mesh.vertex_bitangent / ufbx_uv_set.vertex_bitangent
1023 // NOTE: This is not loaded by default, set `ufbx_load_opts.retain_vertex_attrib_w`.
1024 ufbx_real_list values_w;
1026
1027// 1D vertex attribute, see `ufbx_vertex_attrib` for information
1028typedef struct ufbx_vertex_real {
1030 ufbx_real_list values;
1031 ufbx_uint32_list indices;
1034 ufbx_real_list values_w;
1035
1038
1039// 2D vertex attribute, see `ufbx_vertex_attrib` for information
1040typedef struct ufbx_vertex_vec2 {
1042 ufbx_vec2_list values;
1043 ufbx_uint32_list indices;
1046 ufbx_real_list values_w;
1047
1050
1051// 3D vertex attribute, see `ufbx_vertex_attrib` for information
1052typedef struct ufbx_vertex_vec3 {
1054 ufbx_vec3_list values;
1055 ufbx_uint32_list indices;
1058 ufbx_real_list values_w;
1059
1062
1063// 4D vertex attribute, see `ufbx_vertex_attrib` for information
1064typedef struct ufbx_vertex_vec4 {
1066 ufbx_vec4_list values;
1067 ufbx_uint32_list indices;
1070 ufbx_real_list values_w;
1071
1074
1075// Vertex UV set/layer
1076typedef struct ufbx_uv_set {
1078 uint32_t index;
1079
1080 // Vertex attributes, see `ufbx_mesh` attributes for more information
1081 ufbx_vertex_vec2 vertex_uv; // < UV / texture coordinates
1082 ufbx_vertex_vec3 vertex_tangent; // < (optional) Tangent vector in UV.x direction
1083 ufbx_vertex_vec3 vertex_bitangent; // < (optional) Tangent vector in UV.y direction
1085
1086// Vertex color set/layer
1087typedef struct ufbx_color_set {
1089 uint32_t index;
1090
1091 // Vertex attributes, see `ufbx_mesh` attributes for more information
1092 ufbx_vertex_vec4 vertex_color; // < Per-vertex RGBA color
1094
1095UFBX_LIST_TYPE(ufbx_uv_set_list, ufbx_uv_set);
1096UFBX_LIST_TYPE(ufbx_color_set_list, ufbx_color_set);
1097
1098// Edge between two _indices_ in a mesh
1099typedef struct ufbx_edge {
1100 union {
1101 struct { uint32_t a, b; };
1102 uint32_t indices[2];
1103 };
1105
1106UFBX_LIST_TYPE(ufbx_edge_list, ufbx_edge);
1107
1108// Polygonal face with arbitrary number vertices, a single face contains a
1109// contiguous range of mesh indices, eg. `{5,3}` would have indices 5, 6, 7
1110//
1111// NOTE: `num_indices` maybe less than 3 in which case the face is invalid!
1112// [TODO #23: should probably remove the bad faces at load time]
1113typedef struct ufbx_face {
1114 uint32_t index_begin;
1115 uint32_t num_indices;
1117
1118UFBX_LIST_TYPE(ufbx_face_list, ufbx_face);
1119
1120// Subset of mesh faces used by a single material or group.
1121typedef struct ufbx_mesh_part {
1122
1123 // Index of the mesh part.
1124 uint32_t index;
1125
1126 // Sub-set of the geometry
1127 size_t num_faces; // < Number of faces (polygons)
1128 size_t num_triangles; // < Number of triangles if triangulated
1129
1130 size_t num_empty_faces; // < Number of faces with zero vertices
1131 size_t num_point_faces; // < Number of faces with a single vertex
1132 size_t num_line_faces; // < Number of faces with two vertices
1133
1134 // Indices to `ufbx_mesh.faces[]`.
1135 // Always contains `num_faces` elements.
1136 ufbx_uint32_list face_indices;
1137
1139
1140UFBX_LIST_TYPE(ufbx_mesh_part_list, ufbx_mesh_part);
1141
1142typedef struct ufbx_face_group {
1143 int32_t id; // < Numerical ID for this group.
1144 ufbx_string name; // < Name for the face group.
1146
1147UFBX_LIST_TYPE(ufbx_face_group_list, ufbx_face_group);
1148
1153
1154UFBX_LIST_TYPE(ufbx_subdivision_weight_range_list, ufbx_subdivision_weight_range);
1155
1160
1161UFBX_LIST_TYPE(ufbx_subdivision_weight_list, ufbx_subdivision_weight);
1162
1168
1169 // Weights of vertices in the source model.
1170 // Defined if `ufbx_subdivide_opts.evaluate_source_vertices` is set.
1171 ufbx_subdivision_weight_range_list source_vertex_ranges;
1172 ufbx_subdivision_weight_list source_vertex_weights;
1173
1174 // Weights of skin clusters in the source model.
1175 // Defined if `ufbx_subdivide_opts.evaluate_skin_weights` is set.
1176 ufbx_subdivision_weight_range_list skin_cluster_ranges;
1177 ufbx_subdivision_weight_list skin_cluster_weights;
1178
1180
1186
1187 UFBX_ENUM_FORCE_WIDTH(UFBX_SUBDIVISION_DISPLAY_MODE)
1189
1191
1195 // OpenSubdiv: `VTX_BOUNDARY_EDGE_AND_CORNER` / `FVAR_LINEAR_CORNERS_ONLY`
1197 // OpenSubdiv: `VTX_BOUNDARY_EDGE_ONLY` / `FVAR_LINEAR_NONE`
1199 // OpenSubdiv: `FVAR_LINEAR_BOUNDARIES`
1201 // OpenSubdiv: `FVAR_LINEAR_ALL`
1203
1204 UFBX_ENUM_FORCE_WIDTH(UFBX_SUBDIVISION_BOUNDARY)
1206
1208
1209// Polygonal mesh geometry.
1210//
1211// Example mesh with two triangles (x, z) and a quad (y).
1212// The faces have a constant UV coordinate x/y/z.
1213// The vertices have _per vertex_ normals that point up/down.
1214//
1215// ^ ^ ^
1216// A---B-----C
1217// |x / /|
1218// | / y / |
1219// |/ / z|
1220// D-----E---F
1221// v v v
1222//
1223// Attributes may have multiple values within a single vertex, for example a
1224// UV seam vertex has two UV coordinates. Thus polygons are defined using
1225// an index that counts each corner of each face polygon. If an attribute is
1226// defined (even per-vertex) it will always have a valid `indices` array.
1227//
1228// {0,3} {3,4} {7,3} faces ({ index_begin, num_indices })
1229// 0 1 2 3 4 5 6 7 8 9 index
1230//
1231// 0 1 3 1 2 4 3 2 4 5 vertex_indices[index]
1232// A B D B C E D C E F vertices[vertex_indices[index]]
1233//
1234// 0 0 1 0 0 1 1 0 1 1 vertex_normal.indices[index]
1235// ^ ^ v ^ ^ v v ^ v v vertex_normal.data[vertex_normal.indices[index]]
1236//
1237// 0 0 0 1 1 1 1 2 2 2 vertex_uv.indices[index]
1238// x x x y y y y z z z vertex_uv.data[vertex_uv.indices[index]]
1239//
1240// Vertex position can also be accessed uniformly through an accessor:
1241// 0 1 3 1 2 4 3 2 4 5 vertex_position.indices[index]
1242// A B D B C E D C E F vertex_position.data[vertex_position.indices[index]]
1243//
1244// Some geometry data is specified per logical vertex. Vertex positions are
1245// the only attribute that is guaranteed to be defined _uniquely_ per vertex.
1246// Vertex attributes _may_ be defined per vertex if `unique_per_vertex == true`.
1247// You can access the per-vertex values by first finding the first index that
1248// refers to the given vertex.
1249//
1250// 0 1 2 3 4 5 vertex
1251// A B C D E F vertices[vertex]
1252//
1253// 0 1 4 2 5 9 vertex_first_index[vertex]
1254// 0 0 0 1 1 1 vertex_normal.indices[vertex_first_index[vertex]]
1255// ^ ^ ^ v v v vertex_normal.data[vertex_normal.indices[vertex_first_index[vertex]]]
1256//
1258 union { ufbx_element element; struct {
1261 uint32_t element_id;
1262 uint32_t typed_id;
1263 ufbx_node_list instances;
1264 }; };
1265
1266 // Number of "logical" vertices that would be treated as a single point,
1267 // one vertex may be split to multiple indices for split attributes, eg. UVs
1268 size_t num_vertices; // < Number of logical "vertex" points
1269 size_t num_indices; // < Number of combiend vertex/attribute tuples
1270 size_t num_faces; // < Number of faces (polygons) in the mesh
1271 size_t num_triangles; // < Number of triangles if triangulated
1272
1273 // Number of edges in the mesh.
1274 // NOTE: May be zero in valid meshes if the file doesn't contain edge adjacency data!
1276
1277 size_t max_face_triangles; // < Maximum number of triangles in a face in this mesh
1278
1279 size_t num_empty_faces; // < Number of faces with zero vertices
1280 size_t num_point_faces; // < Number of faces with a single vertex
1281 size_t num_line_faces; // < Number of faces with two vertices
1282
1283 // Faces and optional per-face extra data
1284 ufbx_face_list faces; // < Face index range
1285 ufbx_bool_list face_smoothing; // < Should the face have soft normals
1286 ufbx_uint32_list face_material; // < Indices to `ufbx_mesh.materials[]` and `ufbx_node.materials[]`
1287 ufbx_uint32_list face_group; // < Face polygon group index, indices to `ufbx_mesh.face_groups[]`
1288 ufbx_bool_list face_hole; // < Should the face be hidden as a "hole"
1289
1290 // Edges and optional per-edge extra data
1291 ufbx_edge_list edges; // < Edge index range
1292 ufbx_bool_list edge_smoothing; // < Should the edge have soft normals
1293 ufbx_real_list edge_crease; // < Crease value for subdivision surfaces
1294 ufbx_bool_list edge_visibility; // < Should the edge be visible
1295
1296 // Logical vertices and positions, alternatively you can use
1297 // `vertex_position` for consistent interface with other attributes.
1298 ufbx_uint32_list vertex_indices;
1299 ufbx_vec3_list vertices;
1300
1301 // First index referring to a given vertex, `UFBX_NO_INDEX` if the vertex is unused.
1302 ufbx_uint32_list vertex_first_index;
1303
1304 // Vertex attributes, see the comment over the struct.
1305 //
1306 // NOTE: Not all meshes have all attributes, in that case `indices/data == NULL`!
1307 //
1308 // NOTE: UV/tangent/bitangent and color are the from first sets,
1309 // use `uv_sets/color_sets` to access the other layers.
1310 ufbx_vertex_vec3 vertex_position; // < Vertex positions
1311 ufbx_vertex_vec3 vertex_normal; // < (optional) Normal vectors, always defined if `ufbx_load_opts.generate_missing_normals`
1312 ufbx_vertex_vec2 vertex_uv; // < (optional) UV / texture coordinates
1313 ufbx_vertex_vec3 vertex_tangent; // < (optional) Tangent vector in UV.x direction
1314 ufbx_vertex_vec3 vertex_bitangent; // < (optional) Tangent vector in UV.y direction
1315 ufbx_vertex_vec4 vertex_color; // < (optional) Per-vertex RGBA color
1316 ufbx_vertex_real vertex_crease; // < (optional) Crease value for subdivision surfaces
1317
1318 // Multiple named UV/color sets
1319 // NOTE: The first set contains the same data as `vertex_uv/color`!
1320 ufbx_uv_set_list uv_sets;
1321 ufbx_color_set_list color_sets;
1322
1323 // Materials used by the mesh.
1324 // NOTE: These can be wrong if you want to support per-instance materials!
1325 // Use `ufbx_node.materials[]` to get the per-instance materials at the same indices.
1326 ufbx_material_list materials;
1327
1328 // Face groups for this mesh.
1329 ufbx_face_group_list face_groups;
1330
1331 // Segments that use a given material.
1332 // Defined even if the mesh doesn't have any materials.
1333 ufbx_mesh_part_list material_parts;
1334
1335 // Segments for each face group.
1336 ufbx_mesh_part_list face_group_parts;
1337
1338 // Order of `material_parts` by first face that refers to it.
1339 // Useful for compatibility with FBX SDK and various importers using it,
1340 // as they use this material order by default.
1342
1343 // Skinned vertex positions, for efficiency the skinned positions are the
1344 // same as the static ones for non-skinned meshes and `skinned_is_local`
1345 // is set to true meaning you need to transform them manually using
1346 // `ufbx_transform_position(&node->geometry_to_world, skinned_pos)`!
1350
1351 // Deformers
1352 ufbx_skin_deformer_list skin_deformers;
1353 ufbx_blend_deformer_list blend_deformers;
1354 ufbx_cache_deformer_list cache_deformers;
1355 ufbx_element_list all_deformers;
1356
1357 // Subdivision
1363
1364 // The winding of the faces has been reversed.
1366
1367 // Normals have been generated instead of evaluated.
1368 // Either from missing normals (via `ufbx_load_opts.generate_missing_normals`), skinning,
1369 // tessellation, or subdivision.
1371
1372 // Subdivision (result)
1375
1376 // Tessellation (result)
1378};
1379
1380// The kind of light source
1381typedef enum ufbx_light_type UFBX_ENUM_REPR {
1382 // Single point at local origin, at `node->world_transform.position`
1384 // Infinite directional light pointing locally towards `light->local_direction`
1385 // For global: `ufbx_transform_direction(&node->node_to_world, light->local_direction)`
1387 // Cone shaped light towards `light->local_direction`, between `light->inner/outer_angle`.
1388 // For global: `ufbx_transform_direction(&node->node_to_world, light->local_direction)`
1390 // Area light, shape specified by `light->area_shape`
1391 // TODO: Units?
1393 // Volumetric light source
1394 // TODO: How does this work
1396
1397 UFBX_ENUM_FORCE_WIDTH(UFBX_LIGHT_TYPE)
1399
1401
1402// How fast does the light intensity decay at a distance
1403typedef enum ufbx_light_decay UFBX_ENUM_REPR {
1404 UFBX_LIGHT_DECAY_NONE, // < 1 (no decay)
1406 UFBX_LIGHT_DECAY_QUADRATIC, // < 1 / d^2 (physically accurate)
1408
1409 UFBX_ENUM_FORCE_WIDTH(UFBX_LIGHT_DECAY)
1411
1413
1417
1418 UFBX_ENUM_FORCE_WIDTH(UFBX_LIGHT_AREA_SHAPE)
1420
1422
1423// Light source attached to a `ufbx_node`
1425 union { ufbx_element element; struct {
1428 uint32_t element_id;
1429 uint32_t typed_id;
1430 ufbx_node_list instances;
1431 }; };
1432
1433 // Color and intensity of the light, usually you want to use `color * intensity`
1434 // NOTE: `intensity` is 0.01x of the property `"Intensity"` as that matches
1435 // matches values in DCC programs before exporting.
1438
1439 // Direction the light is aimed at in node's local space, usually -Y
1441
1442 // Type of the light and shape parameters
1448
1451};
1452
1454 // Perspective projection.
1456
1457 // Orthographic projection.
1459
1460 UFBX_ENUM_FORCE_WIDTH(UFBX_PROJECTION_MODE)
1462
1464
1465// Method of specifying the rendering resolution from properties
1466// NOTE: Handled internally by ufbx, ignore unless you interpret `ufbx_props` directly!
1467typedef enum ufbx_aspect_mode UFBX_ENUM_REPR {
1468 // No defined resolution
1470 // `"AspectWidth"` and `"AspectHeight"` are relative to each other
1472 // `"AspectWidth"` and `"AspectHeight"` are both pixels
1474 // `"AspectWidth"` is pixels, `"AspectHeight"` is relative to width
1476 // < `"AspectHeight"` is pixels, `"AspectWidth"` is relative to height
1478
1479 UFBX_ENUM_FORCE_WIDTH(UFBX_ASPECT_MODE)
1481
1483
1484// Method of specifying the field of view from properties
1485// NOTE: Handled internally by ufbx, ignore unless you interpret `ufbx_props` directly!
1487 // Use separate `"FieldOfViewX"` and `"FieldOfViewY"` as horizontal/vertical FOV angles
1489 // Use `"FieldOfView"` as horizontal FOV angle, derive vertical angle via aspect ratio
1491 // Use `"FieldOfView"` as vertical FOV angle, derive horizontal angle via aspect ratio
1493 // Compute the field of view from the render gate size and focal length
1495
1496 UFBX_ENUM_FORCE_WIDTH(UFBX_APERTURE_MODE)
1498
1500
1501// Method of specifying the render gate size from properties
1502// NOTE: Handled internally by ufbx, ignore unless you interpret `ufbx_props` directly!
1503typedef enum ufbx_gate_fit UFBX_ENUM_REPR {
1504 // Use the film/aperture size directly as the render gate
1506 // Fit the render gate to the height of the film, derive width from aspect ratio
1508 // Fit the render gate to the width of the film, derive height from aspect ratio
1510 // Fit the render gate so that it is fully contained within the film gate
1512 // Fit the render gate so that it fully contains the film gate
1514 // Stretch the render gate to match the film gate
1515 // TODO: Does this differ from `UFBX_GATE_FIT_NONE`?
1517
1518 UFBX_ENUM_FORCE_WIDTH(UFBX_GATE_FIT)
1520
1522
1523// Camera film/aperture size defaults
1524// NOTE: Handled internally by ufbx, ignore unless you interpret `ufbx_props` directly!
1526 UFBX_APERTURE_FORMAT_CUSTOM, // < Use `"FilmWidth"` and `"FilmHeight"`
1527 UFBX_APERTURE_FORMAT_16MM_THEATRICAL, // < 0.404 x 0.295 inches
1528 UFBX_APERTURE_FORMAT_SUPER_16MM, // < 0.493 x 0.292 inches
1529 UFBX_APERTURE_FORMAT_35MM_ACADEMY, // < 0.864 x 0.630 inches
1533 UFBX_APERTURE_FORMAT_35MM_ANAMORPHIC, // < 0.864 x 0.732 inches (squeeze ratio: 2)
1534 UFBX_APERTURE_FORMAT_70MM_PROJECTION, // < 2.066 x 0.906 inches
1535 UFBX_APERTURE_FORMAT_VISTAVISION, // < 1.485 x 0.991 inches
1536 UFBX_APERTURE_FORMAT_DYNAVISION, // < 2.080 x 1.480 inches
1537 UFBX_APERTURE_FORMAT_IMAX, // < 2.772 x 2.072 inches
1538
1539 UFBX_ENUM_FORCE_WIDTH(UFBX_APERTURE_FORMAT)
1541
1543
1552
1553 UFBX_ENUM_FORCE_WIDTH(UFBX_COORDINATE_AXIS)
1555
1557
1558// Coordinate axes the scene is represented in.
1559// NOTE: `front` is the _opposite_ from forward!
1565
1566// Camera attached to a `ufbx_node`
1568 union { ufbx_element element; struct {
1571 uint32_t element_id;
1572 uint32_t typed_id;
1573 ufbx_node_list instances;
1574 }; };
1575
1576 // Projection mode (perspective/orthographic).
1578
1579 // If set to `true`, `resolution` represents actual pixel values, otherwise
1580 // it's only useful for its aspect ratio.
1582
1583 // Render resolution, either in pixels or arbitrary units, depending on above
1585
1586 // Horizontal/vertical field of view in degrees
1587 // Valid if `projection_mode == UFBX_PROJECTION_MODE_PERSPECTIVE`.
1589
1590 // Component-wise `tan(field_of_view_deg)`, also represents the size of the
1591 // frustum slice at distance of 1.
1592 // Valid if `projection_mode == UFBX_PROJECTION_MODE_PERSPECTIVE`.
1594
1595 // Orthographic camera extents.
1596 // Valid if `projection_mode == UFBX_PROJECTION_MODE_ORTHOGRAPHIC`.
1598
1599 // Orthographic camera size.
1600 // Valid if `projection_mode == UFBX_PROJECTION_MODE_ORTHOGRAPHIC`.
1602
1603 // Size of the projection plane at distance 1.
1604 // Equal to `field_of_view_tan` if perspective, `orthographic_size` if orthographic.
1606
1607 // Aspect ratio of the camera.
1609
1610 // Near plane of the frustum in units from the camera.
1612
1613 // Far plane of the frustum in units from the camera.
1615
1616 // Coordinate system that the projection uses.
1617 // FBX saves cameras with +X forward and +Y up, but you can override this using
1618 // `ufbx_load_opts.target_camera_axes` and it will be reflected here.
1620
1621 // Advanced properties used to compute the above
1626 ufbx_real focal_length_mm; // < Focal length in millimeters
1627 ufbx_vec2 film_size_inch; // < Film size in inches
1628 ufbx_vec2 aperture_size_inch; // < Aperture/film gate size in inches
1629 ufbx_real squeeze_ratio; // < Anamoprhic stretch ratio
1630};
1631
1632// Bone attached to a `ufbx_node`, provides the logical length of the bone
1633// but most interesting information is directly in `ufbx_node`.
1634// NOTE: The FBX format calls these Skeleton node attributes.
1636 union { ufbx_element element; struct {
1639 uint32_t element_id;
1640 uint32_t typed_id;
1641 ufbx_node_list instances;
1642 }; };
1643
1644 // Visual radius of the bone
1646
1647 // Length of the bone relative to the distance between two nodes
1649
1650 // Is the bone a root bone
1652};
1653
1654// Empty/NULL/locator connected to a node, actual details in `ufbx_node`
1655// NOTE: The FBX format calls these Null node attributes.
1657 union { ufbx_element element; struct {
1660 uint32_t element_id;
1661 uint32_t typed_id;
1662 ufbx_node_list instances;
1663 }; };
1664};
1665
1666// -- Node attributes (curves/surfaces)
1667
1668// Segment of a `ufbx_line_curve`, indices refer to `ufbx_line_curve.point_indices[]`
1673
1674UFBX_LIST_TYPE(ufbx_line_segment_list, ufbx_line_segment);
1675
1677 union { ufbx_element element; struct {
1680 uint32_t element_id;
1681 uint32_t typed_id;
1682 ufbx_node_list instances;
1683 }; };
1684
1686
1687 ufbx_vec3_list control_points; // < List of possible values the line passes through
1688 ufbx_uint32_list point_indices; // < Indices to `control_points[]` the line goes through
1689
1690 ufbx_line_segment_list segments;
1691
1692 // Tessellation (result)
1694};
1695
1697 // The endpoints are not connected.
1699 // Repeats first `ufbx_nurbs_basis.order - 1` control points after the end.
1701 // Repeats the first control point after the end.
1703
1704 UFBX_ENUM_FORCE_WIDTH(UFBX_NURBS_TOPOLOGY)
1706
1708
1709// NURBS basis functions for an axis
1710typedef struct ufbx_nurbs_basis {
1711
1712 // Number of control points influencing a point on the curve/surface.
1713 // Equal to the degree plus one.
1714 uint32_t order;
1715
1716 // Topology (periodicity) of the dimension.
1718
1719 // Subdivision of the parameter range to control points.
1720 ufbx_real_list knot_vector;
1721
1722 // Range for the parameter value.
1725
1726 // Parameter values of control points.
1727 ufbx_real_list spans;
1728
1729 // `true` if this axis is two-dimensional.
1730 bool is_2d;
1731
1732 // Number of control points that need to be copied to the end.
1733 // This is just for convenience as it could be derived from `topology` and
1734 // `order`. If for example `num_wrap_control_points == 3` you should repeat
1735 // the first 3 control points after the end.
1736 // HINT: You don't need to worry about this if you use ufbx functions
1737 // like `ufbx_evaluate_nurbs_curve()` as they handle this internally.
1739
1740 // `true` if the parametrization is well defined.
1741 bool valid;
1742
1744
1746 union { ufbx_element element; struct {
1749 uint32_t element_id;
1750 uint32_t typed_id;
1751 ufbx_node_list instances;
1752 }; };
1753
1754 // Basis in the U axis
1756
1757 // Linear array of control points
1758 // NOTE: The control points are _not_ homogeneous, meaning you have to multiply
1759 // them by `w` before evaluating the surface.
1760 ufbx_vec4_list control_points;
1761};
1762
1764 union { ufbx_element element; struct {
1767 uint32_t element_id;
1768 uint32_t typed_id;
1769 ufbx_node_list instances;
1770 }; };
1771
1772 // Basis in the U/V axes
1775
1776 // Number of control points for the U/V axes
1779
1780 // 2D array of control points.
1781 // Memory layout: `V * num_control_points_u + U`
1782 // NOTE: The control points are _not_ homogeneous, meaning you have to multiply
1783 // them by `w` before evaluating the surface.
1784 ufbx_vec4_list control_points;
1785
1786 // How many segments tessellate each span in `ufbx_nurbs_basis.spans`.
1789
1790 // If `true` the resulting normals should be flipped when evaluated.
1792
1793 // Material for the whole surface.
1794 // NOTE: May be `NULL`!
1796};
1797
1799 union { ufbx_element element; struct {
1802 uint32_t element_id;
1803 uint32_t typed_id;
1804 ufbx_node_list instances;
1805 }; };
1806};
1807
1809 union { ufbx_element element; struct {
1812 uint32_t element_id;
1813 uint32_t typed_id;
1814 ufbx_node_list instances;
1815 }; };
1816};
1817
1818// -- Node attributes (advanced)
1819
1821 union { ufbx_element element; struct {
1824 uint32_t element_id;
1825 uint32_t typed_id;
1826 ufbx_node_list instances;
1827 }; };
1828};
1829
1842
1844 union { ufbx_element element; struct {
1847 uint32_t element_id;
1848 uint32_t typed_id;
1849 ufbx_node_list instances;
1850 }; };
1851};
1852
1853typedef enum ufbx_marker_type UFBX_ENUM_REPR {
1854 UFBX_MARKER_UNKNOWN, // < Unknown marker type
1855 UFBX_MARKER_FK_EFFECTOR, // < FK (Forward Kinematics) effector
1856 UFBX_MARKER_IK_EFFECTOR, // < IK (Inverse Kinematics) effector
1857
1858 UFBX_ENUM_FORCE_WIDTH(UFBX_MARKER_TYPE)
1860
1862
1863// Tracking marker for effectors
1865 union { ufbx_element element; struct {
1868 uint32_t element_id;
1869 uint32_t typed_id;
1870 ufbx_node_list instances;
1871 }; };
1872
1873 // Type of the marker
1875};
1876
1877// LOD level display mode.
1878typedef enum ufbx_lod_display UFBX_ENUM_REPR {
1879 UFBX_LOD_DISPLAY_USE_LOD, // < Display the LOD level if the distance is appropriate.
1880 UFBX_LOD_DISPLAY_SHOW, // < Always display the LOD level.
1881 UFBX_LOD_DISPLAY_HIDE, // < Never display the LOD level.
1882
1883 UFBX_ENUM_FORCE_WIDTH(UFBX_LOD_DISPLAY)
1885
1887
1888// Single LOD level within an LOD group.
1889// Specifies properties of the Nth child of the _node_ containing the LOD group.
1890typedef struct ufbx_lod_level {
1891
1892 // Minimum distance to show this LOD level.
1893 // NOTE: In world units by default, or in screen percentage if
1894 // `ufbx_lod_group.relative_distances` is set.
1896
1897 // LOD display mode.
1898 // NOTE: Mostly for editing, you should probably ignore this
1899 // unless making a modeling program.
1901
1903
1904UFBX_LIST_TYPE(ufbx_lod_level_list, ufbx_lod_level);
1905
1906// Group of LOD (Level of Detail) levels for an object.
1907// The actual LOD models are defined in the parent `ufbx_node.children`.
1909 union { ufbx_element element; struct {
1912 uint32_t element_id;
1913 uint32_t typed_id;
1914 ufbx_node_list instances;
1915 }; };
1916
1917 // If set to `true`, `ufbx_lod_level.distance` represents a screen size percentage.
1919
1920 // LOD levels matching in order to `ufbx_node.children`.
1921 ufbx_lod_level_list lod_levels;
1922
1923 // If set to `true` don't account for parent transform when computing the distance.
1925
1926 // If `use_distance_limit` is enabled hide the group if the distance is not between
1927 // `distance_limit_min` and `distance_limit_max`.
1931};
1932
1933// -- Deformers
1934
1935// Method to evaluate the skinning on a per-vertex level
1937 // Linear blend skinning: Blend transformation matrices by vertex weights
1939 // One vertex should have only one bone attached
1941 // Convert the transformations to dual quaternions and blend in that space
1943 // Blend between `UFBX_SKINNING_METHOD_LINEAR` and `UFBX_SKINNING_METHOD_BLENDED_DQ_LINEAR`
1944 // The blend weight can be found either per-vertex in `ufbx_skin_vertex.dq_weight`
1945 // or in `ufbx_skin_deformer.dq_vertices/dq_weights` (indexed by vertex).
1947
1948 UFBX_ENUM_FORCE_WIDTH(UFBX_SKINNING_METHOD)
1950
1952
1953// Skin weight information for a single mesh vertex
1954typedef struct ufbx_skin_vertex {
1955
1956 // Each vertex is influenced by weights from `ufbx_skin_deformer.weights[]`
1957 // The weights are sorted by decreasing weight so you can take the first N
1958 // weights to get a cheaper approximation of the vertex.
1959 // NOTE: The weights are not guaranteed to be normalized!
1960 uint32_t weight_begin; // < Index to start from in the `weights[]` array
1961 uint32_t num_weights; // < Number of weights influencing the vertex
1962
1963 // Blend weight between Linear Blend Skinning (0.0) and Dual Quaternion (1.0).
1964 // Should be used if `skinning_method == UFBX_SKINNING_METHOD_BLENDED_DQ_LINEAR`
1966
1968
1969UFBX_LIST_TYPE(ufbx_skin_vertex_list, ufbx_skin_vertex);
1970
1971// Single per-vertex per-cluster weight, see `ufbx_skin_vertex`
1972typedef struct ufbx_skin_weight {
1973 uint32_t cluster_index; // < Index into `ufbx_skin_deformer.clusters[]`
1974 ufbx_real weight; // < Amount this bone influence the vertex
1976
1977UFBX_LIST_TYPE(ufbx_skin_weight_list, ufbx_skin_weight);
1978
1979// Skin deformer specifies a binding between a logical set of bones (a skeleton)
1980// and a mesh. Each bone is represented by a `ufbx_skin_cluster` that contains
1981// the binding matrix and a `ufbx_node *bone` that has the current transformation.
1983 union { ufbx_element element; struct {
1986 uint32_t element_id;
1987 uint32_t typed_id;
1988 }; };
1989
1991
1992 // Clusters (bones) in the skin
1993 ufbx_skin_cluster_list clusters;
1994
1995 // Per-vertex weight information
1996 ufbx_skin_vertex_list vertices;
1997 ufbx_skin_weight_list weights;
1998
1999 // Largest amount of weights a single vertex can have
2001
2002 // Blend weights between Linear Blend Skinning (0.0) and Dual Quaternion (1.0).
2003 // HINT: You probably want to use `vertices` and `ufbx_skin_vertex.dq_weight` instead!
2004 // NOTE: These may be out-of-bounds for a given mesh, `vertices` is always safe.
2006 ufbx_uint32_list dq_vertices;
2007 ufbx_real_list dq_weights;
2008};
2009
2010// Cluster of vertices bound to a single bone.
2012 union { ufbx_element element; struct {
2015 uint32_t element_id;
2016 uint32_t typed_id;
2017 }; };
2018
2019 // The bone node the cluster is attached to
2020 // NOTE: Always valid if found from `ufbx_skin_deformer.clusters[]` unless
2021 // `ufbx_load_opts.connect_broken_elements` is `true`.
2023
2024 // Binding matrix from local mesh vertices to the bone
2026
2027 // Binding matrix from local mesh _node_ to the bone.
2028 // NOTE: Prefer `geometry_to_bone` in most use cases!
2030
2031 // Matrix that specifies the rest/bind pose transform of the node,
2032 // not generally needed for skinning, use `geometry_to_bone` instead.
2034
2035 // Precomputed matrix/transform that accounts for the current bone transform
2036 // ie. `ufbx_matrix_mul(&cluster->bone->node_to_world, &cluster->geometry_to_bone)`
2039
2040 // Raw weights indexed by each _vertex_ of a mesh (not index!)
2041 // HINT: It may be simpler to use `ufbx_skin_deformer.vertices[]/weights[]` instead!
2042 // NOTE: These may be out-of-bounds for a given mesh, `ufbx_skin_deformer.vertices` is always safe.
2043 size_t num_weights; // < Number of vertices in the cluster
2044 ufbx_uint32_list vertices; // < Vertex indices in `ufbx_mesh.vertices[]`
2045 ufbx_real_list weights; // < Per-vertex weight values
2046};
2047
2048// Blend shape deformer can contain multiple channels (think of sliders between morphs)
2049// that may optionally have in-between keyframes.
2051 union { ufbx_element element; struct {
2054 uint32_t element_id;
2055 uint32_t typed_id;
2056 }; };
2057
2058 // Independent morph targets of the deformer.
2059 ufbx_blend_channel_list channels;
2060};
2061
2062// Blend shape associated with a target weight in a series of morphs
2063typedef struct ufbx_blend_keyframe {
2064 // The target blend shape offsets.
2066
2067 // Weight value at which to apply the keyframe at full strength
2069
2070 // The weight the shape should be currently applied with
2073
2074UFBX_LIST_TYPE(ufbx_blend_keyframe_list, ufbx_blend_keyframe);
2075
2076// Blend channel consists of multiple morph-key targets that are interpolated.
2077// In simple cases there will be only one keyframe that is the target shape.
2079 union { ufbx_element element; struct {
2082 uint32_t element_id;
2083 uint32_t typed_id;
2084 }; };
2085
2086 // Current weight of the channel
2088
2089 // Key morph targets to blend between depending on `weight`
2090 // In usual cases there's only one target per channel
2091 ufbx_blend_keyframe_list keyframes;
2092
2093 // Final blend shape ignoring any intermediate blend shapes.
2095};
2096
2097// Blend shape target containing the actual vertex offsets
2099 union { ufbx_element element; struct {
2102 uint32_t element_id;
2103 uint32_t typed_id;
2104 }; };
2105
2106 // Vertex offsets to apply over the base mesh
2107 // NOTE: The `offset_vertices` may be out-of-bounds for a given mesh!
2108 size_t num_offsets; // < Number of vertex offsets in the following arrays
2109 ufbx_uint32_list offset_vertices; // < Indices to `ufbx_mesh.vertices[]`
2110 ufbx_vec3_list position_offsets; // < Always specified per-vertex offsets
2111 ufbx_vec3_list normal_offsets; // < Empty if not specified
2112
2113 // Optional weights for the offsets.
2114 // NOTE: These are technically not supported in FBX and are only written by Blender.
2115 ufbx_real_list offset_weights;
2116};
2117
2119 UFBX_CACHE_FILE_FORMAT_UNKNOWN, // < Unknown cache file format
2120 UFBX_CACHE_FILE_FORMAT_PC2, // < .pc2 Point cache file
2121 UFBX_CACHE_FILE_FORMAT_MC, // < .mc/.mcx Maya cache file
2122
2123 UFBX_ENUM_FORCE_WIDTH(UFBX_CACHE_FILE_FORMAT)
2125
2127
2129 UFBX_CACHE_DATA_FORMAT_UNKNOWN, // < Unknown data format
2131 UFBX_CACHE_DATA_FORMAT_VEC3_FLOAT, // < `struct { float x, y, z; } data[]`
2133 UFBX_CACHE_DATA_FORMAT_VEC3_DOUBLE, // < `struct { double x, y, z; } data[]`
2134
2135 UFBX_ENUM_FORCE_WIDTH(UFBX_CACHE_DATA_FORMAT)
2137
2139
2141 UFBX_CACHE_DATA_ENCODING_UNKNOWN, // < Unknown data encoding
2142 UFBX_CACHE_DATA_ENCODING_LITTLE_ENDIAN, // < Contiguous little-endian array
2143 UFBX_CACHE_DATA_ENCODING_BIG_ENDIAN, // < Contiguous big-endian array
2144
2145 UFBX_ENUM_FORCE_WIDTH(UFBX_CACHE_DATA_ENCODING)
2147
2149
2150// Known interpretations of geometry cache data.
2152 // Unknown interpretation, see `ufbx_cache_channel.interpretation_name` for more information.
2154
2155 // Generic "points" interpretation, FBX SDK default. Usually fine to interpret
2156 // as vertex positions if no other cache channels are specified.
2158
2159 // Vertex positions.
2161
2162 // Vertex normals.
2164
2165 UFBX_ENUM_FORCE_WIDTH(UFBX_CACHE_INTERPRETATION)
2167
2169
2170typedef struct ufbx_cache_frame {
2171
2172 // Name of the channel this frame belongs to.
2174
2175 // Time of this frame in seconds.
2176 double time;
2177
2178 // Name of the file containing the data.
2179 // The specified file may contain multiple frames, use `data_offset` etc. to
2180 // read at the right position.
2182
2183 // Format of the wrapper file.
2185
2186 // Axis to mirror the read data by.
2188
2189 // Factor to scale the geometry by.
2191
2192 ufbx_cache_data_format data_format; // < Format of the data in the file
2193 ufbx_cache_data_encoding data_encoding; // < Binary encoding of the data
2194 uint64_t data_offset; // < Byte offset into the file
2195 uint32_t data_count; // < Number of data elements
2196 uint32_t data_element_bytes; // < Size of a single data element in bytes
2197 uint64_t data_total_bytes; // < Size of the whole data blob in bytes
2199
2200UFBX_LIST_TYPE(ufbx_cache_frame_list, ufbx_cache_frame);
2201
2202typedef struct ufbx_cache_channel {
2203
2204 // Name of the geometry cache channel.
2206
2207 // What does the data in this channel represent.
2209
2210 // Source name for `interpretation`, especially useful if `interpretation` is
2211 // `UFBX_CACHE_INTERPRETATION_UNKNOWN`.
2213
2214 // List of frames belonging to this channel.
2215 // Sorted by time (`ufbx_cache_frame.time`).
2216 ufbx_cache_frame_list frames;
2217
2218 // Axis to mirror the frames by.
2220
2221 // Factor to scale the geometry by.
2223
2225
2226UFBX_LIST_TYPE(ufbx_cache_channel_list, ufbx_cache_channel);
2227
2228typedef struct ufbx_geometry_cache {
2230 ufbx_cache_channel_list channels;
2231 ufbx_cache_frame_list frames;
2232 ufbx_string_list extra_info;
2234
2250
2252 union { ufbx_element element; struct {
2255 uint32_t element_id;
2256 uint32_t typed_id;
2257 }; };
2258
2259 // Filename relative to the currently loaded file.
2260 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2261 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2263 // Absolute filename specified in the file.
2265 // Relative filename specified in the file.
2266 // NOTE: May be absolute if the file is saved in a different drive.
2268
2269 // Filename relative to the loaded file, non-UTF-8 encoded.
2270 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2271 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2273 // Absolute filename specified in the file, non-UTF-8 encoded.
2275 // Relative filename specified in the file, non-UTF-8 encoded.
2276 // NOTE: May be absolute if the file is saved in a different drive.
2278
2280
2281 // Only valid if `ufbx_load_opts.load_external_files` is set!
2283};
2284
2285// -- Materials
2286
2287// Material property, either specified with a constant value or a mapped texture
2288typedef struct ufbx_material_map {
2289
2290 // Constant value or factor for the map.
2291 // May be specified simultaneously with a texture, in this case most shading models
2292 // use multiplicative tinting of the texture values.
2293 union {
2298 };
2299 int64_t value_int;
2300
2301 // Texture if connected, otherwise `NULL`.
2302 // May be valid but "disabled" (application specific) if `texture_enabled == false`.
2304
2305 // `true` if the file has specified any of the values above.
2306 // NOTE: The value may be set to a non-zero default even if `has_value == false`,
2307 // for example missing factors are set to `1.0` if a color is defined.
2309
2310 // Controls whether shading should use `texture`.
2311 // NOTE: Some shading models allow this to be `true` even if `texture == NULL`.
2313
2314 // Set to `true` if this feature should be disabled (specific to shader type).
2316
2317 // Number of components in the value from 1 to 4 if defined, 0 if not.
2319
2321
2322// Material feature
2324
2325 // Whether the material model uses this feature or not.
2326 // NOTE: The feature can be enabled but still not used if eg. the corresponding factor is at zero!
2328
2329 // Explicitly enabled/disabled by the material.
2331
2333
2334// Texture attached to an FBX property
2336 ufbx_string material_prop; // < Name of the property in `ufbx_material.props`
2337 ufbx_string shader_prop; // < Shader-specific property mapping name
2338
2339 // Texture attached to the property.
2341
2343
2344UFBX_LIST_TYPE(ufbx_material_texture_list, ufbx_material_texture);
2345
2346// Shading model type
2347typedef enum ufbx_shader_type UFBX_ENUM_REPR {
2348 // Unknown shading model
2350 // FBX builtin diffuse material
2352 // FBX builtin diffuse+specular material
2354 // Open Shading Language standard surface
2355 // https://github.com/Autodesk/standard-surface
2357 // Arnold standard surface
2358 // https://docs.arnoldrenderer.com/display/A5AFMUG/Standard+Surface
2360 // 3ds Max Physical Material
2361 // https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2022/ENU/3DSMax-Lighting-Shading/files/GUID-C1328905-7783-4917-AB86-FC3CC19E8972-htm.html
2363 // 3ds Max PBR (Metal/Rough) material
2364 // https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2021/ENU/3DSMax-Lighting-Shading/files/GUID-A16234A5-6500-4662-8B20-A5EC9FE1B255-htm.html
2366 // 3ds Max PBR (Spec/Gloss) material
2367 // https://knowledge.autodesk.com/support/3ds-max/learn-explore/caas/CloudHelp/cloudhelp/2021/ENU/3DSMax-Lighting-Shading/files/GUID-18087194-B2A6-43EF-9B80-8FD1736FAE52-htm.html
2369 // 3ds glTF Material
2370 // https://help.autodesk.com/view/3DSMAX/2023/ENU/?guid=GUID-7ABFB805-1D9F-417E-9C22-704BFDF160FA
2372 // 3ds OpenPBR Material
2373 // https://help.autodesk.com/view/3DSMAX/2025/ENU/?guid=GUID-CD90329C-1E2B-4BBA-9285-3BB46253B9C2
2375 // Stingray ShaderFX shader graph.
2376 // Contains a serialized `"ShaderGraph"` in `ufbx_props`.
2378 // Variation of the FBX phong shader that can recover PBR properties like
2379 // `metalness` or `roughness` from the FBX non-physical values.
2380 // NOTE: Enable `ufbx_load_opts.use_blender_pbr_material`.
2382 // Wavefront .mtl format shader (used by .obj files)
2384
2385 UFBX_ENUM_FORCE_WIDTH(UFBX_SHADER_TYPE)
2387
2389
2390// FBX builtin material properties, matches maps in `ufbx_material_fbx_maps`
2412
2413 UFBX_ENUM_FORCE_WIDTH(UFBX_MATERIAL_FBX_MAP)
2415
2417
2418// Known PBR material properties, matches maps in `ufbx_material_pbr_maps`
2476
2477 UFBX_ENUM_FORCE_WIDTH(UFBX_MATERIAL_PBR_MAP)
2479
2481
2482// Known material features
2507
2508 UFBX_ENUM_FORCE_WIDTH(UFBX_MATERIAL_FEATURE)
2510
2512
2540
2542 union {
2543 ufbx_material_map maps[UFBX_MATERIAL_PBR_MAP_COUNT];
2544 struct {
2601 };
2602 };
2604
2635
2636// Surface material properties such as color, roughness, etc. Each property may
2637// be optionally bound to an `ufbx_texture`.
2639 union { ufbx_element element; struct {
2642 uint32_t element_id;
2643 uint32_t typed_id;
2644 }; };
2645
2646 // FBX builtin properties
2647 // NOTE: These may be empty if the material is using a custom shader
2649
2650 // PBR material properties, defined for all shading models but may be
2651 // somewhat approximate if `shader == NULL`.
2653
2654 // Material features, primarily applies to `pbr`.
2656
2657 // Shading information
2658 ufbx_shader_type shader_type; // < Always defined
2659 ufbx_nullable ufbx_shader *shader; // < Optional extended shader information
2660 ufbx_string shading_model_name; // < Often one of `{ "lambert", "phong", "unknown" }`
2661
2662 // Prefix before shader property names with trailing `|`.
2663 // For example `"3dsMax|Parameters|"` where properties would have names like
2664 // `"3dsMax|Parameters|base_color"`. You can ignore this if you use the built-in
2665 // `ufbx_material_fbx_maps fbx` and `ufbx_material_pbr_maps pbr` structures.
2667
2668 // All textures attached to the material, if you want specific maps if might be
2669 // more convenient to use eg. `fbx.diffuse_color.texture` or `pbr.base_color.texture`
2670 ufbx_material_texture_list textures; // < Sorted by `material_prop`
2671};
2672
2673typedef enum ufbx_texture_type UFBX_ENUM_REPR {
2674
2675 // Texture associated with an image file/sequence. `texture->filename` and
2676 // and `texture->relative_filename` contain the texture's path. If the file
2677 // has embedded content `texture->content` may hold `texture->content_size`
2678 // bytes of raw image data.
2680
2681 // The texture consists of multiple texture layers blended together.
2683
2684 // Reserved as these _should_ exist in FBX files.
2686
2687 // Node in a shader graph.
2688 // Use `ufbx_texture.shader` for more information.
2690
2691 UFBX_ENUM_FORCE_WIDTH(UFBX_TEXTURE_TYPE)
2693
2695
2696// Blend modes to combine layered textures with, compatible with common blend
2697// mode definitions in many art programs. Simpler blend modes have equations
2698// specified below where `src` is the layer to composite over `dst`.
2699// See eg. https://www.w3.org/TR/2013/WD-compositing-1-20131010/#blendingseparable
2700typedef enum ufbx_blend_mode UFBX_ENUM_REPR {
2701 UFBX_BLEND_TRANSLUCENT, // < `src` effects result alpha
2702 UFBX_BLEND_ADDITIVE, // < `src + dst`
2703 UFBX_BLEND_MULTIPLY, // < `src * dst`
2704 UFBX_BLEND_MULTIPLY_2X, // < `2 * src * dst`
2705 UFBX_BLEND_OVER, // < `src * src_alpha + dst * (1-src_alpha)`
2706 UFBX_BLEND_REPLACE, // < `src` Replace the contents
2707 UFBX_BLEND_DISSOLVE, // < `random() + src_alpha >= 1.0 ? src : dst`
2708 UFBX_BLEND_DARKEN, // < `min(src, dst)`
2709 UFBX_BLEND_COLOR_BURN, // < `src > 0 ? 1 - min(1, (1-dst) / src) : 0`
2710 UFBX_BLEND_LINEAR_BURN, // < `src + dst - 1`
2711 UFBX_BLEND_DARKER_COLOR, // < `value(src) < value(dst) ? src : dst`
2712 UFBX_BLEND_LIGHTEN, // < `max(src, dst)`
2713 UFBX_BLEND_SCREEN, // < `1 - (1-src)*(1-dst)`
2714 UFBX_BLEND_COLOR_DODGE, // < `src < 1 ? dst / (1 - src)` : (dst>0?1:0)`
2715 UFBX_BLEND_LINEAR_DODGE, // < `src + dst`
2716 UFBX_BLEND_LIGHTER_COLOR, // < `value(src) > value(dst) ? src : dst`
2717 UFBX_BLEND_SOFT_LIGHT, // < https://www.w3.org/TR/2013/WD-compositing-1-20131010/#blendingsoftlight
2718 UFBX_BLEND_HARD_LIGHT, // < https://www.w3.org/TR/2013/WD-compositing-1-20131010/#blendinghardlight
2719 UFBX_BLEND_VIVID_LIGHT, // < Combination of `COLOR_DODGE` and `COLOR_BURN`
2720 UFBX_BLEND_LINEAR_LIGHT, // < Combination of `LINEAR_DODGE` and `LINEAR_BURN`
2721 UFBX_BLEND_PIN_LIGHT, // < Combination of `DARKEN` and `LIGHTEN`
2722 UFBX_BLEND_HARD_MIX, // < Produces primary colors depending on similarity
2723 UFBX_BLEND_DIFFERENCE, // < `abs(src - dst)`
2724 UFBX_BLEND_EXCLUSION, // < `dst + src - 2 * src * dst`
2725 UFBX_BLEND_SUBTRACT, // < `dst - src`
2726 UFBX_BLEND_DIVIDE, // < `dst / src`
2727 UFBX_BLEND_HUE, // < Replace hue
2728 UFBX_BLEND_SATURATION, // < Replace saturation
2729 UFBX_BLEND_COLOR, // < Replace hue and saturatio
2730 UFBX_BLEND_LUMINOSITY, // < Replace value
2731 UFBX_BLEND_OVERLAY, // < Same as `HARD_LIGHT` but with `src` and `dst` swapped
2732
2733 UFBX_ENUM_FORCE_WIDTH(UFBX_BLEND_MODE)
2735
2737
2738// Blend modes to combine layered textures with, compatible with common blend
2739typedef enum ufbx_wrap_mode UFBX_ENUM_REPR {
2740 UFBX_WRAP_REPEAT, // < Repeat the texture past the [0,1] range
2741 UFBX_WRAP_CLAMP, // < Clamp the normalized texture coordinates to [0,1]
2742
2743 UFBX_ENUM_FORCE_WIDTH(UFBX_WRAP_MODE)
2745
2747
2748// Single layer in a layered texture
2749typedef struct ufbx_texture_layer {
2750 ufbx_texture *texture; // < The inner texture to evaluate, never `NULL`
2751 ufbx_blend_mode blend_mode; // < Equation to combine the layer to the background
2752 ufbx_real alpha; // < Blend weight of this layer
2754
2755UFBX_LIST_TYPE(ufbx_texture_layer_list, ufbx_texture_layer);
2756
2759
2760 // Select an output of a multi-output shader.
2761 // HINT: If this type is used the `ufbx_shader_texture.main_texture` and
2762 // `ufbx_shader_texture.main_texture_output_index` fields are set.
2764
2765 // Open Shading Language (OSL) shader.
2766 // https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
2768
2769 UFBX_ENUM_FORCE_WIDTH(UFBX_SHADER_TEXTURE_TYPE)
2771
2773
2774// Input to a shader texture, see `ufbx_shader_texture`.
2776
2777 // Name of the input.
2779
2780 // Constant value of the input.
2781 union {
2786 };
2787 int64_t value_int;
2790
2791 // Texture connected to this input.
2793
2794 // Index of the output to use if `texture` is a multi-output shader node.
2796
2797 // Controls whether shading should use `texture`.
2798 // NOTE: Some shading models allow this to be `true` even if `texture == NULL`.
2800
2801 // Property representing this input.
2803
2804 // Property representing `texture`.
2806
2807 // Property representing `texture_enabled`.
2809
2811
2812UFBX_LIST_TYPE(ufbx_shader_texture_input_list, ufbx_shader_texture_input);
2813
2814// Texture that emulates a shader graph node.
2815// 3ds Max exports some materials as node graphs serialized to textures.
2816// ufbx can parse a small subset of these, as normal maps are often hidden behind
2817// some kind of bump node.
2818// NOTE: These encode a lot of details of 3ds Max internals, not recommended for direct use.
2819// HINT: `ufbx_texture.file_textures[]` contains a list of "real" textures that are connected
2820// to the `ufbx_texture` that is pretending to be a shader node.
2821typedef struct ufbx_shader_texture {
2822
2823 // Type of this shader node.
2825
2826 // Name of the shader to use.
2828
2829 // 64-bit opaque identifier for the shader type.
2831
2832 // Input values/textures (possibly further shader textures) to the shader.
2833 // Sorted by `ufbx_shader_texture_input.name`.
2834 ufbx_shader_texture_input_list inputs;
2835
2836 // Shader source code if found.
2839
2840 // Representative texture for this shader.
2841 // Only specified if `main_texture.outputs[main_texture_output_index]` is semantically
2842 // equivalent to this texture.
2844
2845 // Output index of `main_texture` if it is a multi-output shader.
2847
2848 // Prefix for properties related to this shader in `ufbx_texture`.
2849 // NOTE: Contains the trailing '|' if not empty.
2851
2853
2854// Unique texture within the file.
2855typedef struct ufbx_texture_file {
2856
2857 // Index in `ufbx_scene.texture_files[]`.
2858 uint32_t index;
2859
2860 // Paths to the resource.
2861
2862 // Filename relative to the currently loaded file.
2863 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2864 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2866 // Absolute filename specified in the file.
2868 // Relative filename specified in the file.
2869 // NOTE: May be absolute if the file is saved in a different drive.
2871
2872 // Filename relative to the loaded file, non-UTF-8 encoded.
2873 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2874 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2876 // Absolute filename specified in the file, non-UTF-8 encoded.
2878 // Relative filename specified in the file, non-UTF-8 encoded.
2879 // NOTE: May be absolute if the file is saved in a different drive.
2881
2882 // Optional embedded content blob, eg. raw .png format data
2884
2886
2887UFBX_LIST_TYPE(ufbx_texture_file_list, ufbx_texture_file);
2888
2889// Texture that controls material appearance
2891 union { ufbx_element element; struct {
2894 uint32_t element_id;
2895 uint32_t typed_id;
2896 }; };
2897
2898 // Texture type (file / layered / procedural / shader)
2900
2901 // FILE: Paths to the resource
2902
2903 // Filename relative to the currently loaded file.
2904 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2905 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2907 // Absolute filename specified in the file.
2909 // Relative filename specified in the file.
2910 // NOTE: May be absolute if the file is saved in a different drive.
2912
2913 // Filename relative to the loaded file, non-UTF-8 encoded.
2914 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2915 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2917 // Absolute filename specified in the file, non-UTF-8 encoded.
2919 // Relative filename specified in the file, non-UTF-8 encoded.
2920 // NOTE: May be absolute if the file is saved in a different drive.
2922
2923 // FILE: Optional embedded content blob, eg. raw .png format data
2925
2926 // FILE: Optional video texture
2928
2929 // FILE: Index into `ufbx_scene.texture_files[]` or `UFBX_NO_INDEX`.
2930 uint32_t file_index;
2931
2932 // FILE: True if `file_index` has a valid value.
2934
2935 // LAYERED: Inner texture layers, ordered from _bottom_ to _top_
2936 ufbx_texture_layer_list layers;
2937
2938 // SHADER: Shader information
2939 // NOTE: May be specified even if `type == UFBX_TEXTURE_FILE` if `ufbx_load_opts.disable_quirks`
2940 // is _not_ specified. Some known shaders that represent files are interpreted as `UFBX_TEXTURE_FILE`.
2942
2943 // List of file textures representing this texture.
2944 // Defined even if `type == UFBX_TEXTURE_FILE` in which case the array contains only itself.
2945 ufbx_texture_list file_textures;
2946
2947 // Name of the UV set to use
2949
2950 // Wrapping mode
2953
2954 // UV transform
2955 bool has_uv_transform; // < Has a non-identity `transform` and derived matrices.
2956 ufbx_transform uv_transform; // < Texture transformation in UV space
2957 ufbx_matrix texture_to_uv; // < Matrix representation of `transform`
2958 ufbx_matrix uv_to_texture; // < UV coordinate to normalized texture coordinate matrix
2959};
2960
2961// TODO: Video textures
2963 union { ufbx_element element; struct {
2966 uint32_t element_id;
2967 uint32_t typed_id;
2968 }; };
2969
2970 // Paths to the resource
2971
2972 // Filename relative to the currently loaded file.
2973 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2974 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2976 // Absolute filename specified in the file.
2978 // Relative filename specified in the file.
2979 // NOTE: May be absolute if the file is saved in a different drive.
2981
2982 // Filename relative to the loaded file, non-UTF-8 encoded.
2983 // HINT: If using functions other than `ufbx_load_file()`, you can provide
2984 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
2986 // Absolute filename specified in the file, non-UTF-8 encoded.
2988 // Relative filename specified in the file, non-UTF-8 encoded.
2989 // NOTE: May be absolute if the file is saved in a different drive.
2991
2992 // Optional embedded content blob
2994};
2995
2996// Shader specifies a shading model and contains `ufbx_shader_binding` elements
2997// that define how to interpret FBX properties in the shader.
2999 union { ufbx_element element; struct {
3002 uint32_t element_id;
3003 uint32_t typed_id;
3004 }; };
3005
3006 // Known shading model
3008
3009 // TODO: Expose actual properties here
3010
3011 // Bindings from FBX properties to the shader
3012 // HINT: `ufbx_find_shader_prop()` translates shader properties to FBX properties
3013 ufbx_shader_binding_list bindings;
3014};
3015
3016// Binding from a material property to shader implementation
3018 ufbx_string shader_prop; // < Property name used by the shader implementation
3019 ufbx_string material_prop; // < Property name inside `ufbx_material.props`
3021
3022UFBX_LIST_TYPE(ufbx_shader_prop_binding_list, ufbx_shader_prop_binding);
3023
3024// Shader binding table
3026 union { ufbx_element element; struct {
3029 uint32_t element_id;
3030 uint32_t typed_id;
3031 }; };
3032
3033 ufbx_shader_prop_binding_list prop_bindings; // < Sorted by `shader_prop`
3034};
3035
3036// -- Animation
3037
3048
3049UFBX_LIST_TYPE(ufbx_prop_override_list, ufbx_prop_override);
3050
3055
3056UFBX_LIST_TYPE(ufbx_transform_override_list, ufbx_transform_override);
3057
3058// Animation descriptor used for evaluating animation.
3059// Usually obtained from `ufbx_scene` via either global animation `ufbx_scene.anim`,
3060// per-stack animation `ufbx_anim_stack.anim` or per-layer animation `ufbx_anim_layer.anim`.
3061//
3062// For advanced usage you can use `ufbx_create_anim()` to create animation descriptors
3063// with custom layers, property overrides, special flags, etc.
3064typedef struct ufbx_anim {
3065
3066 // Time begin/end for the animation, both may be zero if absent.
3068 double time_end;
3069
3070 // List of layers in the animation.
3071 ufbx_anim_layer_list layers;
3072
3073 // Optional overrides for weights for each layer in `layers[]`.
3075
3076 // Sorted by `element_id, prop_name`
3077 ufbx_prop_override_list prop_overrides;
3078
3079 // Sorted by `node_id`
3080 ufbx_transform_override_list transform_overrides;
3081
3082 // Evaluate connected properties as if they would not be connected.
3084
3085 // Custom `ufbx_anim` created by `ufbx_create_anim()`.
3087
3089
3091 union { ufbx_element element; struct {
3094 uint32_t element_id;
3095 uint32_t typed_id;
3096 }; };
3097
3099 double time_end;
3100
3101 ufbx_anim_layer_list layers;
3103};
3104
3113
3114UFBX_LIST_TYPE(ufbx_anim_prop_list, ufbx_anim_prop);
3115
3117 union { ufbx_element element; struct {
3120 uint32_t element_id;
3121 uint32_t typed_id;
3122 }; };
3123
3130
3131 ufbx_anim_value_list anim_values;
3132 ufbx_anim_prop_list anim_props; // < Sorted by `element,prop_name`
3133
3135
3139};
3140
3152
3153// Animation curve segment interpolation mode between two keyframes
3155 UFBX_INTERPOLATION_CONSTANT_PREV, // < Hold previous key value
3156 UFBX_INTERPOLATION_CONSTANT_NEXT, // < Hold next key value
3157 UFBX_INTERPOLATION_LINEAR, // < Linear interpolation between two keys
3158 UFBX_INTERPOLATION_CUBIC, // < Cubic interpolation, see `ufbx_tangent`
3159
3160 UFBX_ENUM_FORCE_WIDTH(UFBX_INTERPOLATION)
3162
3164
3166 UFBX_EXTRAPOLATION_CONSTANT, // < Use the value of the first/last keyframe
3167 UFBX_EXTRAPOLATION_REPEAT, // < Repeat the whole animation curve
3168 UFBX_EXTRAPOLATION_MIRROR, // < Repeat with mirroring
3169 UFBX_EXTRAPOLATION_SLOPE, // < Use the tangent of the last keyframe to linearly extrapolate
3170 UFBX_EXTRAPOLATION_REPEAT_RELATIVE, // < Repeat the animation curve but connect the first and last keyframe values
3171
3172 UFBX_ENUM_FORCE_WIDTH(UFBX_EXTRAPOLATION)
3174
3176
3177typedef struct ufbx_extrapolation {
3179
3180 // Count used for repeating modes.
3181 // Negative values mean infinite repetition.
3184
3185// Tangent vector at a keyframe, may be split into left/right
3186typedef struct ufbx_tangent {
3187 float dx; // < Derivative in the time axis
3188 float dy; // < Derivative in the (curve specific) value axis
3190
3191// Single real `value` at a specified `time`, interpolation between two keyframes
3192// is determined by the `interpolation` field of the _previous_ key.
3193// If `interpolation == UFBX_INTERPOLATION_CUBIC` the span is evaluated as a
3194// cubic bezier curve through the following points:
3195//
3196// (prev->time, prev->value)
3197// (prev->time + prev->right.dx, prev->value + prev->right.dy)
3198// (next->time - next->left.dx, next->value - next->left.dy)
3199// (next->time, next->value)
3200//
3201// HINT: You can use `ufbx_evaluate_curve(ufbx_anim_curve *curve, double time)`
3202// rather than trying to manually handle all the interpolation modes.
3210
3211UFBX_LIST_TYPE(ufbx_keyframe_list, ufbx_keyframe);
3212
3214 union { ufbx_element element; struct {
3217 uint32_t element_id;
3218 uint32_t typed_id;
3219 }; };
3220
3221 // List of keyframes that define the curve.
3222 ufbx_keyframe_list keyframes;
3223
3224 // Extrapolation before the curve.
3226 // Extrapolation after the curve.
3228
3229 // Value range for all the keyframes.
3232
3233 // Time range for all the keyframes.
3234 double min_time;
3235 double max_time;
3236};
3237
3238// -- Collections
3239
3240// Collection of nodes to hide/freeze
3242 union { ufbx_element element; struct {
3245 uint32_t element_id;
3246 uint32_t typed_id;
3247 }; };
3248
3249 // Nodes included in the layer (exclusively at most one layer per node)
3250 ufbx_node_list nodes;
3251
3252 // Layer state
3253 bool visible; // < Contained nodes are visible
3254 bool frozen; // < Contained nodes cannot be edited
3255
3256 ufbx_vec3 ui_color; // < Visual color for UI
3257};
3258
3259// Named set of nodes/geometry features to select.
3261 union { ufbx_element element; struct {
3264 uint32_t element_id;
3265 uint32_t typed_id;
3266 }; };
3267
3268 // Included nodes and geometry features
3269 ufbx_selection_node_list nodes;
3270};
3271
3272// Selection state of a node, potentially contains vertex/edge/face selection as well.
3274 union { ufbx_element element; struct {
3277 uint32_t element_id;
3278 uint32_t typed_id;
3279 }; };
3280
3281 // Selection targets, possibly `NULL`
3284 bool include_node; // < Is `target_node` included in the selection
3285
3286 // Indices to selected components.
3287 // Guaranteed to be valid as per `ufbx_load_opts.index_error_handling`
3288 // if `target_mesh` is not `NULL`.
3289 ufbx_uint32_list vertices; // < Indices to `ufbx_mesh.vertices`
3290 ufbx_uint32_list edges; // < Indices to `ufbx_mesh.edges`
3291 ufbx_uint32_list faces; // < Indices to `ufbx_mesh.faces`
3292};
3293
3294// -- Constraints
3295
3297 union { ufbx_element element; struct {
3300 uint32_t element_id;
3301 uint32_t typed_id;
3302 }; };
3303};
3304
3305// Type of property constrain eg. position or look-at
3313 // Inverse kinematic chain to a single effector `ufbx_constraint.ik_effector`
3314 // `targets` optionally contains a list of pole targets!
3316
3317 UFBX_ENUM_FORCE_WIDTH(UFBX_CONSTRAINT_TYPE)
3319
3321
3322// Target to follow with a constraint
3324 ufbx_node *node; // < Target node reference
3325 ufbx_real weight; // < Relative weight to other targets (does not always sum to 1)
3326 ufbx_transform transform; // < Offset from the actual target
3328
3329UFBX_LIST_TYPE(ufbx_constraint_target_list, ufbx_constraint_target);
3330
3331// Method to determine the up vector in aim constraints
3333 UFBX_CONSTRAINT_AIM_UP_SCENE, // < Align the up vector to the scene global up vector
3334 UFBX_CONSTRAINT_AIM_UP_TO_NODE, // < Aim the up vector at `ufbx_constraint.aim_up_node`
3335 UFBX_CONSTRAINT_AIM_UP_ALIGN_NODE, // < Copy the up vector from `ufbx_constraint.aim_up_node`
3336 UFBX_CONSTRAINT_AIM_UP_VECTOR, // < Use `ufbx_constraint.aim_up_vector` as the up vector
3337 UFBX_CONSTRAINT_AIM_UP_NONE, // < Don't align the up vector to anything
3338
3339 UFBX_ENUM_FORCE_WIDTH(UFBX_CONSTRAINT_AIM_UP_TYPE)
3341
3343
3344// Method to determine the up vector in aim constraints
3346 UFBX_CONSTRAINT_IK_POLE_VECTOR, // < Use towards calculated from `ufbx_constraint.targets`
3347 UFBX_CONSTRAINT_IK_POLE_NODE, // < Use `ufbx_constraint.ik_pole_vector` directly
3348
3349 UFBX_ENUM_FORCE_WIDTH(UFBX_CONSTRAINT_IK_POLE_TYPE)
3351
3353
3355 union { ufbx_element element; struct {
3358 uint32_t element_id;
3359 uint32_t typed_id;
3360 }; };
3361
3362 // Type of constraint to use
3365
3366 // Node to be constrained
3368
3369 // List of weighted targets for the constraint (pole vectors for IK)
3370 ufbx_constraint_target_list targets;
3371
3372 // State of the constraint
3375
3376 // Translation/rotation/scale axes the constraint is applied to
3380
3381 // Offset from the constrained position
3383
3384 // AIM: Target and up vectors
3389
3390 // SINGLE_CHAIN_IK: Target for the IK, `targets` contains pole vectors!
3394};
3395
3396// -- Audio
3397
3399 union { ufbx_element element; struct {
3402 uint32_t element_id;
3403 uint32_t typed_id;
3404 }; };
3405
3406 // Clips contained in this layer.
3407 ufbx_audio_clip_list clips;
3408};
3409
3411 union { ufbx_element element; struct {
3414 uint32_t element_id;
3415 uint32_t typed_id;
3416 }; };
3417
3418 // Filename relative to the currently loaded file.
3419 // HINT: If using functions other than `ufbx_load_file()`, you can provide
3420 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
3422 // Absolute filename specified in the file.
3424 // Relative filename specified in the file.
3425 // NOTE: May be absolute if the file is saved in a different drive.
3427
3428 // Filename relative to the loaded file, non-UTF-8 encoded.
3429 // HINT: If using functions other than `ufbx_load_file()`, you can provide
3430 // `ufbx_load_opts.filename/raw_filename` to let ufbx resolve this.
3432 // Absolute filename specified in the file, non-UTF-8 encoded.
3434 // Relative filename specified in the file, non-UTF-8 encoded.
3435 // NOTE: May be absolute if the file is saved in a different drive.
3437
3438 // Optional embedded content blob, eg. raw .png format data
3440};
3441
3442// -- Miscellaneous
3443
3444typedef struct ufbx_bone_pose {
3445
3446 // Node to apply the pose to.
3448
3449 // Matrix from node local space to world space.
3451
3452 // Matrix from node local space to parent space.
3453 // NOTE: FBX only stores world transformations so this is approximated from
3454 // the parent world transform.
3456
3458
3459UFBX_LIST_TYPE(ufbx_bone_pose_list, ufbx_bone_pose);
3460
3462 union { ufbx_element element; struct {
3465 uint32_t element_id;
3466 uint32_t typed_id;
3467 }; };
3468
3469 // Set if this pose is marked as a bind pose.
3471
3472 // List of bone poses.
3473 // Sorted by `ufbx_node.typed_id`.
3474 ufbx_bone_pose_list bone_poses;
3475};
3476
3485
3486// -- Named elements
3487
3496
3497UFBX_LIST_TYPE(ufbx_name_element_list, ufbx_name_element);
3498
3499// -- Scene
3500
3501// Scene is the root object loaded by ufbx that everything is accessed from.
3502
3503typedef enum ufbx_exporter UFBX_ENUM_REPR {
3510
3511 UFBX_ENUM_FORCE_WIDTH(UFBX_EXPORTER)
3513
3515
3521
3522typedef enum ufbx_file_format UFBX_ENUM_REPR {
3523 UFBX_FILE_FORMAT_UNKNOWN, // < Unknown file format
3524 UFBX_FILE_FORMAT_FBX, // < .fbx Kaydara/Autodesk FBX file
3525 UFBX_FILE_FORMAT_OBJ, // < .obj Wavefront OBJ file
3526 UFBX_FILE_FORMAT_MTL, // < .mtl Wavefront MTL (Material template library) file
3527
3528 UFBX_ENUM_FORCE_WIDTH(UFBX_FILE_FORMAT)
3530
3532
3533typedef enum ufbx_warning_type UFBX_ENUM_REPR {
3534 // Missing external file file (for example .mtl for Wavefront .obj file or a
3535 // geometry cache)
3537
3538 // Loaded a Wavefront .mtl file derived from the filename instead of a proper
3539 // `mtllib` statement.
3541
3542 // Truncated array has been auto-expanded.
3544
3545 // Geometry data has been defined but has no data.
3547
3548 // Duplicated connection between two elements that shouldn't have.
3550
3551 // Vertex 'W' attribute length differs from main attribute.
3553
3554 // Missing polygon mapping type.
3556
3557 // Unsupported version, loaded but may be incorrect.
3558 // If the loading fails `UFBX_ERROR_UNSUPPORTED_VERSION` is issued instead.
3560
3561 // Out-of-bounds index has been clamped to be in-bounds.
3562 // HINT: You can use `ufbx_index_error_handling` to adjust behavior.
3564
3565 // Non-UTF8 encoded strings.
3566 // HINT: You can use `ufbx_unicode_error_handling` to adjust behavior.
3568
3569 // Invalid base64-encoded embedded content ignored.
3571
3572 // Non-node element connected to root.
3574
3575 // Duplicated object ID in the file, connections will be wrong.
3577
3578 // Empty face has been removed.
3579 // Use `ufbx_load_opts.allow_empty_faces` if you want to allow them.
3581
3582 // Unknown .obj file directive.
3584
3585 // Warnings after this one are deduplicated.
3586 // See `ufbx_warning.count` for how many times they happened.
3588
3589 UFBX_ENUM_FORCE_WIDTH(UFBX_WARNING_TYPE)
3591
3593
3594// Warning about a non-fatal issue in the file.
3595// Often contains information about issues that ufbx has corrected about the
3596// file but it might indicate something is not working properly.
3597typedef struct ufbx_warning {
3598 // Type of the warning.
3600 // Description of the warning.
3602 // The element related to this warning or `UFBX_NO_INDEX` if not related to a specific element.
3603 uint32_t element_id;
3604 // Number of times this warning was encountered.
3605 size_t count;
3607
3608UFBX_LIST_TYPE(ufbx_warning_list, ufbx_warning);
3609
3612 UFBX_THUMBNAIL_FORMAT_RGB_24, // < 8-bit RGB pixels, in memory R,G,B
3613 UFBX_THUMBNAIL_FORMAT_RGBA_32, // < 8-bit RGBA pixels, in memory R,G,B,A
3614
3615 UFBX_ENUM_FORCE_WIDTH(UFBX_THUMBNAIL_FORMAT)
3617
3619
3620// Specify how unit / coordinate system conversion should be performed.
3621// Affects how `ufbx_load_opts.target_axes` and `ufbx_load_opts.target_unit_meters` work,
3622// has no effect if neither is specified.
3624
3625 // Store the space conversion transform in the root node.
3626 // Sets `ufbx_node.local_transform` of the root node.
3628
3629 // Perform the conversion by using "adjust" transforms.
3630 // Compensates for the transforms using `ufbx_node.adjust_pre_rotation` and
3631 // `ufbx_node.adjust_pre_scale`. You don't need to account for these unless
3632 // you are manually building transforms from `ufbx_props`.
3634
3635 // Perform the conversion by scaling geometry in addition to adjusting transforms.
3636 // Compensates transforms like `UFBX_SPACE_CONVERSION_ADJUST_TRANSFORMS` but
3637 // applies scaling to geometry as well.
3639
3640 UFBX_ENUM_FORCE_WIDTH(UFBX_SPACE_CONVERSION)
3642
3644
3645// How to handle FBX node geometry transforms.
3646// FBX nodes can have "geometry transforms" that affect only the attached meshes,
3647// but not the children. This is not allowed in many scene representations so
3648// ufbx provides some ways to simplify them.
3649// Geometry transforms can also be used to transform any other attributes such
3650// as lights or cameras.
3652
3653 // Preserve the geometry transforms as-is.
3654 // To be correct for all files you have to use `ufbx_node.geometry_transform`,
3655 // `ufbx_node.geometry_to_node`, or `ufbx_node.geometry_to_world` to compensate
3656 // for any potential geometry transforms.
3658
3659 // Add helper nodes between the nodes and geometry where needed.
3660 // The created nodes have `ufbx_node.is_geometry_transform_helper` set and are
3661 // named `ufbx_load_opts.geometry_transform_helper_name`.
3663
3664 // Modify the geometry of meshes attached to nodes with geometry transforms.
3665 // Will add helper nodes like `UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES` if
3666 // necessary, for example if there are multiple instances of the same mesh with
3667 // geometry transforms.
3669
3670 // Modify the geometry of meshes attached to nodes with geometry transforms.
3671 // NOTE: This will not work correctly for instanced geometry.
3673
3674 UFBX_ENUM_FORCE_WIDTH(UFBX_GEOMETRY_TRANSFORM_HANDLING)
3676
3678
3679// How to handle FBX transform inherit modes.
3681
3682 // Preserve inherit mode in `ufbx_node.inherit_mode`.
3683 // NOTE: To correctly handle all scenes you would need to handle the
3684 // non-standard inherit modes.
3686
3687 // Create scale helper nodes parented to nodes that need special inheritance.
3688 // Scale helper nodes will have `ufbx_node.is_scale_helper` and parents of
3689 // scale helpers will have `ufbx_node.scale_helper` pointing to it.
3691
3692 // Attempt to compensate for bone scale by inversely scaling children.
3693 // NOTE: This only works for uniform non-animated scaling, if scale is
3694 // non-uniform or animated, ufbx will add scale helpers in the same way
3695 // as `UFBX_INHERIT_MODE_HANDLING_HELPER_NODES`.
3697
3698 // Attempt to compensate for bone scale by inversely scaling children.
3699 // Will never create helper nodes.
3701
3702 // Ignore non-standard inheritance modes.
3703 // Forces all nodes to have `UFBX_INHERIT_MODE_NORMAL` regardless of the
3704 // inherit mode specified in the file. This can be useful for emulating
3705 // results from importers/programs that don't support inherit modes.
3707
3708 UFBX_ENUM_FORCE_WIDTH(UFBX_INHERIT_MODE_HANDLING)
3710
3712
3713// How to handle FBX transform pivots.
3715
3716 // Take pivots into account when computing the transform.
3718
3719 // Translate objects to be located at their pivot.
3720 // NOTE: Only applied if rotation and scaling pivots are equal.
3721 // NOTE: Results in geometric translation. Use `ufbx_geometry_transform_handling`
3722 // to interpret these in a standard scene graph.
3724
3725 // Translate objects to be located at their rotation pivot.
3726 // NOTE: Results in geometric translation. Use `ufbx_geometry_transform_handling`
3727 // to interpret these in a standard scene graph.
3728 // NOTE: By default the original transforms of empties are not retained when using this,
3729 // use `ufbx_load_opts.pivot_handling_retain_empties` to prevent adjusting these pivots.
3731
3732 UFBX_ENUM_FORCE_WIDTH(UFBX_PIVOT_HANDLING)
3734
3736
3737// Embedded thumbnail in the file, valid if the dimensions are non-zero.
3738typedef struct ufbx_thumbnail {
3740
3741 // Extents of the thumbnail
3742 uint32_t width;
3743 uint32_t height;
3744
3745 // Format of `ufbx_thumbnail.data`.
3747
3748 // Thumbnail pixel data, layout as contiguous rows from bottom to top.
3749 // See `ufbx_thumbnail.format` for the pixel format.
3752
3753// Miscellaneous data related to the loaded file
3754typedef struct ufbx_metadata {
3755
3756 // List of non-fatal warnings about the file.
3757 // If you need to only check whether a specific warning was triggered you
3758 // can use `ufbx_metadata.has_warning[]`.
3759 ufbx_warning_list warnings;
3760
3761 // FBX ASCII file format.
3762 bool ascii;
3763
3764 // FBX version in integer format, eg. 7400 for 7.4.
3765 uint32_t version;
3766
3767 // File format of the source file.
3769
3770 // Index arrays may contain `UFBX_NO_INDEX` instead of a valid index
3771 // to indicate gaps.
3773
3774 // May contain meshes with no defined vertex position.
3775 // NOTE: `ufbx_mesh.vertex_position.exists` may be `false`!
3777
3778 // Arrays may contain items with `NULL` element references.
3779 // See `ufbx_load_opts.connect_broken_elements`.
3781
3782 // Some API guarantees do not apply (depending on unsafe options used).
3783 // Loaded with `ufbx_load_opts.allow_unsafe` enabled.
3785
3786 // Flag for each possible warning type.
3787 // See `ufbx_metadata.warnings[]` for detailed warning information.
3788 bool has_warning[UFBX_WARNING_TYPE_COUNT];
3789
3792
3795
3798
3801
3803
3806
3808
3812
3814
3819
3822
3825
3827
3828 int64_t ktime_second; // < One second in internal KTime units
3829
3832
3833 // Conversion methods applied for the scene.
3839
3840 // Transform that has been applied to root for axis/unit conversion.
3843
3844 // Axis that the scene has been mirrored by.
3845 // All geometry has been mirrored in this axis.
3847
3848 // Amount geometry has been scaled.
3849 // See `UFBX_SPACE_CONVERSION_MODIFY_GEOMETRY`.
3851
3853
3854typedef enum ufbx_time_mode UFBX_ENUM_REPR {
3873
3874 UFBX_ENUM_FORCE_WIDTH(UFBX_TIME_MODE)
3876
3878
3883
3884 UFBX_ENUM_FORCE_WIDTH(UFBX_TIME_PROTOCOL)
3886
3888
3889typedef enum ufbx_snap_mode UFBX_ENUM_REPR {
3894
3895 UFBX_ENUM_FORCE_WIDTH(UFBX_SNAP_MODE)
3897
3899
3900// Global settings: Axes and time/unit scales
3901typedef struct ufbx_scene_settings {
3903
3904 // Mapping of X/Y/Z axes to world-space directions.
3905 // HINT: Use `ufbx_load_opts.target_axes` to normalize this.
3906 // NOTE: This contains the _original_ axes even if you supply `ufbx_load_opts.target_axes`.
3908
3909 // How many meters does a single world-space unit represent.
3910 // FBX files usually default to centimeters, reported as `0.01` here.
3911 // HINT: Use `ufbx_load_opts.target_unit_meters` to normalize this.
3913
3914 // Frames per second the animation is defined at.
3916
3919
3920 // Animation user interface settings.
3921 // HINT: Use `ufbx_scene_settings.frames_per_second` instead of interpreting these yourself.
3925
3926 // Original `axes.up` value for the scene.
3927 // NOTE: This may be `UFBX_COORDINATE_AXIS_UNKNOWN` if not specified in the file.
3929
3930 // Original `unit_meters` value for the scene.
3932
3934
3937
3938 // Global settings
3940
3941 // Node instances in the scene
3943
3944 // Default animation descriptor
3946
3947 union {
3948 struct {
3949 ufbx_unknown_list unknowns;
3950
3951 // Nodes
3952 ufbx_node_list nodes;
3953
3954 // Node attributes (common)
3955 ufbx_mesh_list meshes;
3956 ufbx_light_list lights;
3957 ufbx_camera_list cameras;
3958 ufbx_bone_list bones;
3959 ufbx_empty_list empties;
3960
3961 // Node attributes (curves/surfaces)
3962 ufbx_line_curve_list line_curves;
3963 ufbx_nurbs_curve_list nurbs_curves;
3964 ufbx_nurbs_surface_list nurbs_surfaces;
3965 ufbx_nurbs_trim_surface_list nurbs_trim_surfaces;
3966 ufbx_nurbs_trim_boundary_list nurbs_trim_boundaries;
3967
3968 // Node attributes (advanced)
3969 ufbx_procedural_geometry_list procedural_geometries;
3970 ufbx_stereo_camera_list stereo_cameras;
3971 ufbx_camera_switcher_list camera_switchers;
3972 ufbx_marker_list markers;
3973 ufbx_lod_group_list lod_groups;
3974
3975 // Deformers
3976 ufbx_skin_deformer_list skin_deformers;
3977 ufbx_skin_cluster_list skin_clusters;
3978 ufbx_blend_deformer_list blend_deformers;
3979 ufbx_blend_channel_list blend_channels;
3980 ufbx_blend_shape_list blend_shapes;
3981 ufbx_cache_deformer_list cache_deformers;
3982 ufbx_cache_file_list cache_files;
3983
3984 // Materials
3985 ufbx_material_list materials;
3986 ufbx_texture_list textures;
3987 ufbx_video_list videos;
3988 ufbx_shader_list shaders;
3989 ufbx_shader_binding_list shader_bindings;
3990
3991 // Animation
3992 ufbx_anim_stack_list anim_stacks;
3993 ufbx_anim_layer_list anim_layers;
3994 ufbx_anim_value_list anim_values;
3995 ufbx_anim_curve_list anim_curves;
3996
3997 // Collections
3998 ufbx_display_layer_list display_layers;
3999 ufbx_selection_set_list selection_sets;
4000 ufbx_selection_node_list selection_nodes;
4001
4002 // Constraints
4003 ufbx_character_list characters;
4004 ufbx_constraint_list constraints;
4005
4006 // Audio
4007 ufbx_audio_layer_list audio_layers;
4008 ufbx_audio_clip_list audio_clips;
4009
4010 // Miscellaneous
4011 ufbx_pose_list poses;
4012 ufbx_metadata_object_list metadata_objects;
4013 };
4014
4015 ufbx_element_list elements_by_type[UFBX_ELEMENT_TYPE_COUNT];
4016 };
4017
4018 // Unique texture files referenced by the scene.
4019 ufbx_texture_file_list texture_files;
4020
4021 // All elements and connections in the whole file
4022 ufbx_element_list elements; // < Sorted by `id`
4023 ufbx_connection_list connections_src; // < Sorted by `src,src_prop`
4024 ufbx_connection_list connections_dst; // < Sorted by `dst,dst_prop`
4025
4026 // Elements sorted by name, type
4027 ufbx_name_element_list elements_by_name;
4028
4029 // Enabled if `ufbx_load_opts.retain_dom == true`.
4031};
4032
4033// -- Curves
4034
4040
4047
4048// -- Mesh topology
4049
4050typedef enum ufbx_topo_flags UFBX_FLAG_REPR {
4051 UFBX_TOPO_NON_MANIFOLD = 0x1, // < Edge with three or more faces
4052
4053 UFBX_FLAG_FORCE_WIDTH(UFBX_TOPO_FLAGS)
4055
4056typedef struct ufbx_topo_edge {
4057 uint32_t index; // < Starting index of the edge, always defined
4058 uint32_t next; // < Ending index of the edge / next per-face `ufbx_topo_edge`, always defined
4059 uint32_t prev; // < Previous per-face `ufbx_topo_edge`, always defined
4060 uint32_t twin; // < `ufbx_topo_edge` on the opposite side, `UFBX_NO_INDEX` if not found
4061 uint32_t face; // < Index into `mesh->faces[]`, always defined
4062 uint32_t edge; // < Index into `mesh->edges[]`, `UFBX_NO_INDEX` if not found
4063
4066
4067// Vertex data array for `ufbx_generate_indices()`.
4068// NOTE: `ufbx_generate_indices()` compares the vertices using `memcmp()`, so
4069// any padding should be cleared to zero.
4070typedef struct ufbx_vertex_stream {
4071 void *data; // < Data pointer of shape `char[vertex_count][vertex_size]`.
4072 size_t vertex_count; // < Number of vertices in this stream, for sanity checking.
4073 size_t vertex_size; // < Size of a vertex in bytes.
4075
4076// -- Memory callbacks
4077
4078// You can optionally provide an allocator to ufbx, the default is to use the
4079// CRT malloc/realloc/free
4080
4081// Allocate `size` bytes, must be at least 8 byte aligned
4082typedef void *ufbx_alloc_fn(void *user, size_t size);
4083
4084// Reallocate `old_ptr` from `old_size` to `new_size`
4085// NOTE: If omit `alloc_fn` and `free_fn` they will be translated to:
4086// `alloc(size)` -> `realloc_fn(user, NULL, 0, size)`
4087// `free_fn(ptr, size)` -> `realloc_fn(user, ptr, size, 0)`
4088typedef void *ufbx_realloc_fn(void *user, void *old_ptr, size_t old_size, size_t new_size);
4089
4090// Free pointer `ptr` (of `size` bytes) returned by `alloc_fn` or `realloc_fn`
4091typedef void ufbx_free_fn(void *user, void *ptr, size_t size);
4092
4093// Free the allocator itself
4094typedef void ufbx_free_allocator_fn(void *user);
4095
4096// Allocator callbacks and user context
4097// NOTE: The allocator will be stored to the loaded scene and will be called
4098// again from `ufbx_free_scene()` so make sure `user` outlives that!
4099// You can use `free_allocator_fn()` to free the allocator yourself.
4108
4109typedef struct ufbx_allocator_opts {
4110 // Allocator callbacks
4112
4113 // Maximum number of bytes to allocate before failing
4115
4116 // Maximum number of allocations to attempt before failing
4118
4119 // Threshold to swap from batched allocations to individual ones
4120 // Defaults to 1MB if set to zero
4121 // NOTE: If set to `1` ufbx will allocate everything in the smallest
4122 // possible chunks which may be useful for debugging (eg. ASAN)
4124
4125 // Maximum size of a single allocation containing sub-allocations.
4126 // Defaults to 16MB if set to zero
4127 // The maximum amount of wasted memory depends on `max_chunk_size` and
4128 // `huge_threshold`: each chunk can waste up to `huge_threshold` bytes
4129 // internally and the last chunk might be incomplete. So for example
4130 // with the defaults we can waste around 1MB/16MB = 6.25% overall plus
4131 // up to 32MB due to the two incomplete blocks. The actual amounts differ
4132 // slightly as the chunks start out at 4kB and double in size each time,
4133 // meaning that the maximum fixed overhead (up to 32MB with defaults) is
4134 // at most ~30% of the total allocation size.
4136
4138
4139// -- IO callbacks
4140
4141// Try to read up to `size` bytes to `data`, return the amount of read bytes.
4142// Return `SIZE_MAX` to indicate an IO error.
4143typedef size_t ufbx_read_fn(void *user, void *data, size_t size);
4144
4145// Skip `size` bytes in the file.
4146typedef bool ufbx_skip_fn(void *user, size_t size);
4147
4148// Get the size of the file.
4149// Return `0` if unknown, `UINT64_MAX` if error.
4150typedef uint64_t ufbx_size_fn(void *user);
4151
4152// Close the file
4153typedef void ufbx_close_fn(void *user);
4154
4155typedef struct ufbx_stream {
4156 ufbx_read_fn *read_fn; // < Required
4157 ufbx_skip_fn *skip_fn; // < Optional: Will use `read_fn()` if missing
4158 ufbx_size_fn *size_fn; // < Optional
4159 ufbx_close_fn *close_fn; // < Optional
4160
4161 // Context passed to other functions
4162 void *user;
4164
4166 UFBX_OPEN_FILE_MAIN_MODEL, // < Main model file
4167 UFBX_OPEN_FILE_GEOMETRY_CACHE, // < Unknown geometry cache file
4168 UFBX_OPEN_FILE_OBJ_MTL, // < .mtl material library file
4169
4170 UFBX_ENUM_FORCE_WIDTH(UFBX_OPEN_FILE_TYPE)
4172
4174
4175typedef uintptr_t ufbx_open_file_context;
4176
4177typedef struct ufbx_open_file_info {
4178 // Context that can be passed to the following functions to use a shared allocator:
4179 // ufbx_open_file_ctx()
4180 // ufbx_open_memory_ctx()
4182
4183 // Kind of file to load.
4185
4186 // Original filename in the file, not resolved or UTF-8 encoded.
4187 // NOTE: Not necessarily NULL-terminated!
4190
4191// Callback for opening an external file from the filesystem
4192typedef bool ufbx_open_file_fn(void *user, ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_info *info);
4193
4194typedef struct ufbx_open_file_cb {
4196 void *user;
4197
4199 (void *user, ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_info *info),
4200 (stream, path, path_len, info))
4202
4203// Options for `ufbx_open_file()`.
4204typedef struct ufbx_open_file_opts {
4205 uint32_t _begin_zero;
4206
4207 // Allocator to allocate the memory with.
4209
4210 // The filename is guaranteed to be NULL-terminated.
4212
4213 uint32_t _end_zero;
4215
4216// Memory stream options
4217typedef void ufbx_close_memory_fn(void *user, void *data, size_t data_size);
4218
4219typedef struct ufbx_close_memory_cb {
4221 void *user;
4222
4224 (void *user, void *data, size_t data_size),
4225 (data, data_size))
4227
4228// Options for `ufbx_open_memory()`.
4230 uint32_t _begin_zero;
4231
4232 // Allocator to allocate the memory with.
4233 // NOTE: Used even if no copy is made to allocate a small metadata block.
4235
4236 // Do not copy the memory.
4237 // You can use `close_cb` to free the memory when the stream is closed.
4238 // NOTE: This means the provided data pointer is referenced after creating
4239 // the memory stream, make sure the data stays valid until the stream is closed!
4241
4242 // Callback to free the memory blob.
4244
4245 uint32_t _end_zero;
4247
4248// Detailed error stack frame.
4249// NOTE: You must compile `ufbx.c` with `UFBX_ENABLE_ERROR_STACK` to enable the error stack.
4255
4256// Error causes (and `UFBX_ERROR_NONE` for no error).
4257typedef enum ufbx_error_type UFBX_ENUM_REPR {
4258
4259 // No error, operation has been performed successfully.
4261
4262 // Unspecified error, most likely caused by an invalid FBX file or a file
4263 // that contains something ufbx can't handle.
4265
4266 // File not found.
4268
4269 // Empty file.
4271
4272 // External file not found.
4273 // See `ufbx_load_opts.load_external_files` for more information.
4275
4276 // Out of memory (allocator returned `NULL`).
4278
4279 // `ufbx_allocator_opts.memory_limit` exhausted.
4281
4282 // `ufbx_allocator_opts.allocation_limit` exhausted.
4284
4285 // File ended abruptly.
4287
4288 // IO read error.
4289 // eg. returning `SIZE_MAX` from `ufbx_stream.read_fn` or stdio `ferror()` condition.
4291
4292 // User cancelled the loading via `ufbx_load_opts.progress_cb` returning `UFBX_PROGRESS_CANCEL`.
4294
4295 // Could not detect file format from file data or filename.
4296 // HINT: You can supply it manually using `ufbx_load_opts.file_format` or use `ufbx_load_opts.filename`
4297 // when using `ufbx_load_memory()` to let ufbx guess the format from the extension.
4299
4300 // Options struct (eg. `ufbx_load_opts`) is not cleared to zero.
4301 // Make sure you initialize the structure to zero via eg.
4302 // ufbx_load_opts opts = { 0 }; // C
4303 // ufbx_load_opts opts = { }; // C++
4305
4306 // The vertex streams in `ufbx_generate_indices()` are empty.
4308
4309 // Vertex stream passed to `ufbx_generate_indices()`.
4311
4312 // Invalid UTF-8 encountered in a file when loading with `UFBX_UNICODE_ERROR_HANDLING_ABORT_LOADING`.
4314
4315 // Feature needed for the operation has been compiled out.
4317
4318 // Attempting to tessellate an invalid NURBS object.
4319 // See `ufbx_nurbs_basis.valid`.
4321
4322 // Out of bounds index in the file when loading with `UFBX_INDEX_ERROR_HANDLING_ABORT_LOADING`.
4324
4325 // Node is deeper than `ufbx_load_opts.node_depth_limit` in the hierarchy.
4327
4328 // Error parsing ASCII array in a thread.
4329 // Threaded ASCII parsing is slightly more strict than non-threaded, for cursed files,
4330 // set `ufbx_load_opts.force_single_thread_ascii_parsing` to `true`.
4332
4333 // Unsafe options specified without enabling `ufbx_load_opts.allow_unsafe`.
4335
4336 // Duplicated override property in `ufbx_create_anim()`
4338
4339 // Unsupported file format version.
4340 // ufbx still tries to load files with unsupported versions, see `UFBX_WARNING_UNSUPPORTED_VERSION`.
4342
4343 UFBX_ENUM_FORCE_WIDTH(UFBX_ERROR_TYPE)
4345
4347
4348// Error description with detailed stack trace
4349// HINT: You can use `ufbx_format_error()` for formatting the error
4350typedef struct ufbx_error {
4351
4352 // Type of the error, or `UFBX_ERROR_NONE` if successful.
4354
4355 // Description of the error type.
4357
4358 // Internal error stack.
4359 // NOTE: You must compile `ufbx.c` with `UFBX_ENABLE_ERROR_STACK` to enable the error stack.
4360 uint32_t stack_size;
4362
4363 // Additional error information, such as missing file filename.
4364 // `info` is a NULL-terminated UTF-8 string containing `info_length` bytes, excluding the trailing `'\0'`.
4367
4369
4370// -- Progress callbacks
4371
4372// Loading progress information.
4377
4378// Progress result returned from `ufbx_progress_fn()` callback.
4379// Determines whether ufbx should continue or abort the loading.
4381
4382 // Continue loading the file.
4384
4385 // Cancel loading and fail with `UFBX_ERROR_CANCELLED`.
4387
4388 UFBX_ENUM_FORCE_WIDTH(UFBX_PROGRESS_RESULT)
4390
4391// Called periodically with the current progress.
4392// Return `UFBX_PROGRESS_CANCEL` to cancel further processing.
4393typedef ufbx_progress_result ufbx_progress_fn(void *user, const ufbx_progress *progress);
4394
4403
4404// -- Inflate
4405
4408
4409// Source data/stream to decompress with `ufbx_inflate()`
4411 // Total size of the data in bytes
4413
4414 // (optional) Initial or complete data chunk
4415 const void *data;
4417
4418 // (optional) Temporary buffer, defaults to 256b stack buffer
4419 void *buffer;
4421
4422 // (optional) Streaming read function, concatenated after `data`
4425
4426 // (optional) Progress reporting
4428 uint64_t progress_interval_hint; // < Bytes between progress report calls
4429
4430 // (optional) Change the progress scope
4433
4434 // (optional) No the DEFLATE header
4436
4437 // (optional) No the Adler32 checksum
4439
4440 // (optional) Force internal fast lookup bit amount
4442};
4443
4444// Persistent data between `ufbx_inflate()` calls
4445// NOTE: You must set `initialized` to `false`, but `data` may be uninitialized
4448 uint64_t data[1024];
4449};
4450
4452 // Clamp to a valid value.
4454 // Set bad indices to `UFBX_NO_INDEX`.
4455 // This is the recommended way if you need to deal with files with gaps in information.
4456 // HINT: If you use this `ufbx_get_vertex_TYPE()` functions will return zero
4457 // on invalid indices instead of failing.
4459 // Fail loading entierely when encountering a bad index.
4461 // Pass bad indices through as-is.
4462 // Requires `ufbx_load_opts.allow_unsafe`.
4463 // UNSAFE: Breaks any API guarantees regarding indexes being in bounds and makes
4464 // `ufbx_get_vertex_TYPE()` memory-unsafe to use.
4466
4467 UFBX_ENUM_FORCE_WIDTH(UFBX_INDEX_ERROR_HANDLING)
4469
4471
4473 // Replace errors with U+FFFD "Replacement Character"
4475 // Replace errors with '_' U+5F "Low Line"
4477 // Replace errors with '?' U+3F "Question Mark"
4479 // Remove errors from the output
4481 // Fail loading on encountering an Unicode error
4483 // Ignore and pass-through non-UTF-8 string data.
4484 // Requires `ufbx_load_opts.allow_unsafe`.
4485 // UNSAFE: Breaks API guarantee that `ufbx_string` is UTF-8 encoded.
4487
4488 UFBX_ENUM_FORCE_WIDTH(UFBX_UNICODE_ERROR_HANDLING)
4490
4492
4494 // This keyframe represents a constant step from the left side
4496 // This keyframe represents a constant step from the right side
4498 // This keyframe is the main part of a step
4499 // Bordering either `UFBX_BAKED_KEY_STEP_LEFT` or `UFBX_BAKED_KEY_STEP_RIGHT`.
4501 // This keyframe is a real keyframe in the source animation
4503 // This keyframe has been reduced by maximum sample rate.
4504 // See `ufbx_bake_opts.maximum_sample_rate`.
4506
4507 UFBX_FLAG_FORCE_WIDTH(UFBX_BAKED_KEY)
4509
4510typedef struct ufbx_baked_vec3 {
4511 double time; // < Time of the keyframe, in seconds
4512 ufbx_vec3 value; // < Value at `time`, can be linearly interpolated
4513 ufbx_baked_key_flags flags; // < Additional information about the keyframe
4515
4516UFBX_LIST_TYPE(ufbx_baked_vec3_list, ufbx_baked_vec3);
4517
4518typedef struct ufbx_baked_quat {
4519 double time; // < Time of the keyframe, in seconds
4520 ufbx_quat value; // < Value at `time`, can be (spherically) linearly interpolated
4521 ufbx_baked_key_flags flags; // < Additional information about the keyframe
4523
4524UFBX_LIST_TYPE(ufbx_baked_quat_list, ufbx_baked_quat);
4525
4526// Baked transform animation for a single node.
4527typedef struct ufbx_baked_node {
4528
4529 // Typed ID of the node, maps to `ufbx_scene.nodes[]`.
4530 uint32_t typed_id;
4531 // Element ID of the element, maps to `ufbx_scene.elements[]`.
4532 uint32_t element_id;
4533
4534 // The translation channel has constant values for the whole animation.
4536 // The rotation channel has constant values for the whole animation.
4538 // The scale channel has constant values for the whole animation.
4540
4541 // Translation keys for the animation, maps to `ufbx_node.local_transform.translation`.
4542 ufbx_baked_vec3_list translation_keys;
4543 // Rotation keyframes, maps to `ufbx_node.local_transform.rotation`.
4544 ufbx_baked_quat_list rotation_keys;
4545 // Scale keyframes, maps to `ufbx_node.local_transform.scale`.
4546 ufbx_baked_vec3_list scale_keys;
4547
4549
4550UFBX_LIST_TYPE(ufbx_baked_node_list, ufbx_baked_node);
4551
4552// Baked property animation.
4553typedef struct ufbx_baked_prop {
4554 // Name of the property, eg. `"Visibility"`.
4556 // The value of the property is constant for the whole animation.
4558 // Property value keys.
4559 ufbx_baked_vec3_list keys;
4561
4562UFBX_LIST_TYPE(ufbx_baked_prop_list, ufbx_baked_prop);
4563
4564// Baked property animation for a single element.
4565typedef struct ufbx_baked_element {
4566 // Element ID of the element, maps to `ufbx_scene.elements[]`.
4567 uint32_t element_id;
4568 // List of properties the animation modifies.
4569 ufbx_baked_prop_list props;
4571
4572UFBX_LIST_TYPE(ufbx_baked_element_list, ufbx_baked_element);
4573
4581
4582// Animation baked into linearly interpolated keyframes.
4583// See `ufbx_bake_anim()`.
4584typedef struct ufbx_baked_anim {
4585
4586 // Nodes that are modified by the animation.
4587 // Some nodes may be missing if the specified animation does not transform them.
4588 // Conversely, some non-obviously animated nodes may be included as exporters
4589 // often may add dummy keyframes for objects.
4590 ufbx_baked_node_list nodes;
4591
4592 // Element properties modified by the animation.
4593 ufbx_baked_element_list elements;
4594
4595 // Playback time range for the animation.
4599
4600 // Keyframe time range.
4603
4604 // Additional bake information.
4606
4608
4609// -- Thread API
4610
4611// Internal thread pool handle.
4612// Passed to `ufbx_thread_pool_run_task()` from an user thread to run ufbx tasks.
4613// HINT: This context can store a user pointer via `ufbx_thread_pool_set_user_ptr()`.
4615
4616// Thread pool creation information from ufbx.
4620
4621// Initialize the thread pool.
4622// Return `true` on success.
4624
4625// Run tasks `count` tasks in threads.
4626// You must call `ufbx_thread_pool_run_task()` with indices `[start_index, start_index + count)`.
4627// The threads are launched in batches indicated by `group`, see `UFBX_THREAD_GROUP_COUNT` for more information.
4628// Ideally, you should run all the task indices in parallel within each `ufbx_thread_pool_run_fn()` call.
4629typedef void ufbx_thread_pool_run_fn(void *user, ufbx_thread_pool_context ctx, uint32_t group, uint32_t start_index, uint32_t count);
4630
4631// Wait for previous tasks spawned in `ufbx_thread_pool_run_fn()` to finish.
4632// `group` specifies the batch to wait for, `max_index` contains `start_index + count` from that group instance.
4633typedef void ufbx_thread_pool_wait_fn(void *user, ufbx_thread_pool_context ctx, uint32_t group, uint32_t max_index);
4634
4635// Free the thread pool.
4637
4638// Thread pool interface.
4639// See functions above for more information.
4640//
4641// Hypothetical example of calls, where `UFBX_THREAD_GROUP_COUNT=2` for simplicity:
4642//
4643// run_fn(group=0, start_index=0, count=4) -> t0 := threaded { ufbx_thread_pool_run_task(0..3) }
4644// run_fn(group=1, start_index=4, count=10) -> t1 := threaded { ufbx_thread_pool_run_task(4..10) }
4645// wait_fn(group=0, max_index=4) -> wait_threads(t0)
4646// run_fn(group=0, start_index=10, count=15) -> t0 := threaded { ufbx_thread_pool_run_task(10..14) }
4647// wait_fn(group=1, max_index=10) -> wait_threads(t1)
4648// wait_fn(group=0, max_index=15) -> wait_threads(t0)
4649//
4657
4658// Thread pool options.
4659typedef struct ufbx_thread_opts {
4660
4661 // Thread pool interface.
4662 // HINT: You can use `extra/ufbx_os.h` to provide a thread pool.
4664
4665 // Maximum of tasks to have in-flight.
4666 // Default: 2048
4668
4669 // Maximum amount of memory to use for batched threaded processing.
4670 // Default: 32MB
4671 // NOTE: The actual used memory usage might be higher, if there are individual tasks
4672 // that rqeuire a high amount of memory.
4674
4676
4677// Flags to control nanimation evaluation functions.
4679
4680 // Do not extrapolate past the keyframes.
4682
4685
4686// -- Main API
4687
4688// Options for `ufbx_load_file/memory/stream/stdio()`
4689// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
4690typedef struct ufbx_load_opts {
4691 uint32_t _begin_zero;
4692
4693 ufbx_allocator_opts temp_allocator; // < Allocator used during loading
4694 ufbx_allocator_opts result_allocator; // < Allocator used for the final scene
4695 ufbx_thread_opts thread_opts; // < Threading options
4696
4697 // Preferences
4698 bool ignore_geometry; // < Do not load geometry datsa (vertices, indices, etc)
4699 bool ignore_animation; // < Do not load animation curves
4700 bool ignore_embedded; // < Do not load embedded content
4701 bool ignore_all_content; // < Do not load any content (geometry, animation, embedded)
4702
4703 bool evaluate_skinning; // < Evaluate skinning (see ufbx_mesh.skinned_vertices)
4704 bool evaluate_caches; // < Evaluate vertex caches (see ufbx_mesh.skinned_vertices)
4705
4706 // Try to open external files referenced by the main file automatically.
4707 // Applies to geometry caches and .mtl files for OBJ.
4708 // NOTE: This may be risky for untrusted data as the input files may contain
4709 // references to arbitrary paths in the filesystem.
4710 // NOTE: This only applies to files *implicitly* referenced by the scene, if
4711 // you request additional files via eg. `ufbx_load_opts.obj_mtl_path` they
4712 // are still loaded.
4713 // NOTE: Will fail loading if any external files are not found by default, use
4714 // `ufbx_load_opts.ignore_missing_external_files` to suppress this, in this case
4715 // you can find the errors at `ufbx_metadata.warnings[]` as `UFBX_WARNING_MISSING_EXTERNAL_FILE`.
4717
4718 // Don't fail loading if external files are not found.
4720
4721 // Don't compute `ufbx_skin_deformer` `vertices` and `weights` arrays saving
4722 // a bit of memory and time if not needed
4724
4725 // Skip computing `ufbx_mesh.material_parts[]` and `ufbx_mesh.face_group_parts[]`.
4727
4728 // Clean-up skin weights by removing negative, zero and NAN weights.
4730
4731 // Read Blender materials as PBR values.
4732 // Blender converts PBR materials to legacy FBX Phong materials in a deterministic way.
4733 // If this setting is enabled, such materials will be read as `UFBX_SHADER_BLENDER_PHONG`,
4734 // which means ufbx will be able to parse roughness and metallic textures.
4736
4737 // Don't adjust reading the FBX file depending on the detected exporter
4739
4740 // Don't allow partially broken FBX files to load
4742
4743 // Force ASCII parsing to use a single thread.
4744 // The multi-threaded ASCII parsing is slightly more lenient as it ignores
4745 // the self-reported size of ASCII arrays, that threaded parsing depends on.
4747
4748 // UNSAFE: If enabled allows using unsafe options that may fundamentally
4749 // break the API guarantees.
4751
4752 // Specify how to handle broken indices.
4754
4755 // Connect related elements even if they are broken. If `false` (default)
4756 // `ufbx_skin_cluster` with a missing `bone` field are _not_ included in
4757 // the `ufbx_skin_deformer.clusters[]` array for example.
4759
4760 // Allow nodes that are not connected in any way to the root. Conversely if
4761 // disabled, all lone nodes will be parented under `ufbx_scene.root_node`.
4763
4764 // Allow meshes with no vertex position attribute.
4765 // NOTE: If this is set `ufbx_mesh.vertex_position.exists` may be `false`.
4767
4768 // Allow faces with zero indices.
4770
4771 // Generate vertex normals for a meshes that are missing normals.
4772 // You can see if the normals have been generated from `ufbx_mesh.generated_normals`.
4774
4775 // Ignore `open_file_cb` when loading the main file.
4777
4778 // Path separator character, defaults to '\' on Windows and '/' otherwise.
4780
4781 // Maximum depth of the node hirerachy.
4782 // Will fail with `UFBX_ERROR_NODE_DEPTH_LIMIT` if a node is deeper than this limit.
4783 // NOTE: The default of 0 allows arbitrarily deep hierarchies. Be careful if using
4784 // recursive algorithms without setting this limit.
4786
4787 // Estimated file size for progress reporting
4789
4790 // Buffer size in bytes to use for reading from files or IO callbacks
4792
4793 // Filename to use as a base for relative file paths if not specified using
4794 // `ufbx_load_file()`. Use `length = SIZE_MAX` for NULL-terminated strings.
4795 // `raw_filename` will be derived from this if empty.
4797
4798 // Raw non-UTF8 filename. Does not support NULL termination.
4799 // `filename` will be derived from this if empty.
4801
4802 // Progress reporting
4804 uint64_t progress_interval_hint; // < Bytes between progress report calls
4805
4806 // External file callbacks (defaults to stdio.h)
4808
4809 // How to handle geometry transforms in the nodes.
4810 // See `ufbx_geometry_transform_handling` for an explanation.
4812
4813 // How to handle unconventional transform inherit modes.
4814 // See `ufbx_inherit_mode_handling` for an explanation.
4816
4817 // How to perform space conversion by `target_axes` and `target_unit_meters`.
4818 // See `ufbx_space_conversion` for an explanation.
4820
4821 // How to handle pivots.
4822 // See `ufbx_pivot_handling` for an explanation.
4824
4825 // Retain the original transforms of empties when converting pivots.
4827
4828 // Axis used to mirror for conversion between left-handed and right-handed coordinates.
4830
4831 // Do not change winding of faces when converting handedness.
4833
4834 // Reverse winding of all faces.
4835 // If `handedness_conversion_retain_winding` is not specified, mirrored meshes
4836 // will retain their original winding.
4838
4839 // Apply an implicit root transformation to match axes.
4840 // Used if `ufbx_coordinate_axes_valid(target_axes)`.
4842
4843 // Scale the scene so that one world-space unit is `target_unit_meters` meters.
4844 // By default units are not scaled.
4846
4847 // Target space for camera.
4848 // By default FBX cameras point towards the positive X axis.
4849 // Used if `ufbx_coordinate_axes_valid(target_camera_axes)`.
4851
4852 // Target space for directed lights.
4853 // By default FBX lights point towards the negative Y axis.
4854 // Used if `ufbx_coordinate_axes_valid(target_light_axes)`.
4856
4857 // Name for dummy geometry transform helper nodes.
4858 // See `UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES`.
4860
4861 // Name for dummy scale helper nodes.
4862 // See `UFBX_INHERIT_MODE_HANDLING_HELPER_NODES`.
4864
4865 // Normalize vertex normals.
4867
4868 // Normalize tangents and bitangents.
4870
4871 // Override for the root transform
4874
4875 // Animation keyframe clamp threshold, only applies to specific interpolation modes.
4877
4878 // Specify how to handle Unicode errors in strings.
4880
4881 // Retain the 'W' component of mesh normal/tangent/bitangent.
4882 // See `ufbx_vertex_attrib.values_w`.
4884
4885 // Retain the raw document structure using `ufbx_dom_node`.
4887
4888 // Force a specific file format instead of detecting it.
4890
4891 // How far to read into the file to determine the file format.
4892 // Default: 16kB
4894
4895 // Do not attempt to detect file format from file content.
4897
4898 // Do not attempt to detect file format from filename extension.
4899 // ufbx primarily detects file format from the file header,
4900 // this is just used as a fallback.
4902
4903 // (.obj) Try to find .mtl file with matching filename as the .obj file.
4904 // Used if the file specified `mtllib` line is not found, eg. for a file called
4905 // `model.obj` that contains the line `usemtl materials.mtl`, ufbx would first
4906 // try to open `materials.mtl` and if that fails it tries to open `model.mtl`.
4908
4909 // (.obj) Don't split geometry into meshes by object.
4911
4912 // (.obj) Don't split geometry into meshes by groups.
4914
4915 // (.obj) Force splitting groups even on object boundaries.
4917
4918 // (.obj) Path to the .mtl file.
4919 // Use `length = SIZE_MAX` for NULL-terminated strings.
4920 // NOTE: This is used _instead_ of the one in the file even if not found
4921 // and sidesteps `load_external_files` as it's _explicitly_ requested.
4923
4924 // (.obj) Data for the .mtl file.
4926
4927 // The world unit in meters that .obj files are assumed to be in.
4928 // .obj files do not define the working units. By default the unit scale
4929 // is read as zero, and no unit conversion is performed.
4931
4932 // Coordinate space .obj files are assumed to be in.
4933 // .obj files do not define the coordinate space they use. By default no
4934 // coordinate space is assumed and no conversion is performed.
4936
4937 uint32_t _end_zero;
4939
4940// Options for `ufbx_evaluate_scene()`
4941// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
4942typedef struct ufbx_evaluate_opts {
4943 uint32_t _begin_zero;
4944
4945 ufbx_allocator_opts temp_allocator; // < Allocator used during evaluation
4946 ufbx_allocator_opts result_allocator; // < Allocator used for the final scene
4947
4948 bool evaluate_skinning; // < Evaluate skinning (see ufbx_mesh.skinned_vertices)
4949 bool evaluate_caches; // < Evaluate vertex caches (see ufbx_mesh.skinned_vertices)
4950
4951 // Evaluation flags.
4952 // See `ufbx_evaluate_flags` for information.
4954
4955 // WARNING: Potentially unsafe! Try to open external files such as geometry caches
4957
4958 // External file callbacks (defaults to stdio.h)
4960
4961 uint32_t _end_zero;
4963
4964UFBX_LIST_TYPE(ufbx_const_uint32_list, const uint32_t);
4965UFBX_LIST_TYPE(ufbx_const_real_list, const ufbx_real);
4966
4968 // Element (`ufbx_element.element_id`) to override the property from
4969 uint32_t element_id;
4970
4971 // Property name to override.
4973
4974 // Override value, use `value.x` for scalars. `value_int` is initialized
4975 // from `value.x` if zero so keep `value` zeroed even if you don't need it!
4978 int64_t value_int;
4980
4981UFBX_LIST_TYPE(ufbx_const_prop_override_desc_list, const ufbx_prop_override_desc);
4982
4983UFBX_LIST_TYPE(ufbx_const_transform_override_list, const ufbx_transform_override);
4984
4985typedef struct ufbx_anim_opts {
4986 uint32_t _begin_zero;
4987
4988 // Animation layers indices.
4989 // Corresponding to `ufbx_scene.anim_layers[]`, aka `ufbx_anim_layer.typed_id`.
4990 ufbx_const_uint32_list layer_ids;
4991
4992 // Override layer weights, parallel to `ufbx_anim_opts.layer_ids[]`.
4993 ufbx_const_real_list override_layer_weights;
4994
4995 // Property overrides.
4996 // These allow you to override FBX properties, such as 'UFBX_Lcl_Rotation`.
4997 ufbx_const_prop_override_desc_list prop_overrides;
4998
4999 // Transform overrides.
5000 // These allow you to override individual nodes' `ufbx_node.local_transform`.
5001 ufbx_const_transform_override_list transform_overrides;
5002
5003 // Ignore connected properties
5005
5006 ufbx_allocator_opts result_allocator; // < Allocator used to create the `ufbx_anim`
5007
5008 uint32_t _end_zero;
5010
5011// Specifies how to handle stepped tangents.
5013
5014 // One millisecond default step duration, with potential extra slack for converting to `float`.
5016
5017 // Use a custom interpolation duration for the constant step.
5018 // See `ufbx_bake_opts.step_custom_duration` and optionally `ufbx_bake_opts.step_custom_epsilon`.
5020
5021 // Stepped keyframes are represented as keyframes at the exact same time.
5022 // Use flags `UFBX_BAKED_KEY_STEP_LEFT` and `UFBX_BAKED_KEY_STEP_RIGHT` to differentiate
5023 // between the primary key and edge limits.
5025
5026 // Represent stepped keyframe times as the previous/next representable `double` value.
5027 // Using this and robust linear interpolation will handle stepped tangents correctly
5028 // without having to look at the key flags.
5029 // NOTE: Casting these values to `float` or otherwise modifying them can collapse
5030 // the keyframes to have the identical time.
5032
5033 // Treat all stepped tangents as linearly interpolated.
5035
5038
5040
5041typedef struct ufbx_bake_opts {
5042 uint32_t _begin_zero;
5043
5044 ufbx_allocator_opts temp_allocator; // < Allocator used during loading
5045 ufbx_allocator_opts result_allocator; // < Allocator used for the final baked animation
5046
5047 // Move the keyframe times to start from zero regardless of the animation start time.
5048 // For example, for an animation spanning between frames [30, 60] will be moved to
5049 // [0, 30] in the baked animation.
5050 // NOTE: This is in general not equivalent to subtracting `ufbx_anim.time_begin`
5051 // from each keyframe, as this trimming is done exactly using internal FBX ticks.
5053
5054 // Samples per second to use for resampling non-linear animation.
5055 // Default: 30
5057
5058 // Minimum sample rate to not resample.
5059 // Many exporters resample animation by default. To avoid double-resampling
5060 // keyframe rates higher or equal to this will not be resampled.
5061 // Default: 19.5
5063
5064 // Maximum sample rate to use, this will remove keys if they are too close together.
5065 // Default: unlimited
5067
5068 // Bake the raw versions of properties related to transforms.
5070
5071 // Do not bake node transforms.
5073
5074 // Do not resample linear rotation keyframes.
5075 // FBX interpolates rotation in Euler angles, so this might cause incorrect interpolation.
5077
5078 // Ignore layer weight animation.
5080
5081 // Maximum number of segments to generate from one keyframe.
5082 // Default: 32
5084
5085 // How to handle stepped tangents.
5087
5088 // Interpolation duration used by `UFBX_BAKE_STEP_HANDLING_CUSTOM_DURATION`.
5090
5091 // Interpolation epsilon used by `UFBX_BAKE_STEP_HANDLING_CUSTOM_DURATION`.
5092 // Defined as the minimum fractional decrease/increase in key time, ie.
5093 // `time / (1.0 + step_custom_epsilon)` and `time * (1.0 + step_custom_epsilon)`.
5095
5096 // Flags passed to animation evaluation functions.
5097 // See `ufbx_evaluate_flags`.
5099
5100 // Enable key reduction.
5102
5103 // Enable key reduction for non-constant rotations.
5104 // Assumes rotations will be interpolated using a spherical linear interpolation at runtime.
5106
5107 // Threshold for reducing keys for linear segments.
5108 // Default `0.000001`, use negative to disable.
5110
5111 // Maximum passes over the keys to reduce.
5112 // Every pass can potentially halve the the amount of keys.
5113 // Default: `4`
5115
5116 uint32_t _end_zero;
5118
5119// Options for `ufbx_tessellate_nurbs_curve()`
5120// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
5122 uint32_t _begin_zero;
5123
5124 ufbx_allocator_opts temp_allocator; // < Allocator used during tessellation
5125 ufbx_allocator_opts result_allocator; // < Allocator used for the final line curve
5126
5127 // How many segments tessellate each span in `ufbx_nurbs_basis.spans`.
5129
5130 uint32_t _end_zero;
5132
5133// Options for `ufbx_tessellate_nurbs_surface()`
5134// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
5136 uint32_t _begin_zero;
5137
5138 ufbx_allocator_opts temp_allocator; // < Allocator used during tessellation
5139 ufbx_allocator_opts result_allocator; // < Allocator used for the final mesh
5140
5141 // How many segments tessellate each span in `ufbx_nurbs_basis.spans`.
5142 // NOTE: Default is `4`, _not_ `ufbx_nurbs_surface.span_subdivision_u/v` as that
5143 // would make it easy to create an FBX file with an absurdly high subdivision
5144 // rate (similar to mesh subdivision). Please enforce copy the value yourself
5145 // enforcing whatever limits you deem reasonable.
5148
5149 // Skip computing `ufbx_mesh.material_parts[]`
5151
5152 uint32_t _end_zero;
5154
5155// Options for `ufbx_subdivide_mesh()`
5156// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
5157typedef struct ufbx_subdivide_opts {
5158 uint32_t _begin_zero;
5159
5160 ufbx_allocator_opts temp_allocator; // < Allocator used during subdivision
5161 ufbx_allocator_opts result_allocator; // < Allocator used for the final mesh
5162
5165
5166 // Do not generate normals
5168
5169 // Interpolate existing normals using the subdivision rules
5170 // instead of generating new normals
5172
5173 // Subdivide also tangent attributes
5175
5176 // Map subdivided vertices into weighted original vertices.
5177 // NOTE: May be O(n^2) if `max_source_vertices` is not specified!
5179
5180 // Limit source vertices per subdivided vertex.
5182
5183 // Calculate bone influences over subdivided vertices (if applicable).
5184 // NOTE: May be O(n^2) if `max_skin_weights` is not specified!
5186
5187 // Limit bone influences per subdivided vertex.
5189
5190 // Index of the skin deformer to use for `evaluate_skin_weights`.
5192
5193 uint32_t _end_zero;
5195
5196// Options for `ufbx_load_geometry_cache()`
5197// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
5199 uint32_t _begin_zero;
5200
5201 ufbx_allocator_opts temp_allocator; // < Allocator used during loading
5202 ufbx_allocator_opts result_allocator; // < Allocator used for the final scene
5203
5204 // External file callbacks (defaults to stdio.h)
5206
5207 // FPS value for converting frame times to seconds
5209
5210 // Axis to mirror the geometry by.
5212
5213 // Enable scaling `scale_factor` all geometry by.
5215
5216 // Factor to scale the geometry by.
5218
5219 uint32_t _end_zero;
5221
5222// Options for `ufbx_read_geometry_cache_TYPE()`
5223// NOTE: Initialize to zero with `{ 0 }` (C) or `{ }` (C++)
5225 uint32_t _begin_zero;
5226
5227 // External file callbacks (defaults to stdio.h)
5229
5233
5234 // Ignore scene transform.
5236
5237 uint32_t _end_zero;
5239
5245
5246// -- API
5247
5248#ifdef __cplusplus
5249extern "C" {
5250#endif
5251
5252// Various zero/empty/identity values
5261
5262// Commonly used coordinate axes.
5267
5268// Sizes of element types. eg `sizeof(ufbx_node)`
5269ufbx_abi_data const size_t ufbx_element_type_size[UFBX_ELEMENT_TYPE_COUNT];
5270
5271// Version of the source file, comparable to `UFBX_HEADER_VERSION`
5273
5274
5275// Practically always `true` (see below), if not you need to be careful with threads.
5276//
5277// Guaranteed to be `true` in _any_ of the following conditions:
5278// - ufbx.c has been compiled using: GCC / Clang / MSVC / ICC / EMCC / TCC
5279// - ufbx.c has been compiled as C++11 or later
5280// - ufbx.c has been compiled as C11 or later with `<stdatomic.h>` support
5281//
5282// If `false` you can't call the following functions concurrently:
5283// ufbx_evaluate_scene()
5284// ufbx_free_scene()
5285// ufbx_subdivide_mesh()
5286// ufbx_tessellate_nurbs_surface()
5287// ufbx_free_mesh()
5288ufbx_abi bool ufbx_is_thread_safe(void);
5289
5290// Load a scene from a `size` byte memory buffer at `data`
5292 const void *data, size_t data_size,
5293 const ufbx_load_opts *opts, ufbx_error *error);
5294
5295// Load a scene by opening a file named `filename`
5297 const char *filename,
5298 const ufbx_load_opts *opts, ufbx_error *error);
5300 const char *filename, size_t filename_len,
5301 const ufbx_load_opts *opts, ufbx_error *error);
5302
5303// Load a scene by reading from an `FILE *file` stream
5304// NOTE: `file` is passed as a `void` pointer to avoid including <stdio.h>
5306 void *file,
5307 const ufbx_load_opts *opts, ufbx_error *error);
5308
5309// Load a scene by reading from an `FILE *file` stream with a prefix
5310// NOTE: `file` is passed as a `void` pointer to avoid including <stdio.h>
5312 void *file,
5313 const void *prefix, size_t prefix_size,
5314 const ufbx_load_opts *opts, ufbx_error *error);
5315
5316// Load a scene from a user-specified stream
5318 const ufbx_stream *stream,
5319 const ufbx_load_opts *opts, ufbx_error *error);
5320
5321// Load a scene from a user-specified stream with a prefix
5323 const ufbx_stream *stream,
5324 const void *prefix, size_t prefix_size,
5325 const ufbx_load_opts *opts, ufbx_error *error);
5326
5327// Free a previously loaded or evaluated scene
5329
5330// Increment `scene` refcount
5332
5333// Format a textual description of `error`.
5334// Always produces a NULL-terminated string to `char dst[dst_size]`, truncating if
5335// necessary. Returns the number of characters written not including the NULL terminator.
5336ufbx_abi size_t ufbx_format_error(char *dst, size_t dst_size, const ufbx_error *error);
5337
5338// Query
5339
5340// Find a property `name` from `props`, returns `NULL` if not found.
5341// Searches through `ufbx_props.defaults` as well.
5342ufbx_abi ufbx_prop *ufbx_find_prop_len(const ufbx_props *props, const char *name, size_t name_len);
5343ufbx_abi ufbx_prop *ufbx_find_prop(const ufbx_props *props, const char *name);
5344
5345// Utility functions for finding the value of a property, returns `def` if not found.
5346// NOTE: For `ufbx_string` you need to ensure the lifetime of the default is
5347// sufficient as no copy is made.
5348ufbx_abi ufbx_real ufbx_find_real_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_real def);
5349ufbx_abi ufbx_real ufbx_find_real(const ufbx_props *props, const char *name, ufbx_real def);
5350ufbx_abi ufbx_vec3 ufbx_find_vec3_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_vec3 def);
5351ufbx_abi ufbx_vec3 ufbx_find_vec3(const ufbx_props *props, const char *name, ufbx_vec3 def);
5352ufbx_abi int64_t ufbx_find_int_len(const ufbx_props *props, const char *name, size_t name_len, int64_t def);
5353ufbx_abi int64_t ufbx_find_int(const ufbx_props *props, const char *name, int64_t def);
5354ufbx_abi bool ufbx_find_bool_len(const ufbx_props *props, const char *name, size_t name_len, bool def);
5355ufbx_abi bool ufbx_find_bool(const ufbx_props *props, const char *name, bool def);
5356ufbx_abi ufbx_string ufbx_find_string_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_string def);
5357ufbx_abi ufbx_string ufbx_find_string(const ufbx_props *props, const char *name, ufbx_string def);
5358ufbx_abi ufbx_blob ufbx_find_blob_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_blob def);
5359ufbx_abi ufbx_blob ufbx_find_blob(const ufbx_props *props, const char *name, ufbx_blob def);
5360
5361// Find property in `props` with concatenated `parts[num_parts]`.
5362ufbx_abi ufbx_prop *ufbx_find_prop_concat(const ufbx_props *props, const ufbx_string *parts, size_t num_parts);
5363
5364// Get an element connected to a property.
5366
5367// Find an element connected to a property by name.
5370
5371// Find any element of type `type` in `scene` by `name`.
5372// For example if you want to find `ufbx_material` named `Mat`:
5373// (ufbx_material*)ufbx_find_element(scene, UFBX_ELEMENT_MATERIAL, "Mat");
5374ufbx_abi ufbx_element *ufbx_find_element_len(const ufbx_scene *scene, ufbx_element_type type, const char *name, size_t name_len);
5376
5377// Find node in `scene` by `name` (shorthand for `ufbx_find_element(UFBX_ELEMENT_NODE)`).
5378ufbx_abi ufbx_node *ufbx_find_node_len(const ufbx_scene *scene, const char *name, size_t name_len);
5379ufbx_abi ufbx_node *ufbx_find_node(const ufbx_scene *scene, const char *name);
5380
5381// Find an animation stack in `scene` by `name` (shorthand for `ufbx_find_element(UFBX_ELEMENT_ANIM_STACK)`)
5382ufbx_abi ufbx_anim_stack *ufbx_find_anim_stack_len(const ufbx_scene *scene, const char *name, size_t name_len);
5383ufbx_abi ufbx_anim_stack *ufbx_find_anim_stack(const ufbx_scene *scene, const char *name);
5384
5385// Find a material in `scene` by `name` (shorthand for `ufbx_find_element(UFBX_ELEMENT_MATERIAL)`).
5386ufbx_abi ufbx_material *ufbx_find_material_len(const ufbx_scene *scene, const char *name, size_t name_len);
5387ufbx_abi ufbx_material *ufbx_find_material(const ufbx_scene *scene, const char *name);
5388
5389// Find a single animated property `prop` of `element` in `layer`.
5390// Returns `NULL` if not found.
5391ufbx_abi ufbx_anim_prop *ufbx_find_anim_prop_len(const ufbx_anim_layer *layer, const ufbx_element *element, const char *prop, size_t prop_len);
5392ufbx_abi ufbx_anim_prop *ufbx_find_anim_prop(const ufbx_anim_layer *layer, const ufbx_element *element, const char *prop);
5393
5394// Find all animated properties of `element` in `layer`.
5395ufbx_abi ufbx_anim_prop_list ufbx_find_anim_props(const ufbx_anim_layer *layer, const ufbx_element *element);
5396
5397// Get a matrix that transforms normals in the same way as Autodesk software.
5398// NOTE: The resulting normals are slightly incorrect as this function deliberately
5399// inverts geometric transformation wrong. For better results use
5400// `ufbx_matrix_for_normals(&node->geometry_to_world)`.
5402
5403// Utility
5404
5405// Decompress a DEFLATE compressed buffer.
5406// Returns the decompressed size or a negative error code (see source for details).
5407// NOTE: You must supply a valid `retain` with `ufbx_inflate_retain.initialized == false`
5408// but the rest can be uninitialized.
5409ufbx_abi ptrdiff_t ufbx_inflate(void *dst, size_t dst_size, const ufbx_inflate_input *input, ufbx_inflate_retain *retain);
5410
5411// Same as `ufbx_open_file()` but compatible with the callback in `ufbx_open_file_fn`.
5412// The `user` parameter is actually not used here.
5413ufbx_abi bool ufbx_default_open_file(void *user, ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_info *info);
5414
5415// Open a `ufbx_stream` from a file.
5416// Use `path_len == SIZE_MAX` for NULL terminated string.
5417ufbx_abi bool ufbx_open_file(ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_opts *opts, ufbx_error *error);
5418ufbx_unsafe ufbx_abi bool ufbx_open_file_ctx(ufbx_stream *stream, ufbx_open_file_context ctx, const char *path, size_t path_len, const ufbx_open_file_opts *opts, ufbx_error *error);
5419
5420// NOTE: Uses the default ufbx allocator!
5421ufbx_abi bool ufbx_open_memory(ufbx_stream *stream, const void *data, size_t data_size, const ufbx_open_memory_opts *opts, ufbx_error *error);
5422ufbx_unsafe ufbx_abi bool ufbx_open_memory_ctx(ufbx_stream *stream, ufbx_open_file_context ctx, const void *data, size_t data_size, const ufbx_open_memory_opts *opts, ufbx_error *error);
5423
5424// Animation evaluation
5425
5426// Evaluate a single animation `curve` at a `time`.
5427// Returns `default_value` only if `curve == NULL` or it has no keyframes.
5429ufbx_abi ufbx_real ufbx_evaluate_curve_flags(const ufbx_anim_curve *curve, double time, ufbx_real default_value, uint32_t flags);
5430
5431// Evaluate a value from bundled animation curves.
5436
5437// Evaluate an animated property `name` from `element` at `time`.
5438// NOTE: If the property is not found it will have the flag `UFBX_PROP_FLAG_NOT_FOUND`.
5439ufbx_abi ufbx_prop ufbx_evaluate_prop_len(const ufbx_anim *anim, const ufbx_element *element, const char *name, size_t name_len, double time);
5440ufbx_abi ufbx_prop ufbx_evaluate_prop(const ufbx_anim *anim, const ufbx_element *element, const char *name, double time);
5441ufbx_abi ufbx_prop ufbx_evaluate_prop_flags_len(const ufbx_anim *anim, const ufbx_element *element, const char *name, size_t name_len, double time, uint32_t flags);
5442ufbx_abi ufbx_prop ufbx_evaluate_prop_flags(const ufbx_anim *anim, const ufbx_element *element, const char *name, double time, uint32_t flags);
5443
5444// Evaluate all _animated_ properties of `element`.
5445// HINT: This function returns an `ufbx_props` structure with the original properties as
5446// `ufbx_props.defaults`. This lets you use `ufbx_find_prop/value()` for the results.
5447ufbx_abi ufbx_props ufbx_evaluate_props(const ufbx_anim *anim, const ufbx_element *element, double time, ufbx_prop *buffer, size_t buffer_size);
5448ufbx_abi ufbx_props ufbx_evaluate_props_flags(const ufbx_anim *anim, const ufbx_element *element, double time, ufbx_prop *buffer, size_t buffer_size, uint32_t flags);
5449
5450// Flags to control `ufbx_evaluate_transform_flags()`.
5452
5453 // Ignore parent scale helper.
5455
5456 // Ignore componentwise scale.
5457 // Note that if you don't specify this, ufbx will have to potentially
5458 // evaluate the entire parent chain in the worst case.
5460
5461 // Require explicit components
5463
5464 // If `UFBX_TRANSFORM_FLAG_EXPLICIT_INCLUDES`: Evaluate `ufbx_transform.translation`.
5466 // If `UFBX_TRANSFORM_FLAG_EXPLICIT_INCLUDES`: Evaluate `ufbx_transform.rotation`.
5468 // If `UFBX_TRANSFORM_FLAG_EXPLICIT_INCLUDES`: Evaluate `ufbx_transform.scale`.
5470
5471 // Do not extrapolate keyframes.
5472 // See `UFBX_EVALUATE_FLAG_NO_EXTRAPOLATION`.
5474
5475 UFBX_FLAG_FORCE_WIDTH(UFBX_TRANSFORM_FLAGS)
5477
5478// Evaluate the animated transform of a node given a time.
5479// The returned transform is the local transform of the node (ie. relative to the parent),
5480// comparable to `ufbx_node.local_transform`.
5483
5484// Evaluate the blend shape weight of a blend channel.
5485// NOTE: Return value uses `1.0` for full weight, instead of `100.0` that the internal property `UFBX_Weight` uses.
5487ufbx_abi ufbx_real ufbx_evaluate_blend_weight_flags(const ufbx_anim *anim, const ufbx_blend_channel *channel, double time, uint32_t flags);
5488
5489// Evaluate the whole `scene` at a specific `time` in the animation `anim`.
5490// The returned scene behaves as if it had been exported at a specific time
5491// in the specified animation, except that animated elements' properties contain
5492// only the animated values, the original ones are in `props->defaults`.
5493//
5494// NOTE: The returned scene refers to the original `scene` so the original
5495// scene cannot be freed until all evaluated scenes are freed.
5496ufbx_abi ufbx_scene *ufbx_evaluate_scene(const ufbx_scene *scene, const ufbx_anim *anim, double time, const ufbx_evaluate_opts *opts, ufbx_error *error);
5497
5498// Create a custom animation descriptor.
5499// `ufbx_anim_opts` is used to specify animation layers and weights.
5500// HINT: You can also leave `ufbx_anim_opts.layer_ids[]` empty and only specify
5501// overrides to evaluate the scene with different properties or local transforms.
5502ufbx_abi ufbx_anim *ufbx_create_anim(const ufbx_scene *scene, const ufbx_anim_opts *opts, ufbx_error *error);
5503
5504// Free an animation returned by `ufbx_create_anim()`.
5506
5507// Increase the animation reference count.
5509
5510// Animation baking
5511
5512// "Bake" an animation to linearly interpolated keyframes.
5513// Composites the FBX transformation chain into quaternion rotations.
5514ufbx_abi ufbx_baked_anim *ufbx_bake_anim(const ufbx_scene *scene, const ufbx_anim *anim, const ufbx_bake_opts *opts, ufbx_error *error);
5515
5518
5521
5524
5525// Evaluate baked animation `keyframes` at `time`.
5526// Internally linearly interpolates between two adjacent keyframes.
5527// Handles stepped tangents cleanly, which is not strictly necessary for custom interpolation.
5528ufbx_abi ufbx_vec3 ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list keyframes, double time);
5529
5530// Evaluate baked animation `keyframes` at `time`.
5531// Internally spherically interpolates (`ufbx_quat_slerp()`) between two adjacent keyframes.
5532// Handles stepped tangents cleanly, which is not strictly necessary for custom interpolation.
5533ufbx_abi ufbx_quat ufbx_evaluate_baked_quat(ufbx_baked_quat_list keyframes, double time);
5534
5535// Poses
5536
5537// Retrieve the bone pose for `node`.
5538// Returns `NULL` if the pose does not contain `node`.
5540
5541// Materials
5542
5543// Find a texture for a given material FBX property.
5544ufbx_abi ufbx_texture *ufbx_find_prop_texture_len(const ufbx_material *material, const char *name, size_t name_len);
5545ufbx_abi ufbx_texture *ufbx_find_prop_texture(const ufbx_material *material, const char *name);
5546
5547// Find a texture for a given shader property.
5548ufbx_abi ufbx_string ufbx_find_shader_prop_len(const ufbx_shader *shader, const char *name, size_t name_len);
5549ufbx_abi ufbx_string ufbx_find_shader_prop(const ufbx_shader *shader, const char *name);
5550
5551// Map from a shader property to material property.
5552ufbx_abi ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings_len(const ufbx_shader *shader, const char *name, size_t name_len);
5553ufbx_abi ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings(const ufbx_shader *shader, const char *name);
5554
5555// Find an input in a shader texture.
5558
5559// Math
5560
5561// Returns `true` if `axes` forms a valid coordinate space.
5563
5564// Vector math utility functions.
5566
5567// Quaternion math utility functions.
5576
5577// Matrix math utility functions.
5581
5582// Get a matrix that can be used to transform geometry normals.
5583// NOTE: You must normalize the normals after transforming them with this matrix,
5584// eg. using `ufbx_vec3_normalize()`.
5585// NOTE: This function flips the normals if the determinant is negative.
5587
5588// Matrix transformation utilities.
5591
5592// Conversions between `ufbx_matrix` and `ufbx_transform`.
5595
5596// Skinning
5597
5598// Get a matrix representing the deformation for a single vertex.
5599// Returns `fallback` if the vertex is not skinned.
5600ufbx_abi ufbx_matrix ufbx_catch_get_skin_vertex_matrix(ufbx_panic *panic, const ufbx_skin_deformer *skin, size_t vertex, const ufbx_matrix *fallback);
5602 return ufbx_catch_get_skin_vertex_matrix(NULL, skin, vertex, fallback);
5603}
5604
5605// Resolve the index into `ufbx_blend_shape.position_offsets[]` given a vertex.
5606// Returns `UFBX_NO_INDEX` if the vertex is not included in the blend shape.
5607ufbx_abi uint32_t ufbx_get_blend_shape_offset_index(const ufbx_blend_shape *shape, size_t vertex);
5608
5609// Get the offset for a given vertex in the blend shape.
5610// Returns `ufbx_zero_vec3` if the vertex is not a included in the blend shape.
5612
5613// Get the _current_ blend offset given a blend deformer.
5614// NOTE: This depends on the current animated blend weight of the deformer.
5616
5617// Apply the blend shape with `weight` to given vertices.
5618ufbx_abi void ufbx_add_blend_shape_vertex_offsets(const ufbx_blend_shape *shape, ufbx_vec3 *vertices, size_t num_vertices, ufbx_real weight);
5619
5620// Apply the blend deformer with `weight` to given vertices.
5621// NOTE: This depends on the current animated blend weight of the deformer.
5622ufbx_abi void ufbx_add_blend_vertex_offsets(const ufbx_blend_deformer *blend, ufbx_vec3 *vertices, size_t num_vertices, ufbx_real weight);
5623
5624// Curves/surfaces
5625
5626// Low-level utility to evaluate NURBS the basis functions.
5627ufbx_abi size_t ufbx_evaluate_nurbs_basis(const ufbx_nurbs_basis *basis, ufbx_real u, ufbx_real *weights, size_t num_weights, ufbx_real *derivatives, size_t num_derivatives);
5628
5629// Evaluate a point on a NURBS curve given the parameter `u`.
5631
5632// Evaluate a point on a NURBS surface given the parameter `u` and `v`.
5634
5635// Tessellate a NURBS curve into a polyline.
5637
5638// Tessellate a NURBS surface into a mesh.
5640
5641// Free a line returned by `ufbx_tessellate_nurbs_curve()`.
5643
5644// Increase the refcount of the line.
5646
5647// Mesh Topology
5648
5649// Find the face that contains a given `index`.
5650// Returns `UFBX_NO_INDEX` if out of bounds.
5651ufbx_abi uint32_t ufbx_find_face_index(ufbx_mesh *mesh, size_t index);
5652
5653// Triangulate a mesh face, returning the number of triangles.
5654// NOTE: You need to space for `(face.num_indices - 2) * 3 - 1` indices!
5655// HINT: Using `ufbx_mesh.max_face_triangles * 3` is always safe.
5656ufbx_abi uint32_t ufbx_catch_triangulate_face(ufbx_panic *panic, uint32_t *indices, size_t num_indices, const ufbx_mesh *mesh, ufbx_face face);
5657ufbx_abi uint32_t ufbx_triangulate_face(uint32_t *indices, size_t num_indices, const ufbx_mesh *mesh, ufbx_face face);
5658
5659// Generate the half-edge representation of `mesh` to `topo[mesh->num_indices]`
5660ufbx_abi void ufbx_catch_compute_topology(ufbx_panic *panic, const ufbx_mesh *mesh, ufbx_topo_edge *topo, size_t num_topo);
5661ufbx_abi void ufbx_compute_topology(const ufbx_mesh *mesh, ufbx_topo_edge *topo, size_t num_topo);
5662
5663// Get the next/previous edge around a vertex
5664// NOTE: Does not return the half-edge on the opposite side (ie. `topo[index].twin`)
5665
5666// Get the next half-edge in `topo`.
5667ufbx_abi uint32_t ufbx_catch_topo_next_vertex_edge(ufbx_panic *panic, const ufbx_topo_edge *topo, size_t num_topo, uint32_t index);
5668ufbx_abi uint32_t ufbx_topo_next_vertex_edge(const ufbx_topo_edge *topo, size_t num_topo, uint32_t index);
5669
5670// Get the previous half-edge in `topo`.
5671ufbx_abi uint32_t ufbx_catch_topo_prev_vertex_edge(ufbx_panic *panic, const ufbx_topo_edge *topo, size_t num_topo, uint32_t index);
5672ufbx_abi uint32_t ufbx_topo_prev_vertex_edge(const ufbx_topo_edge *topo, size_t num_topo, uint32_t index);
5673
5674// Calculate a normal for a given face.
5675// The returned normal is weighted by face area.
5678
5679// Generate indices for normals from the topology.
5680// Respects smoothing groups.
5682 const ufbx_topo_edge *topo, size_t num_topo,
5683 uint32_t *normal_indices, size_t num_normal_indices, bool assume_smooth);
5685 const ufbx_topo_edge *topo, size_t num_topo,
5686 uint32_t *normal_indices, size_t num_normal_indices, bool assume_smooth);
5687
5688// Compute normals given normal indices.
5689// You can use `ufbx_generate_normal_mapping()` to generate the normal indices.
5690ufbx_abi void ufbx_catch_compute_normals(ufbx_panic *panic, const ufbx_mesh *mesh, const ufbx_vertex_vec3 *positions,
5691 const uint32_t *normal_indices, size_t num_normal_indices,
5692 ufbx_vec3 *normals, size_t num_normals);
5693ufbx_abi void ufbx_compute_normals(const ufbx_mesh *mesh, const ufbx_vertex_vec3 *positions,
5694 const uint32_t *normal_indices, size_t num_normal_indices,
5695 ufbx_vec3 *normals, size_t num_normals);
5696
5697// Subdivide a mesh using the Catmull-Clark subdivision `level` times.
5698ufbx_abi ufbx_mesh *ufbx_subdivide_mesh(const ufbx_mesh *mesh, size_t level, const ufbx_subdivide_opts *opts, ufbx_error *error);
5699
5700// Free a mesh returned from `ufbx_subdivide_mesh()` or `ufbx_tessellate_nurbs_surface()`.
5702
5703// Increase the mesh reference count.
5705
5706// Geometry caches
5707
5708// Load geometry cache information from a file.
5709// As geometry caches can be massive, this does not actually read the data, but
5710// only seeks through the files to form the metadata.
5712 const char *filename,
5713 const ufbx_geometry_cache_opts *opts, ufbx_error *error);
5715 const char *filename, size_t filename_len,
5716 const ufbx_geometry_cache_opts *opts, ufbx_error *error);
5717
5718// Free a geometry cache returned from `ufbx_load_geometry_cache()`.
5720// Increase the geometry cache reference count.
5722
5723// Read a frame from a geometry cache.
5724ufbx_abi size_t ufbx_read_geometry_cache_real(const ufbx_cache_frame *frame, ufbx_real *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts);
5725ufbx_abi size_t ufbx_read_geometry_cache_vec3(const ufbx_cache_frame *frame, ufbx_vec3 *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts);
5726// Sample the a geometry cache channel, linearly blending between adjacent frames.
5727ufbx_abi size_t ufbx_sample_geometry_cache_real(const ufbx_cache_channel *channel, double time, ufbx_real *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts);
5728ufbx_abi size_t ufbx_sample_geometry_cache_vec3(const ufbx_cache_channel *channel, double time, ufbx_vec3 *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts);
5729
5730// DOM
5731
5732// Find a DOM node given a name.
5733ufbx_abi ufbx_dom_node *ufbx_dom_find_len(const ufbx_dom_node *parent, const char *name, size_t name_len);
5734ufbx_abi ufbx_dom_node *ufbx_dom_find(const ufbx_dom_node *parent, const char *name);
5735
5736// Utility
5737
5738// Generate an index buffer for a flat vertex buffer.
5739// `streams` specifies one or more vertex data arrays, each stream must contain `num_indices` vertices.
5740// This function compacts the data within `streams` in-place, writing the deduplicated indices to `indices`.
5741ufbx_abi size_t ufbx_generate_indices(const ufbx_vertex_stream *streams, size_t num_streams, uint32_t *indices, size_t num_indices, const ufbx_allocator_opts *allocator, ufbx_error *error);
5742
5743// Thread pool
5744
5745// Run a single thread pool task.
5746// See `ufbx_thread_pool_run_fn` for more information.
5748
5749// Get or set an arbitrary user pointer for the thread pool context.
5750// `ufbx_thread_pool_get_user_ptr()` returns `NULL` if unset.
5753
5754// -- Inline API
5755
5756// Utility functions for reading geometry data for a single index.
5761
5762// Utility functions for reading geometry data for a single index.
5763ufbx_inline ufbx_real ufbx_get_vertex_real(const ufbx_vertex_real *v, size_t index) { ufbx_assert(index < v->indices.count); return v->values.data[(int32_t)v->indices.data[index]]; }
5764ufbx_inline ufbx_vec2 ufbx_get_vertex_vec2(const ufbx_vertex_vec2 *v, size_t index) { ufbx_assert(index < v->indices.count); return v->values.data[(int32_t)v->indices.data[index]]; }
5765ufbx_inline ufbx_vec3 ufbx_get_vertex_vec3(const ufbx_vertex_vec3 *v, size_t index) { ufbx_assert(index < v->indices.count); return v->values.data[(int32_t)v->indices.data[index]]; }
5766ufbx_inline ufbx_vec4 ufbx_get_vertex_vec4(const ufbx_vertex_vec4 *v, size_t index) { ufbx_assert(index < v->indices.count); return v->values.data[(int32_t)v->indices.data[index]]; }
5767
5769ufbx_inline ufbx_real ufbx_get_vertex_w_vec3(const ufbx_vertex_vec3 *v, size_t index) { ufbx_assert(index < v->indices.count); return v->values_w.count > 0 ? v->values_w.data[(int32_t)v->indices.data[index]] : 0.0f; }
5770
5771// Functions for converting an untyped `ufbx_element` to a concrete type.
5772// Returns `NULL` if the element is not that type.
5815
5816// Functions for interfacing with DOM lists
5819ufbx_abi ufbx_int32_list ufbx_dom_as_int32_list(const ufbx_dom_node *node);
5820ufbx_abi ufbx_int64_list ufbx_dom_as_int64_list(const ufbx_dom_node *node);
5821ufbx_abi ufbx_float_list ufbx_dom_as_float_list(const ufbx_dom_node *node);
5822ufbx_abi ufbx_double_list ufbx_dom_as_double_list(const ufbx_dom_node *node);
5823ufbx_abi ufbx_real_list ufbx_dom_as_real_list(const ufbx_dom_node *node);
5824ufbx_abi ufbx_blob_list ufbx_dom_as_blob_list(const ufbx_dom_node *node);
5825
5826#ifdef __cplusplus
5827}
5828#endif
5829
5830// bindgen-disable
5831
5832#if UFBX_CPP11
5833
5834struct ufbx_string_view {
5835 const char *data;
5836 size_t length;
5837
5838 ufbx_string_view() : data(nullptr), length(0) { }
5839 ufbx_string_view(const char *data_, size_t length_) : data(data_), length(length_) { }
5840 UFBX_CONVERSION_TO_IMPL(ufbx_string_view)
5841};
5842
5843ufbx_inline ufbx_scene *ufbx_load_file(ufbx_string_view filename, const ufbx_load_opts *opts, ufbx_error *error) { return ufbx_load_file_len(filename.data, filename.length, opts, error); }
5844ufbx_inline ufbx_prop *ufbx_find_prop(const ufbx_props *props, ufbx_string_view name) { return ufbx_find_prop_len(props, name.data, name.length); }
5845ufbx_inline ufbx_real ufbx_find_real(const ufbx_props *props, ufbx_string_view name, ufbx_real def) { return ufbx_find_real_len(props, name.data, name.length, def); }
5846ufbx_inline ufbx_vec3 ufbx_find_vec3(const ufbx_props *props, ufbx_string_view name, ufbx_vec3 def) { return ufbx_find_vec3_len(props, name.data, name.length, def); }
5847ufbx_inline int64_t ufbx_find_int(const ufbx_props *props, ufbx_string_view name, int64_t def) { return ufbx_find_int_len(props, name.data, name.length, def); }
5848ufbx_inline bool ufbx_find_bool(const ufbx_props *props, ufbx_string_view name, bool def) { return ufbx_find_bool_len(props, name.data, name.length, def); }
5849ufbx_inline ufbx_string ufbx_find_string(const ufbx_props *props, ufbx_string_view name, ufbx_string def) { return ufbx_find_string_len(props, name.data, name.length, def); }
5850ufbx_inline ufbx_blob ufbx_find_blob(const ufbx_props *props, ufbx_string_view name, ufbx_blob def) { return ufbx_find_blob_len(props, name.data, name.length, def); }
5851ufbx_inline ufbx_element *ufbx_find_prop_element(const ufbx_element *element, ufbx_string_view name, ufbx_element_type type) { return ufbx_find_prop_element_len(element, name.data, name.length, type); }
5852ufbx_inline ufbx_element *ufbx_find_element(const ufbx_scene *scene, ufbx_element_type type, ufbx_string_view name) { return ufbx_find_element_len(scene, type, name.data, name.length); }
5853ufbx_inline ufbx_node *ufbx_find_node(const ufbx_scene *scene, ufbx_string_view name) { return ufbx_find_node_len(scene, name.data, name.length); }
5854ufbx_inline ufbx_anim_stack *ufbx_find_anim_stack(const ufbx_scene *scene, ufbx_string_view name) { return ufbx_find_anim_stack_len(scene, name.data, name.length); }
5855ufbx_inline ufbx_material *ufbx_find_material(const ufbx_scene *scene, ufbx_string_view name) { return ufbx_find_material_len(scene, name.data, name.length); }
5856ufbx_inline ufbx_anim_prop *ufbx_find_anim_prop(const ufbx_anim_layer *layer, const ufbx_element *element, ufbx_string_view prop) { return ufbx_find_anim_prop_len(layer, element, prop.data, prop.length); }
5857ufbx_inline ufbx_prop ufbx_evaluate_prop(const ufbx_anim *anim, const ufbx_element *element, ufbx_string_view name, double time) { return ufbx_evaluate_prop_len(anim, element, name.data, name.length, time); }
5858ufbx_inline ufbx_texture *ufbx_find_prop_texture(const ufbx_material *material, ufbx_string_view name) { return ufbx_find_prop_texture_len(material, name.data, name.length); }
5859ufbx_inline ufbx_string ufbx_find_shader_prop(const ufbx_shader *shader, ufbx_string_view name) { return ufbx_find_shader_prop_len(shader, name.data, name.length); }
5860ufbx_inline ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings(const ufbx_shader *shader, ufbx_string_view name) { return ufbx_find_shader_prop_bindings_len(shader, name.data, name.length); }
5862ufbx_inline ufbx_geometry_cache *ufbx_load_geometry_cache(ufbx_string_view filename, const ufbx_geometry_cache_opts *opts, ufbx_error *error) { return ufbx_load_geometry_cache_len(filename.data, filename.length, opts, error); }
5863ufbx_inline ufbx_dom_node *ufbx_dom_find(const ufbx_dom_node *parent, ufbx_string_view name) { return ufbx_dom_find_len(parent, name.data, name.length); }
5864
5865#endif
5866
5867#if UFBX_CPP11
5868
5869template <typename T>
5870struct ufbx_type_traits { enum { valid = 0 }; };
5871
5872template<> struct ufbx_type_traits<ufbx_scene> {
5873 enum { valid = 1 };
5874 static void retain(ufbx_scene *ptr) { ufbx_retain_scene(ptr); }
5875 static void free(ufbx_scene *ptr) { ufbx_free_scene(ptr); }
5876};
5877
5878template<> struct ufbx_type_traits<ufbx_mesh> {
5879 enum { valid = 1 };
5880 static void retain(ufbx_mesh *ptr) { ufbx_retain_mesh(ptr); }
5881 static void free(ufbx_mesh *ptr) { ufbx_free_mesh(ptr); }
5882};
5883
5884template<> struct ufbx_type_traits<ufbx_line_curve> {
5885 enum { valid = 1 };
5886 static void retain(ufbx_line_curve *ptr) { ufbx_retain_line_curve(ptr); }
5887 static void free(ufbx_line_curve *ptr) { ufbx_free_line_curve(ptr); }
5888};
5889
5890template<> struct ufbx_type_traits<ufbx_geometry_cache> {
5891 enum { valid = 1 };
5892 static void retain(ufbx_geometry_cache *ptr) { ufbx_retain_geometry_cache(ptr); }
5893 static void free(ufbx_geometry_cache *ptr) { ufbx_free_geometry_cache(ptr); }
5894};
5895
5896template<> struct ufbx_type_traits<ufbx_anim> {
5897 enum { valid = 1 };
5898 static void retain(ufbx_anim *ptr) { ufbx_retain_anim(ptr); }
5899 static void free(ufbx_anim *ptr) { ufbx_free_anim(ptr); }
5900};
5901
5902template<> struct ufbx_type_traits<ufbx_baked_anim> {
5903 enum { valid = 1 };
5904 static void retain(ufbx_baked_anim *ptr) { ufbx_retain_baked_anim(ptr); }
5905 static void free(ufbx_baked_anim *ptr) { ufbx_free_baked_anim(ptr); }
5906};
5907
5908class ufbx_deleter {
5909public:
5910 template <typename T>
5911 void operator()(T *ptr) const {
5912 static_assert(ufbx_type_traits<T>::valid, "ufbx_deleter() unsupported for type");
5913 ufbx_type_traits<T>::free(ptr);
5914 }
5915};
5916
5917// RAII wrapper over refcounted ufbx types.
5918
5919// Behaves like `std::unique_ptr<T>`.
5920template <typename T>
5921class ufbx_unique_ptr {
5922 T *ptr;
5923 using traits = ufbx_type_traits<T>;
5924 static_assert(ufbx_type_traits<T>::valid, "ufbx_unique_ptr unsupported for type");
5925public:
5926 ufbx_unique_ptr() noexcept : ptr(nullptr) { }
5927 explicit ufbx_unique_ptr(T *ptr_) noexcept : ptr(ptr_) { }
5928 ufbx_unique_ptr(ufbx_unique_ptr &&ref) noexcept : ptr(ref.ptr) { ref.ptr = nullptr; }
5929 ~ufbx_unique_ptr() { traits::free(ptr); }
5930
5931 ufbx_unique_ptr &operator=(ufbx_unique_ptr &&ref) noexcept {
5932 if (&ref == this) return *this;
5933 ptr = ref.ptr;
5934 ref.ptr = nullptr;
5935 return *this;
5936 }
5937
5938 void reset(T *new_ptr=nullptr) noexcept {
5939 traits::free(ptr);
5940 ptr = new_ptr;
5941 }
5942
5943 void swap(ufbx_unique_ptr &ref) noexcept {
5944 T *tmp = ptr;
5945 ptr = ref.ptr;
5946 ref.ptr = tmp;
5947 }
5948
5949 T &operator*() const noexcept { return *ptr; }
5950 T *operator->() const noexcept { return ptr; }
5951 T *get() const noexcept { return ptr; }
5952 explicit operator bool() const noexcept { return ptr != nullptr; }
5953};
5954
5955// Behaves like `std::shared_ptr<T>` except uses ufbx's internal reference counting,
5956// so it is half the size of a standard `shared_ptr` but might be marginally slower.
5957template <typename T>
5958class ufbx_shared_ptr {
5959 T *ptr;
5960 using traits = ufbx_type_traits<T>;
5961 static_assert(ufbx_type_traits<T>::valid, "ufbx_shared_ptr unsupported for type");
5962public:
5963
5964 ufbx_shared_ptr() noexcept : ptr(nullptr) { }
5965 explicit ufbx_shared_ptr(T *ptr_) noexcept : ptr(ptr_) { }
5966 ufbx_shared_ptr(const ufbx_shared_ptr &ref) noexcept : ptr(ref.ptr) { traits::retain(ref.ptr); }
5967 ufbx_shared_ptr(ufbx_shared_ptr &&ref) noexcept : ptr(ref.ptr) { ref.ptr = nullptr; }
5968 ~ufbx_shared_ptr() { traits::free(ptr); }
5969
5970 ufbx_shared_ptr &operator=(const ufbx_shared_ptr &ref) noexcept {
5971 if (&ref == this) return *this;
5972 traits::free(ptr);
5973 traits::retain(ref.ptr);
5974 ptr = ref.ptr;
5975 return *this;
5976 }
5977
5978 ufbx_shared_ptr &operator=(ufbx_shared_ptr &&ref) noexcept {
5979 if (&ref == this) return *this;
5980 ptr = ref.ptr;
5981 ref.ptr = nullptr;
5982 return *this;
5983 }
5984
5985 void reset(T *new_ptr=nullptr) noexcept {
5986 traits::free(ptr);
5987 ptr = new_ptr;
5988 }
5989
5990 void swap(ufbx_shared_ptr &ref) noexcept {
5991 T *tmp = ptr;
5992 ptr = ref.ptr;
5993 ref.ptr = tmp;
5994 }
5995
5996 T &operator*() const noexcept { return *ptr; }
5997 T *operator->() const noexcept { return ptr; }
5998 T *get() const noexcept { return ptr; }
5999 explicit operator bool() const noexcept { return ptr != nullptr; }
6000};
6001
6002#endif
6003// bindgen-enable
6004
6005// -- Properties
6006
6007// Names of common properties in `ufbx_props`.
6008// Some of these differ from ufbx interpretations.
6009
6010// Local translation.
6011// Used by: `ufbx_node`
6012#define UFBX_Lcl_Translation "Lcl Translation"
6013
6014// Local rotation expressed in Euler degrees.
6015// Used by: `ufbx_node`
6016// The rotation order is defined by the `UFBX_RotationOrder` property.
6017#define UFBX_Lcl_Rotation "Lcl Rotation"
6018
6019// Local scaling factor, 3D vector.
6020// Used by: `ufbx_node`
6021#define UFBX_Lcl_Scaling "Lcl Scaling"
6022
6023// Euler rotation interpretation, used by `UFBX_Lcl_Rotation`.
6024// Used by: `ufbx_node`, enum value `ufbx_rotation_order`.
6025#define UFBX_RotationOrder "RotationOrder"
6026
6027// Scaling pivot: point around which scaling is performed.
6028// Used by: `ufbx_node`.
6029#define UFBX_ScalingPivot "ScalingPivot"
6030
6031// Scaling pivot: point around which rotation is performed.
6032// Used by: `ufbx_node`.
6033#define UFBX_RotationPivot "RotationPivot"
6034
6035// Scaling offset: translation added after scaling is performed.
6036// Used by: `ufbx_node`.
6037#define UFBX_ScalingOffset "ScalingOffset"
6038
6039// Rotation offset: translation added after rotation is performed.
6040// Used by: `ufbx_node`.
6041#define UFBX_RotationOffset "RotationOffset"
6042
6043// Pre-rotation: Rotation applied _after_ `UFBX_Lcl_Rotation`.
6044// Used by: `ufbx_node`.
6045// Affected by `UFBX_RotationPivot` but not `UFBX_RotationOrder`.
6046#define UFBX_PreRotation "PreRotation"
6047
6048// Post-rotation: Rotation applied _before_ `UFBX_Lcl_Rotation`.
6049// Used by: `ufbx_node`.
6050// Affected by `UFBX_RotationPivot` but not `UFBX_RotationOrder`.
6051#define UFBX_PostRotation "PostRotation"
6052
6053// Controls whether the node should be displayed or not.
6054// Used by: `ufbx_node`.
6055#define UFBX_Visibility "Visibility"
6056
6057// Weight of an animation layer in percentage (100.0 being full).
6058// Used by: `ufbx_anim_layer`.
6059#define UFBX_Weight "Weight"
6060
6061// Blend shape deformation weight (100.0 being full).
6062// Used by: `ufbx_blend_channel`.
6063#define UFBX_DeformPercent "DeformPercent"
6064
6065#if defined(_MSC_VER)
6066 #pragma warning(pop)
6067#elif defined(__clang__)
6068 #pragma clang diagnostic pop
6069#elif defined(__GNUC__)
6070 #pragma GCC diagnostic pop
6071#endif
6072
6073#endif
Definition ufbx.h:4109
size_t memory_limit
Definition ufbx.h:4114
size_t allocation_limit
Definition ufbx.h:4117
ufbx_allocator allocator
Definition ufbx.h:4111
size_t huge_threshold
Definition ufbx.h:4123
size_t max_chunk_size
Definition ufbx.h:4135
Definition ufbx.h:4100
void * user
Definition ufbx.h:4106
ufbx_free_fn * free_fn
Definition ufbx.h:4104
ufbx_alloc_fn * alloc_fn
Definition ufbx.h:4102
ufbx_realloc_fn * realloc_fn
Definition ufbx.h:4103
ufbx_free_allocator_fn * free_allocator_fn
Definition ufbx.h:4105
Definition ufbx.h:3213
ufbx_extrapolation post_extrapolation
Definition ufbx.h:3227
ufbx_props props
Definition ufbx.h:3216
double max_time
Definition ufbx.h:3235
ufbx_keyframe_list keyframes
Definition ufbx.h:3222
ufbx_real min_value
Definition ufbx.h:3230
uint32_t element_id
Definition ufbx.h:3217
ufbx_string name
Definition ufbx.h:3215
ufbx_element element
Definition ufbx.h:3214
ufbx_real max_value
Definition ufbx.h:3231
double min_time
Definition ufbx.h:3234
uint32_t typed_id
Definition ufbx.h:3218
ufbx_extrapolation pre_extrapolation
Definition ufbx.h:3225
Definition ufbx.h:3116
ufbx_element element
Definition ufbx.h:3117
ufbx_anim_value_list anim_values
Definition ufbx.h:3131
bool compose_rotation
Definition ufbx.h:3128
uint32_t _max_element_id
Definition ufbx.h:3137
ufbx_props props
Definition ufbx.h:3119
uint32_t _min_element_id
Definition ufbx.h:3136
ufbx_anim_prop_list anim_props
Definition ufbx.h:3132
uint32_t _element_id_bitmask[4]
Definition ufbx.h:3138
bool weight_is_animated
Definition ufbx.h:3125
uint32_t typed_id
Definition ufbx.h:3121
bool additive
Definition ufbx.h:3127
ufbx_real weight
Definition ufbx.h:3124
bool compose_scale
Definition ufbx.h:3129
bool blended
Definition ufbx.h:3126
uint32_t element_id
Definition ufbx.h:3120
ufbx_anim * anim
Definition ufbx.h:3134
ufbx_string name
Definition ufbx.h:3118
Definition ufbx.h:4985
uint32_t _end_zero
Definition ufbx.h:5008
ufbx_const_transform_override_list transform_overrides
Definition ufbx.h:5001
ufbx_const_uint32_list layer_ids
Definition ufbx.h:4990
ufbx_const_prop_override_desc_list prop_overrides
Definition ufbx.h:4997
ufbx_allocator_opts result_allocator
Definition ufbx.h:5006
bool ignore_connections
Definition ufbx.h:5004
ufbx_const_real_list override_layer_weights
Definition ufbx.h:4993
uint32_t _begin_zero
Definition ufbx.h:4986
Definition ufbx.h:3105
ufbx_string prop_name
Definition ufbx.h:3110
ufbx_anim_value * anim_value
Definition ufbx.h:3111
uint32_t _internal_key
Definition ufbx.h:3108
ufbx_element * element
Definition ufbx.h:3106
Definition ufbx.h:3090
ufbx_string name
Definition ufbx.h:3092
ufbx_props props
Definition ufbx.h:3093
double time_begin
Definition ufbx.h:3098
uint32_t typed_id
Definition ufbx.h:3095
ufbx_element element
Definition ufbx.h:3091
uint32_t element_id
Definition ufbx.h:3094
ufbx_anim * anim
Definition ufbx.h:3102
ufbx_anim_layer_list layers
Definition ufbx.h:3101
double time_end
Definition ufbx.h:3099
Definition ufbx.h:3141
uint32_t typed_id
Definition ufbx.h:3146
ufbx_element element
Definition ufbx.h:3142
ufbx_vec3 default_value
Definition ufbx.h:3149
uint32_t element_id
Definition ufbx.h:3145
ufbx_nullable ufbx_anim_curve * curves[3]
Definition ufbx.h:3150
ufbx_props props
Definition ufbx.h:3144
ufbx_string name
Definition ufbx.h:3143
Definition ufbx.h:3064
ufbx_real_list override_layer_weights
Definition ufbx.h:3074
ufbx_anim_layer_list layers
Definition ufbx.h:3071
double time_end
Definition ufbx.h:3068
bool ignore_connections
Definition ufbx.h:3083
double time_begin
Definition ufbx.h:3067
ufbx_prop_override_list prop_overrides
Definition ufbx.h:3077
ufbx_transform_override_list transform_overrides
Definition ufbx.h:3080
bool custom
Definition ufbx.h:3086
Definition ufbx.h:3516
ufbx_string vendor
Definition ufbx.h:3517
ufbx_string name
Definition ufbx.h:3518
ufbx_string version
Definition ufbx.h:3519
Definition ufbx.h:3410
uint32_t element_id
Definition ufbx.h:3414
ufbx_string name
Definition ufbx.h:3412
ufbx_string filename
Definition ufbx.h:3421
uint32_t typed_id
Definition ufbx.h:3415
ufbx_blob raw_relative_filename
Definition ufbx.h:3436
ufbx_props props
Definition ufbx.h:3413
ufbx_blob raw_absolute_filename
Definition ufbx.h:3433
ufbx_element element
Definition ufbx.h:3411
ufbx_blob raw_filename
Definition ufbx.h:3431
ufbx_string relative_filename
Definition ufbx.h:3426
ufbx_blob content
Definition ufbx.h:3439
ufbx_string absolute_filename
Definition ufbx.h:3423
Definition ufbx.h:3398
uint32_t element_id
Definition ufbx.h:3402
ufbx_string name
Definition ufbx.h:3400
ufbx_audio_clip_list clips
Definition ufbx.h:3407
uint32_t typed_id
Definition ufbx.h:3403
ufbx_props props
Definition ufbx.h:3401
ufbx_element element
Definition ufbx.h:3399
Definition ufbx.h:5041
uint32_t _begin_zero
Definition ufbx.h:5042
bool ignore_layer_weight_animation
Definition ufbx.h:5079
double step_custom_duration
Definition ufbx.h:5089
size_t key_reduction_passes
Definition ufbx.h:5114
double maximum_sample_rate
Definition ufbx.h:5066
double key_reduction_threshold
Definition ufbx.h:5109
ufbx_allocator_opts result_allocator
Definition ufbx.h:5045
bool trim_start_time
Definition ufbx.h:5052
size_t max_keyframe_segments
Definition ufbx.h:5083
bool key_reduction_enabled
Definition ufbx.h:5101
bool key_reduction_rotation
Definition ufbx.h:5105
uint32_t _end_zero
Definition ufbx.h:5116
double minimum_sample_rate
Definition ufbx.h:5062
bool skip_node_transforms
Definition ufbx.h:5072
ufbx_allocator_opts temp_allocator
Definition ufbx.h:5044
double step_custom_epsilon
Definition ufbx.h:5094
double resample_rate
Definition ufbx.h:5056
uint32_t evaluate_flags
Definition ufbx.h:5098
bool bake_transform_props
Definition ufbx.h:5069
bool no_resample_rotation
Definition ufbx.h:5076
ufbx_bake_step_handling step_handling
Definition ufbx.h:5086
Definition ufbx.h:4574
size_t temp_memory_used
Definition ufbx.h:4577
size_t result_allocs
Definition ufbx.h:4578
size_t temp_allocs
Definition ufbx.h:4579
size_t result_memory_used
Definition ufbx.h:4576
Definition ufbx.h:4584
ufbx_baked_anim_metadata metadata
Definition ufbx.h:4605
double key_time_max
Definition ufbx.h:4602
double playback_time_end
Definition ufbx.h:4597
double key_time_min
Definition ufbx.h:4601
double playback_duration
Definition ufbx.h:4598
double playback_time_begin
Definition ufbx.h:4596
ufbx_baked_node_list nodes
Definition ufbx.h:4590
ufbx_baked_element_list elements
Definition ufbx.h:4593
Definition ufbx.h:4565
ufbx_baked_prop_list props
Definition ufbx.h:4569
uint32_t element_id
Definition ufbx.h:4567
Definition ufbx.h:4527
bool constant_scale
Definition ufbx.h:4539
ufbx_baked_vec3_list translation_keys
Definition ufbx.h:4542
ufbx_baked_vec3_list scale_keys
Definition ufbx.h:4546
ufbx_baked_quat_list rotation_keys
Definition ufbx.h:4544
bool constant_translation
Definition ufbx.h:4535
uint32_t element_id
Definition ufbx.h:4532
uint32_t typed_id
Definition ufbx.h:4530
bool constant_rotation
Definition ufbx.h:4537
Definition ufbx.h:4553
bool constant_value
Definition ufbx.h:4557
ufbx_string name
Definition ufbx.h:4555
ufbx_baked_vec3_list keys
Definition ufbx.h:4559
Definition ufbx.h:4518
double time
Definition ufbx.h:4519
ufbx_quat value
Definition ufbx.h:4520
ufbx_baked_key_flags flags
Definition ufbx.h:4521
Definition ufbx.h:4510
double time
Definition ufbx.h:4511
ufbx_vec3 value
Definition ufbx.h:4512
ufbx_baked_key_flags flags
Definition ufbx.h:4513
Definition ufbx.h:2078
uint32_t element_id
Definition ufbx.h:2082
ufbx_props props
Definition ufbx.h:2081
ufbx_element element
Definition ufbx.h:2079
ufbx_real weight
Definition ufbx.h:2087
uint32_t typed_id
Definition ufbx.h:2083
ufbx_string name
Definition ufbx.h:2080
ufbx_blend_keyframe_list keyframes
Definition ufbx.h:2091
ufbx_nullable ufbx_blend_shape * target_shape
Definition ufbx.h:2094
Definition ufbx.h:2050
ufbx_blend_channel_list channels
Definition ufbx.h:2059
ufbx_props props
Definition ufbx.h:2053
ufbx_element element
Definition ufbx.h:2051
uint32_t element_id
Definition ufbx.h:2054
ufbx_string name
Definition ufbx.h:2052
uint32_t typed_id
Definition ufbx.h:2055
Definition ufbx.h:2063
ufbx_real effective_weight
Definition ufbx.h:2071
ufbx_real target_weight
Definition ufbx.h:2068
ufbx_blend_shape * shape
Definition ufbx.h:2065
Definition ufbx.h:2098
ufbx_string name
Definition ufbx.h:2100
size_t num_offsets
Definition ufbx.h:2108
ufbx_uint32_list offset_vertices
Definition ufbx.h:2109
ufbx_props props
Definition ufbx.h:2101
ufbx_vec3_list normal_offsets
Definition ufbx.h:2111
uint32_t typed_id
Definition ufbx.h:2103
ufbx_vec3_list position_offsets
Definition ufbx.h:2110
ufbx_element element
Definition ufbx.h:2099
ufbx_real_list offset_weights
Definition ufbx.h:2115
uint32_t element_id
Definition ufbx.h:2102
Definition ufbx.h:290
size_t size
Definition ufbx.h:292
const void * data
Definition ufbx.h:291
Definition ufbx.h:3444
ufbx_node * bone_node
Definition ufbx.h:3447
ufbx_matrix bone_to_parent
Definition ufbx.h:3455
ufbx_matrix bone_to_world
Definition ufbx.h:3450
Definition ufbx.h:1635
ufbx_real radius
Definition ufbx.h:1645
ufbx_string name
Definition ufbx.h:1637
uint32_t element_id
Definition ufbx.h:1639
ufbx_node_list instances
Definition ufbx.h:1641
ufbx_real relative_length
Definition ufbx.h:1648
bool is_root
Definition ufbx.h:1651
uint32_t typed_id
Definition ufbx.h:1640
ufbx_props props
Definition ufbx.h:1638
ufbx_element element
Definition ufbx.h:1636
Definition ufbx.h:2202
ufbx_mirror_axis mirror_axis
Definition ufbx.h:2219
ufbx_string name
Definition ufbx.h:2205
ufbx_real scale_factor
Definition ufbx.h:2222
ufbx_cache_interpretation interpretation
Definition ufbx.h:2208
ufbx_string interpretation_name
Definition ufbx.h:2212
ufbx_cache_frame_list frames
Definition ufbx.h:2216
Definition ufbx.h:2235
ufbx_string name
Definition ufbx.h:2237
uint32_t element_id
Definition ufbx.h:2239
ufbx_element element
Definition ufbx.h:2236
ufbx_string channel
Definition ufbx.h:2243
ufbx_props props
Definition ufbx.h:2238
ufbx_nullable ufbx_cache_file * file
Definition ufbx.h:2244
ufbx_nullable ufbx_cache_channel * external_channel
Definition ufbx.h:2248
ufbx_nullable ufbx_geometry_cache * external_cache
Definition ufbx.h:2247
uint32_t typed_id
Definition ufbx.h:2240
Definition ufbx.h:2251
ufbx_blob raw_absolute_filename
Definition ufbx.h:2274
ufbx_props props
Definition ufbx.h:2254
ufbx_element element
Definition ufbx.h:2252
uint32_t element_id
Definition ufbx.h:2255
ufbx_string relative_filename
Definition ufbx.h:2267
uint32_t typed_id
Definition ufbx.h:2256
ufbx_blob raw_relative_filename
Definition ufbx.h:2277
ufbx_string name
Definition ufbx.h:2253
ufbx_string filename
Definition ufbx.h:2262
ufbx_blob raw_filename
Definition ufbx.h:2272
ufbx_nullable ufbx_geometry_cache * external_cache
Definition ufbx.h:2282
ufbx_string absolute_filename
Definition ufbx.h:2264
ufbx_cache_file_format format
Definition ufbx.h:2279
Definition ufbx.h:2170
ufbx_string filename
Definition ufbx.h:2181
ufbx_cache_data_encoding data_encoding
Definition ufbx.h:2193
ufbx_real scale_factor
Definition ufbx.h:2190
uint32_t data_count
Definition ufbx.h:2195
ufbx_string channel
Definition ufbx.h:2173
uint64_t data_total_bytes
Definition ufbx.h:2197
uint64_t data_offset
Definition ufbx.h:2194
double time
Definition ufbx.h:2176
ufbx_mirror_axis mirror_axis
Definition ufbx.h:2187
ufbx_cache_data_format data_format
Definition ufbx.h:2192
uint32_t data_element_bytes
Definition ufbx.h:2196
ufbx_cache_file_format file_format
Definition ufbx.h:2184
Definition ufbx.h:1843
ufbx_node_list instances
Definition ufbx.h:1849
ufbx_string name
Definition ufbx.h:1845
uint32_t element_id
Definition ufbx.h:1847
ufbx_props props
Definition ufbx.h:1846
ufbx_element element
Definition ufbx.h:1844
uint32_t typed_id
Definition ufbx.h:1848
Definition ufbx.h:1567
ufbx_vec2 aperture_size_inch
Definition ufbx.h:1628
ufbx_real near_plane
Definition ufbx.h:1611
ufbx_aperture_mode aperture_mode
Definition ufbx.h:1623
ufbx_real aspect_ratio
Definition ufbx.h:1608
ufbx_projection_mode projection_mode
Definition ufbx.h:1577
ufbx_real orthographic_extent
Definition ufbx.h:1597
ufbx_vec2 resolution
Definition ufbx.h:1584
uint32_t element_id
Definition ufbx.h:1571
ufbx_vec2 film_size_inch
Definition ufbx.h:1627
ufbx_vec2 orthographic_size
Definition ufbx.h:1601
ufbx_coordinate_axes projection_axes
Definition ufbx.h:1619
ufbx_real squeeze_ratio
Definition ufbx.h:1629
ufbx_string name
Definition ufbx.h:1569
ufbx_vec2 projection_plane
Definition ufbx.h:1605
ufbx_element element
Definition ufbx.h:1568
ufbx_vec2 field_of_view_tan
Definition ufbx.h:1593
ufbx_aperture_format aperture_format
Definition ufbx.h:1625
ufbx_aspect_mode aspect_mode
Definition ufbx.h:1622
ufbx_node_list instances
Definition ufbx.h:1573
ufbx_vec2 field_of_view_deg
Definition ufbx.h:1588
ufbx_gate_fit gate_fit
Definition ufbx.h:1624
bool resolution_is_pixels
Definition ufbx.h:1581
ufbx_real far_plane
Definition ufbx.h:1614
uint32_t typed_id
Definition ufbx.h:1572
ufbx_props props
Definition ufbx.h:1570
ufbx_real focal_length_mm
Definition ufbx.h:1626
Definition ufbx.h:3296
ufbx_string name
Definition ufbx.h:3298
uint32_t element_id
Definition ufbx.h:3300
ufbx_props props
Definition ufbx.h:3299
ufbx_element element
Definition ufbx.h:3297
uint32_t typed_id
Definition ufbx.h:3301
Definition ufbx.h:4219
ufbx_close_memory_fn * fn
Definition ufbx.h:4220
void * user
Definition ufbx.h:4221
Definition ufbx.h:1087
ufbx_string name
Definition ufbx.h:1088
ufbx_vertex_vec4 vertex_color
Definition ufbx.h:1092
uint32_t index
Definition ufbx.h:1089
Definition ufbx.h:749
ufbx_element * src
Definition ufbx.h:750
ufbx_string dst_prop
Definition ufbx.h:753
ufbx_string src_prop
Definition ufbx.h:752
ufbx_element * dst
Definition ufbx.h:751
Definition ufbx.h:3323
ufbx_transform transform
Definition ufbx.h:3326
ufbx_real weight
Definition ufbx.h:3325
ufbx_node * node
Definition ufbx.h:3324
Definition ufbx.h:3354
ufbx_constraint_target_list targets
Definition ufbx.h:3370
ufbx_vec3 ik_pole_vector
Definition ufbx.h:3393
ufbx_string name
Definition ufbx.h:3356
ufbx_nullable ufbx_node * node
Definition ufbx.h:3367
ufbx_props props
Definition ufbx.h:3357
uint32_t typed_id
Definition ufbx.h:3359
bool active
Definition ufbx.h:3374
ufbx_vec3 aim_up_vector
Definition ufbx.h:3388
ufbx_constraint_type type
Definition ufbx.h:3363
ufbx_constraint_aim_up_type aim_up_type
Definition ufbx.h:3386
ufbx_nullable ufbx_node * ik_end_node
Definition ufbx.h:3392
bool constrain_scale[3]
Definition ufbx.h:3379
ufbx_element element
Definition ufbx.h:3355
ufbx_string type_name
Definition ufbx.h:3364
ufbx_nullable ufbx_node * ik_effector
Definition ufbx.h:3391
bool constrain_translation[3]
Definition ufbx.h:3377
ufbx_real weight
Definition ufbx.h:3373
bool constrain_rotation[3]
Definition ufbx.h:3378
uint32_t element_id
Definition ufbx.h:3358
ufbx_transform transform_offset
Definition ufbx.h:3382
ufbx_nullable ufbx_node * aim_up_node
Definition ufbx.h:3387
ufbx_vec3 aim_vector
Definition ufbx.h:3385
Definition ufbx.h:1560
ufbx_coordinate_axis right
Definition ufbx.h:1561
ufbx_coordinate_axis up
Definition ufbx.h:1562
ufbx_coordinate_axis front
Definition ufbx.h:1563
Definition ufbx.h:4035
ufbx_vec3 derivative
Definition ufbx.h:4038
bool valid
Definition ufbx.h:4036
ufbx_vec3 position
Definition ufbx.h:4037
Definition ufbx.h:3241
bool frozen
Definition ufbx.h:3254
bool visible
Definition ufbx.h:3253
ufbx_node_list nodes
Definition ufbx.h:3250
uint32_t typed_id
Definition ufbx.h:3246
ufbx_props props
Definition ufbx.h:3244
ufbx_element element
Definition ufbx.h:3242
ufbx_string name
Definition ufbx.h:3243
uint32_t element_id
Definition ufbx.h:3245
ufbx_vec3 ui_color
Definition ufbx.h:3256
Definition ufbx.h:435
ufbx_string name
Definition ufbx.h:436
ufbx_dom_node_list children
Definition ufbx.h:437
ufbx_dom_value_list values
Definition ufbx.h:438
Definition ufbx.h:424
int64_t value_int
Definition ufbx.h:428
ufbx_string value_str
Definition ufbx.h:426
double value_float
Definition ufbx.h:429
ufbx_blob value_blob
Definition ufbx.h:427
ufbx_dom_value_type type
Definition ufbx.h:425
Definition ufbx.h:1099
uint32_t a
Definition ufbx.h:1101
uint32_t indices[2]
Definition ufbx.h:1102
uint32_t b
Definition ufbx.h:1101
Definition ufbx.h:763
ufbx_string name
Definition ufbx.h:764
ufbx_connection_list connections_src
Definition ufbx.h:770
uint32_t typed_id
Definition ufbx.h:767
ufbx_props props
Definition ufbx.h:765
ufbx_scene * scene
Definition ufbx.h:773
uint32_t element_id
Definition ufbx.h:766
ufbx_nullable ufbx_dom_node * dom_node
Definition ufbx.h:772
ufbx_connection_list connections_dst
Definition ufbx.h:771
ufbx_node_list instances
Definition ufbx.h:768
ufbx_element_type type
Definition ufbx.h:769
Definition ufbx.h:1656
ufbx_props props
Definition ufbx.h:1659
ufbx_string name
Definition ufbx.h:1658
uint32_t element_id
Definition ufbx.h:1660
ufbx_node_list instances
Definition ufbx.h:1662
ufbx_element element
Definition ufbx.h:1657
uint32_t typed_id
Definition ufbx.h:1661
Definition ufbx.h:4250
ufbx_string description
Definition ufbx.h:4253
uint32_t source_line
Definition ufbx.h:4251
ufbx_string function
Definition ufbx.h:4252
Definition ufbx.h:4350
ufbx_error_type type
Definition ufbx.h:4353
ufbx_string description
Definition ufbx.h:4356
char info[UFBX_ERROR_INFO_LENGTH]
Definition ufbx.h:4366
size_t info_length
Definition ufbx.h:4365
ufbx_error_frame stack[UFBX_ERROR_STACK_MAX_DEPTH]
Definition ufbx.h:4361
uint32_t stack_size
Definition ufbx.h:4360
Definition ufbx.h:4942
bool load_external_files
Definition ufbx.h:4956
bool evaluate_skinning
Definition ufbx.h:4948
uint32_t evaluate_flags
Definition ufbx.h:4953
ufbx_allocator_opts temp_allocator
Definition ufbx.h:4945
bool evaluate_caches
Definition ufbx.h:4949
ufbx_allocator_opts result_allocator
Definition ufbx.h:4946
uint32_t _begin_zero
Definition ufbx.h:4943
uint32_t _end_zero
Definition ufbx.h:4961
ufbx_open_file_cb open_file_cb
Definition ufbx.h:4959
Definition ufbx.h:3177
int32_t repeat_count
Definition ufbx.h:3182
ufbx_extrapolation_mode mode
Definition ufbx.h:3178
Definition ufbx.h:1142
int32_t id
Definition ufbx.h:1143
ufbx_string name
Definition ufbx.h:1144
Definition ufbx.h:1113
uint32_t index_begin
Definition ufbx.h:1114
uint32_t num_indices
Definition ufbx.h:1115
Definition ufbx.h:5224
bool additive
Definition ufbx.h:5230
uint32_t _end_zero
Definition ufbx.h:5237
bool ignore_transform
Definition ufbx.h:5235
uint32_t _begin_zero
Definition ufbx.h:5225
ufbx_open_file_cb open_file_cb
Definition ufbx.h:5228
ufbx_real weight
Definition ufbx.h:5232
bool use_weight
Definition ufbx.h:5231
Definition ufbx.h:5198
ufbx_open_file_cb open_file_cb
Definition ufbx.h:5205
ufbx_allocator_opts result_allocator
Definition ufbx.h:5202
double frames_per_second
Definition ufbx.h:5208
ufbx_allocator_opts temp_allocator
Definition ufbx.h:5201
uint32_t _end_zero
Definition ufbx.h:5219
ufbx_real scale_factor
Definition ufbx.h:5217
ufbx_mirror_axis mirror_axis
Definition ufbx.h:5211
bool use_scale_factor
Definition ufbx.h:5214
uint32_t _begin_zero
Definition ufbx.h:5199
Definition ufbx.h:2228
ufbx_cache_channel_list channels
Definition ufbx.h:2230
ufbx_string root_filename
Definition ufbx.h:2229
ufbx_cache_frame_list frames
Definition ufbx.h:2231
ufbx_string_list extra_info
Definition ufbx.h:2232
Definition ufbx.h:4410
size_t buffer_size
Definition ufbx.h:4420
void * read_user
Definition ufbx.h:4424
uint64_t progress_size_before
Definition ufbx.h:4431
uint64_t progress_size_after
Definition ufbx.h:4432
bool no_checksum
Definition ufbx.h:4438
uint64_t progress_interval_hint
Definition ufbx.h:4428
size_t internal_fast_bits
Definition ufbx.h:4441
const void * data
Definition ufbx.h:4415
ufbx_read_fn * read_fn
Definition ufbx.h:4423
ufbx_progress_cb progress_cb
Definition ufbx.h:4427
size_t total_size
Definition ufbx.h:4412
bool no_header
Definition ufbx.h:4435
void * buffer
Definition ufbx.h:4419
size_t data_size
Definition ufbx.h:4416
Definition ufbx.h:4446
bool initialized
Definition ufbx.h:4447
uint64_t data[1024]
Definition ufbx.h:4448
Definition ufbx.h:3203
double time
Definition ufbx.h:3204
ufbx_tangent right
Definition ufbx.h:3208
ufbx_interpolation interpolation
Definition ufbx.h:3206
ufbx_tangent left
Definition ufbx.h:3207
ufbx_real value
Definition ufbx.h:3205
Definition ufbx.h:1424
ufbx_props props
Definition ufbx.h:1427
ufbx_real intensity
Definition ufbx.h:1437
ufbx_real inner_angle
Definition ufbx.h:1446
bool cast_shadows
Definition ufbx.h:1450
ufbx_light_type type
Definition ufbx.h:1443
bool cast_light
Definition ufbx.h:1449
ufbx_real outer_angle
Definition ufbx.h:1447
ufbx_vec3 local_direction
Definition ufbx.h:1440
ufbx_light_area_shape area_shape
Definition ufbx.h:1445
ufbx_string name
Definition ufbx.h:1426
ufbx_node_list instances
Definition ufbx.h:1430
ufbx_light_decay decay
Definition ufbx.h:1444
ufbx_element element
Definition ufbx.h:1425
uint32_t element_id
Definition ufbx.h:1428
uint32_t typed_id
Definition ufbx.h:1429
ufbx_vec3 color
Definition ufbx.h:1436
Definition ufbx.h:1676
uint32_t element_id
Definition ufbx.h:1680
ufbx_vec3 color
Definition ufbx.h:1685
ufbx_string name
Definition ufbx.h:1678
ufbx_vec3_list control_points
Definition ufbx.h:1687
uint32_t typed_id
Definition ufbx.h:1681
ufbx_props props
Definition ufbx.h:1679
ufbx_line_segment_list segments
Definition ufbx.h:1690
bool from_tessellated_nurbs
Definition ufbx.h:1693
ufbx_element element
Definition ufbx.h:1677
ufbx_node_list instances
Definition ufbx.h:1682
ufbx_uint32_list point_indices
Definition ufbx.h:1688
Definition ufbx.h:1669
uint32_t index_begin
Definition ufbx.h:1670
uint32_t num_indices
Definition ufbx.h:1671
Definition ufbx.h:4690
uint32_t node_depth_limit
Definition ufbx.h:4785
bool allow_empty_faces
Definition ufbx.h:4769
ufbx_coordinate_axes target_light_axes
Definition ufbx.h:4855
ufbx_allocator_opts result_allocator
Definition ufbx.h:4694
bool ignore_all_content
Definition ufbx.h:4701
ufbx_coordinate_axes target_camera_axes
Definition ufbx.h:4850
ufbx_string geometry_transform_helper_name
Definition ufbx.h:4859
ufbx_geometry_transform_handling geometry_transform_handling
Definition ufbx.h:4811
bool normalize_normals
Definition ufbx.h:4866
size_t file_format_lookahead
Definition ufbx.h:4893
bool skip_mesh_parts
Definition ufbx.h:4726
ufbx_unicode_error_handling unicode_error_handling
Definition ufbx.h:4879
bool use_blender_pbr_material
Definition ufbx.h:4735
bool ignore_embedded
Definition ufbx.h:4700
bool allow_nodes_out_of_root
Definition ufbx.h:4762
ufbx_index_error_handling index_error_handling
Definition ufbx.h:4753
bool ignore_animation
Definition ufbx.h:4699
ufbx_inherit_mode_handling inherit_mode_handling
Definition ufbx.h:4815
bool clean_skin_weights
Definition ufbx.h:4729
ufbx_open_file_cb open_file_cb
Definition ufbx.h:4807
bool load_external_files
Definition ufbx.h:4716
ufbx_pivot_handling pivot_handling
Definition ufbx.h:4823
ufbx_space_conversion space_conversion
Definition ufbx.h:4819
double key_clamp_threshold
Definition ufbx.h:4876
bool obj_merge_groups
Definition ufbx.h:4913
ufbx_blob obj_mtl_data
Definition ufbx.h:4925
ufbx_string scale_helper_name
Definition ufbx.h:4863
bool use_root_transform
Definition ufbx.h:4872
ufbx_real target_unit_meters
Definition ufbx.h:4845
bool evaluate_caches
Definition ufbx.h:4704
char path_separator
Definition ufbx.h:4779
bool retain_vertex_attrib_w
Definition ufbx.h:4883
ufbx_string filename
Definition ufbx.h:4796
bool retain_dom
Definition ufbx.h:4886
bool evaluate_skinning
Definition ufbx.h:4703
bool no_format_from_extension
Definition ufbx.h:4901
bool strict
Definition ufbx.h:4741
bool obj_split_groups
Definition ufbx.h:4916
ufbx_blob raw_filename
Definition ufbx.h:4800
ufbx_coordinate_axes target_axes
Definition ufbx.h:4841
uint32_t _end_zero
Definition ufbx.h:4937
ufbx_real obj_unit_meters
Definition ufbx.h:4930
bool normalize_tangents
Definition ufbx.h:4869
bool ignore_missing_external_files
Definition ufbx.h:4719
size_t read_buffer_size
Definition ufbx.h:4791
bool allow_missing_vertex_position
Definition ufbx.h:4766
bool no_format_from_content
Definition ufbx.h:4896
ufbx_transform root_transform
Definition ufbx.h:4873
bool force_single_thread_ascii_parsing
Definition ufbx.h:4746
uint64_t file_size_estimate
Definition ufbx.h:4788
bool skip_skin_vertices
Definition ufbx.h:4723
ufbx_file_format file_format
Definition ufbx.h:4889
bool connect_broken_elements
Definition ufbx.h:4758
uint32_t _begin_zero
Definition ufbx.h:4691
bool disable_quirks
Definition ufbx.h:4738
ufbx_thread_opts thread_opts
Definition ufbx.h:4695
ufbx_allocator_opts temp_allocator
Definition ufbx.h:4693
bool handedness_conversion_retain_winding
Definition ufbx.h:4832
bool obj_search_mtl_by_filename
Definition ufbx.h:4907
bool reverse_winding
Definition ufbx.h:4837
uint64_t progress_interval_hint
Definition ufbx.h:4804
ufbx_mirror_axis handedness_conversion_axis
Definition ufbx.h:4829
ufbx_unsafe bool allow_unsafe
Definition ufbx.h:4750
ufbx_string obj_mtl_path
Definition ufbx.h:4922
bool pivot_handling_retain_empties
Definition ufbx.h:4826
ufbx_progress_cb progress_cb
Definition ufbx.h:4803
bool generate_missing_normals
Definition ufbx.h:4773
bool ignore_geometry
Definition ufbx.h:4698
bool open_main_file_with_default
Definition ufbx.h:4776
ufbx_coordinate_axes obj_axes
Definition ufbx.h:4935
bool obj_merge_objects
Definition ufbx.h:4910
Definition ufbx.h:1908
ufbx_node_list instances
Definition ufbx.h:1914
ufbx_string name
Definition ufbx.h:1910
ufbx_real distance_limit_min
Definition ufbx.h:1929
ufbx_props props
Definition ufbx.h:1911
bool ignore_parent_transform
Definition ufbx.h:1924
bool use_distance_limit
Definition ufbx.h:1928
bool relative_distances
Definition ufbx.h:1918
ufbx_element element
Definition ufbx.h:1909
ufbx_lod_level_list lod_levels
Definition ufbx.h:1921
uint32_t element_id
Definition ufbx.h:1912
uint32_t typed_id
Definition ufbx.h:1913
ufbx_real distance_limit_max
Definition ufbx.h:1930
Definition ufbx.h:1890
ufbx_lod_display display
Definition ufbx.h:1900
ufbx_real distance
Definition ufbx.h:1895
Definition ufbx.h:1864
ufbx_marker_type type
Definition ufbx.h:1874
ufbx_node_list instances
Definition ufbx.h:1870
uint32_t element_id
Definition ufbx.h:1868
ufbx_string name
Definition ufbx.h:1866
ufbx_props props
Definition ufbx.h:1867
uint32_t typed_id
Definition ufbx.h:1869
ufbx_element element
Definition ufbx.h:1865
Definition ufbx.h:2513
ufbx_material_map emission_factor
Definition ufbx.h:2526
ufbx_material_map bump_factor
Definition ufbx.h:2532
ufbx_material_map ambient_factor
Definition ufbx.h:2528
ufbx_material_map bump
Definition ufbx.h:2531
ufbx_material_map specular_factor
Definition ufbx.h:2519
ufbx_material_map reflection_factor
Definition ufbx.h:2522
ufbx_material_map normal_map
Definition ufbx.h:2530
ufbx_material_map specular_exponent
Definition ufbx.h:2521
ufbx_material_map vector_displacement
Definition ufbx.h:2536
ufbx_material_map diffuse_color
Definition ufbx.h:2518
ufbx_material_map transparency_color
Definition ufbx.h:2525
ufbx_material_map displacement
Definition ufbx.h:2534
ufbx_material_map diffuse_factor
Definition ufbx.h:2517
ufbx_material_map vector_displacement_factor
Definition ufbx.h:2535
ufbx_material_map displacement_factor
Definition ufbx.h:2533
ufbx_material_map ambient_color
Definition ufbx.h:2529
ufbx_material_map emission_color
Definition ufbx.h:2527
ufbx_material_map specular_color
Definition ufbx.h:2520
ufbx_material_map reflection_color
Definition ufbx.h:2523
ufbx_material_map transparency_factor
Definition ufbx.h:2524
ufbx_material_map maps[UFBX_MATERIAL_FBX_MAP_COUNT]
Definition ufbx.h:2515
Definition ufbx.h:2323
bool is_explicit
Definition ufbx.h:2330
bool enabled
Definition ufbx.h:2327
Definition ufbx.h:2605
ufbx_material_feature_info unlit
Definition ufbx.h:2620
ufbx_material_feature_info opacity
Definition ufbx.h:2617
ufbx_material_feature_info matte
Definition ufbx.h:2619
ufbx_material_feature_info ior
Definition ufbx.h:2621
ufbx_material_feature_info emission
Definition ufbx.h:2613
ufbx_material_feature_info specular
Definition ufbx.h:2612
ufbx_material_feature_info sheen
Definition ufbx.h:2616
ufbx_material_feature_info thin_walled
Definition ufbx.h:2624
ufbx_material_feature_info roughness_as_glossiness
Definition ufbx.h:2629
ufbx_material_feature_info coat_roughness_as_glossiness
Definition ufbx.h:2630
ufbx_material_feature_info caustics
Definition ufbx.h:2625
ufbx_material_feature_info pbr
Definition ufbx.h:2609
ufbx_material_feature_info transmission_roughness
Definition ufbx.h:2623
ufbx_material_feature_info double_sided
Definition ufbx.h:2628
ufbx_material_feature_info ambient_occlusion
Definition ufbx.h:2618
ufbx_material_feature_info features[UFBX_MATERIAL_FEATURE_COUNT]
Definition ufbx.h:2607
ufbx_material_feature_info transmission_roughness_as_glossiness
Definition ufbx.h:2631
ufbx_material_feature_info diffuse_roughness
Definition ufbx.h:2622
ufbx_material_feature_info coat
Definition ufbx.h:2615
ufbx_material_feature_info exit_to_background
Definition ufbx.h:2626
ufbx_material_feature_info metalness
Definition ufbx.h:2610
ufbx_material_feature_info transmission
Definition ufbx.h:2614
ufbx_material_feature_info internal_reflections
Definition ufbx.h:2627
ufbx_material_feature_info diffuse
Definition ufbx.h:2611
Definition ufbx.h:2288
ufbx_real value_real
Definition ufbx.h:2294
ufbx_nullable ufbx_texture * texture
Definition ufbx.h:2303
bool feature_disabled
Definition ufbx.h:2315
bool has_value
Definition ufbx.h:2308
ufbx_vec2 value_vec2
Definition ufbx.h:2295
ufbx_vec3 value_vec3
Definition ufbx.h:2296
int64_t value_int
Definition ufbx.h:2299
uint8_t value_components
Definition ufbx.h:2318
bool texture_enabled
Definition ufbx.h:2312
ufbx_vec4 value_vec4
Definition ufbx.h:2297
Definition ufbx.h:2541
ufbx_material_map thin_film_thickness
Definition ufbx.h:2585
ufbx_material_map subsurface_scale
Definition ufbx.h:2568
ufbx_material_map coat_affect_base_roughness
Definition ufbx.h:2583
ufbx_material_map diffuse_roughness
Definition ufbx.h:2549
ufbx_material_map specular_rotation
Definition ufbx.h:2554
ufbx_material_map transmission_scatter
Definition ufbx.h:2558
ufbx_material_map indirect_diffuse
Definition ufbx.h:2590
ufbx_material_map base_color
Definition ufbx.h:2546
ufbx_material_map transmission_enable_in_aov
Definition ufbx.h:2564
ufbx_material_map maps[UFBX_MATERIAL_PBR_MAP_COUNT]
Definition ufbx.h:2543
ufbx_material_map transmission_priority
Definition ufbx.h:2563
ufbx_material_map normal_map
Definition ufbx.h:2592
ufbx_material_map subsurface_radius
Definition ufbx.h:2567
ufbx_material_map subsurface_tint_color
Definition ufbx.h:2570
ufbx_material_map coat_affect_base_color
Definition ufbx.h:2582
ufbx_material_map transmission_roughness
Definition ufbx.h:2561
ufbx_material_map coat_rotation
Definition ufbx.h:2580
ufbx_material_map subsurface_color
Definition ufbx.h:2566
ufbx_material_map specular_factor
Definition ufbx.h:2550
ufbx_material_map coat_roughness
Definition ufbx.h:2577
ufbx_material_map thin_film_ior
Definition ufbx.h:2586
ufbx_material_map emission_color
Definition ufbx.h:2588
ufbx_material_map specular_color
Definition ufbx.h:2551
ufbx_material_map opacity
Definition ufbx.h:2589
ufbx_material_map matte_color
Definition ufbx.h:2596
ufbx_material_map displacement_map
Definition ufbx.h:2594
ufbx_material_map subsurface_factor
Definition ufbx.h:2565
ufbx_material_map transmission_factor
Definition ufbx.h:2555
ufbx_material_map transmission_color
Definition ufbx.h:2556
ufbx_material_map sheen_color
Definition ufbx.h:2573
ufbx_material_map tangent_map
Definition ufbx.h:2593
ufbx_material_map sheen_roughness
Definition ufbx.h:2574
ufbx_material_map transmission_depth
Definition ufbx.h:2557
ufbx_material_map coat_glossiness
Definition ufbx.h:2599
ufbx_material_map specular_ior
Definition ufbx.h:2552
ufbx_material_map transmission_dispersion
Definition ufbx.h:2560
ufbx_material_map transmission_extra_roughness
Definition ufbx.h:2562
ufbx_material_map metalness
Definition ufbx.h:2548
ufbx_material_map sheen_factor
Definition ufbx.h:2572
ufbx_material_map base_factor
Definition ufbx.h:2545
ufbx_material_map coat_factor
Definition ufbx.h:2575
ufbx_material_map matte_factor
Definition ufbx.h:2595
ufbx_material_map coat_color
Definition ufbx.h:2576
ufbx_material_map coat_anisotropy
Definition ufbx.h:2579
ufbx_material_map emission_factor
Definition ufbx.h:2587
ufbx_material_map subsurface_type
Definition ufbx.h:2571
ufbx_material_map roughness
Definition ufbx.h:2547
ufbx_material_map coat_ior
Definition ufbx.h:2578
ufbx_material_map thin_film_factor
Definition ufbx.h:2584
ufbx_material_map indirect_specular
Definition ufbx.h:2591
ufbx_material_map transmission_scatter_anisotropy
Definition ufbx.h:2559
ufbx_material_map transmission_glossiness
Definition ufbx.h:2600
ufbx_material_map glossiness
Definition ufbx.h:2598
ufbx_material_map specular_anisotropy
Definition ufbx.h:2553
ufbx_material_map coat_normal
Definition ufbx.h:2581
ufbx_material_map ambient_occlusion
Definition ufbx.h:2597
ufbx_material_map subsurface_anisotropy
Definition ufbx.h:2569
Definition ufbx.h:2335
ufbx_string material_prop
Definition ufbx.h:2336
ufbx_string shader_prop
Definition ufbx.h:2337
ufbx_texture * texture
Definition ufbx.h:2340
Definition ufbx.h:2638
ufbx_nullable ufbx_shader * shader
Definition ufbx.h:2659
ufbx_string shader_prop_prefix
Definition ufbx.h:2666
ufbx_string shading_model_name
Definition ufbx.h:2660
ufbx_shader_type shader_type
Definition ufbx.h:2658
ufbx_props props
Definition ufbx.h:2641
ufbx_material_fbx_maps fbx
Definition ufbx.h:2648
ufbx_material_pbr_maps pbr
Definition ufbx.h:2652
ufbx_string name
Definition ufbx.h:2640
ufbx_material_texture_list textures
Definition ufbx.h:2670
ufbx_material_features features
Definition ufbx.h:2655
ufbx_element element
Definition ufbx.h:2639
uint32_t element_id
Definition ufbx.h:2642
uint32_t typed_id
Definition ufbx.h:2643
Definition ufbx.h:367
ufbx_real m23
Definition ufbx.h:373
ufbx_real m12
Definition ufbx.h:372
ufbx_real m20
Definition ufbx.h:370
ufbx_real m03
Definition ufbx.h:373
ufbx_real m11
Definition ufbx.h:371
ufbx_vec3 cols[4]
Definition ufbx.h:375
ufbx_real m13
Definition ufbx.h:373
ufbx_real m22
Definition ufbx.h:372
ufbx_real m01
Definition ufbx.h:371
ufbx_real m10
Definition ufbx.h:370
ufbx_real m00
Definition ufbx.h:370
ufbx_real m21
Definition ufbx.h:371
ufbx_real m02
Definition ufbx.h:372
ufbx_real v[12]
Definition ufbx.h:376
Definition ufbx.h:1121
uint32_t index
Definition ufbx.h:1124
ufbx_uint32_list face_indices
Definition ufbx.h:1136
size_t num_point_faces
Definition ufbx.h:1131
size_t num_empty_faces
Definition ufbx.h:1130
size_t num_triangles
Definition ufbx.h:1128
size_t num_faces
Definition ufbx.h:1127
size_t num_line_faces
Definition ufbx.h:1132
Definition ufbx.h:1257
ufbx_subdivision_boundary subdivision_uv_boundary
Definition ufbx.h:1362
bool reversed_winding
Definition ufbx.h:1365
ufbx_vertex_vec3 vertex_position
Definition ufbx.h:1310
ufbx_vertex_vec2 vertex_uv
Definition ufbx.h:1312
size_t num_point_faces
Definition ufbx.h:1280
ufbx_element element
Definition ufbx.h:1258
uint32_t subdivision_preview_levels
Definition ufbx.h:1358
ufbx_subdivision_display_mode subdivision_display_mode
Definition ufbx.h:1360
size_t num_faces
Definition ufbx.h:1270
uint32_t element_id
Definition ufbx.h:1261
ufbx_uint32_list face_material
Definition ufbx.h:1286
size_t num_empty_faces
Definition ufbx.h:1279
ufbx_vertex_real vertex_crease
Definition ufbx.h:1316
ufbx_blend_deformer_list blend_deformers
Definition ufbx.h:1353
bool skinned_is_local
Definition ufbx.h:1347
uint32_t subdivision_render_levels
Definition ufbx.h:1359
ufbx_edge_list edges
Definition ufbx.h:1291
bool generated_normals
Definition ufbx.h:1370
ufbx_mesh_part_list material_parts
Definition ufbx.h:1333
ufbx_vertex_vec3 skinned_normal
Definition ufbx.h:1349
ufbx_uv_set_list uv_sets
Definition ufbx.h:1320
ufbx_bool_list face_smoothing
Definition ufbx.h:1285
ufbx_face_list faces
Definition ufbx.h:1284
ufbx_subdivision_boundary subdivision_boundary
Definition ufbx.h:1361
bool from_tessellated_nurbs
Definition ufbx.h:1377
ufbx_cache_deformer_list cache_deformers
Definition ufbx.h:1354
ufbx_string name
Definition ufbx.h:1259
ufbx_nullable ufbx_subdivision_result * subdivision_result
Definition ufbx.h:1374
ufbx_material_list materials
Definition ufbx.h:1326
size_t num_edges
Definition ufbx.h:1275
ufbx_mesh_part_list face_group_parts
Definition ufbx.h:1336
ufbx_vertex_vec3 vertex_tangent
Definition ufbx.h:1313
size_t num_indices
Definition ufbx.h:1269
ufbx_uint32_list material_part_usage_order
Definition ufbx.h:1341
ufbx_vertex_vec3 skinned_position
Definition ufbx.h:1348
ufbx_uint32_list vertex_indices
Definition ufbx.h:1298
uint32_t typed_id
Definition ufbx.h:1262
ufbx_props props
Definition ufbx.h:1260
ufbx_real_list edge_crease
Definition ufbx.h:1293
ufbx_color_set_list color_sets
Definition ufbx.h:1321
ufbx_node_list instances
Definition ufbx.h:1263
ufbx_vertex_vec4 vertex_color
Definition ufbx.h:1315
ufbx_bool_list face_hole
Definition ufbx.h:1288
ufbx_vertex_vec3 vertex_bitangent
Definition ufbx.h:1314
ufbx_uint32_list face_group
Definition ufbx.h:1287
size_t num_triangles
Definition ufbx.h:1271
ufbx_uint32_list vertex_first_index
Definition ufbx.h:1302
size_t num_line_faces
Definition ufbx.h:1281
size_t max_face_triangles
Definition ufbx.h:1277
size_t num_vertices
Definition ufbx.h:1268
ufbx_vertex_vec3 vertex_normal
Definition ufbx.h:1311
bool subdivision_evaluated
Definition ufbx.h:1373
ufbx_face_group_list face_groups
Definition ufbx.h:1329
ufbx_bool_list edge_visibility
Definition ufbx.h:1294
ufbx_skin_deformer_list skin_deformers
Definition ufbx.h:1352
ufbx_element_list all_deformers
Definition ufbx.h:1355
ufbx_vec3_list vertices
Definition ufbx.h:1299
ufbx_bool_list edge_smoothing
Definition ufbx.h:1292
Definition ufbx.h:3477
uint32_t element_id
Definition ufbx.h:3481
ufbx_element element
Definition ufbx.h:3478
uint32_t typed_id
Definition ufbx.h:3482
ufbx_props props
Definition ufbx.h:3480
ufbx_string name
Definition ufbx.h:3479
Definition ufbx.h:3754
ufbx_string creator
Definition ufbx.h:3790
uint32_t version
Definition ufbx.h:3765
ufbx_string filename
Definition ufbx.h:3793
ufbx_string original_file_path
Definition ufbx.h:3830
int64_t ktime_second
Definition ufbx.h:3828
ufbx_real root_scale
Definition ufbx.h:3842
bool is_unsafe
Definition ufbx.h:3784
ufbx_real ortho_size_unit
Definition ufbx.h:3826
ufbx_blob raw_filename
Definition ufbx.h:3796
bool animation_ignored
Definition ufbx.h:3810
bool geometry_ignored
Definition ufbx.h:3809
ufbx_mirror_axis mirror_axis
Definition ufbx.h:3846
bool embedded_ignored
Definition ufbx.h:3811
bool big_endian
Definition ufbx.h:3791
ufbx_application latest_application
Definition ufbx.h:3805
bool bone_prop_limb_length_relative
Definition ufbx.h:3824
bool may_contain_broken_elements
Definition ufbx.h:3780
size_t temp_memory_used
Definition ufbx.h:3816
ufbx_quat root_rotation
Definition ufbx.h:3841
bool ascii
Definition ufbx.h:3762
ufbx_inherit_mode_handling inherit_mode_handling
Definition ufbx.h:3836
size_t max_face_triangles
Definition ufbx.h:3813
size_t num_shader_textures
Definition ufbx.h:3821
size_t result_memory_used
Definition ufbx.h:3815
bool may_contain_no_index
Definition ufbx.h:3772
ufbx_geometry_transform_handling geometry_transform_handling
Definition ufbx.h:3835
size_t temp_allocs
Definition ufbx.h:3818
ufbx_thumbnail thumbnail
Definition ufbx.h:3807
ufbx_space_conversion space_conversion
Definition ufbx.h:3834
ufbx_string relative_root
Definition ufbx.h:3794
ufbx_warning_list warnings
Definition ufbx.h:3759
ufbx_props scene_props
Definition ufbx.h:3802
ufbx_mirror_axis handedness_conversion_axis
Definition ufbx.h:3838
size_t result_allocs
Definition ufbx.h:3817
ufbx_blob raw_relative_root
Definition ufbx.h:3797
size_t element_buffer_size
Definition ufbx.h:3820
bool has_warning[UFBX_WARNING_TYPE_COUNT]
Definition ufbx.h:3788
ufbx_blob raw_original_file_path
Definition ufbx.h:3831
ufbx_file_format file_format
Definition ufbx.h:3768
bool may_contain_missing_vertex_position
Definition ufbx.h:3776
ufbx_application original_application
Definition ufbx.h:3804
uint32_t exporter_version
Definition ufbx.h:3800
ufbx_real bone_prop_size_unit
Definition ufbx.h:3823
ufbx_pivot_handling pivot_handling
Definition ufbx.h:3837
ufbx_real geometry_scale
Definition ufbx.h:3850
ufbx_exporter exporter
Definition ufbx.h:3799
Definition ufbx.h:3488
ufbx_element * element
Definition ufbx.h:3494
ufbx_element_type type
Definition ufbx.h:3490
ufbx_string name
Definition ufbx.h:3489
uint32_t _internal_key
Definition ufbx.h:3492
Definition ufbx.h:844
ufbx_quat adjust_pre_rotation
Definition ufbx.h:946
ufbx_element element
Definition ufbx.h:845
ufbx_inherit_mode inherit_mode
Definition ufbx.h:899
ufbx_nullable ufbx_camera * camera
Definition ufbx.h:871
bool is_scale_helper
Definition ufbx.h:988
ufbx_nullable ufbx_node * inherit_scale_node
Definition ufbx.h:913
ufbx_element_list all_attribs
Definition ufbx.h:895
ufbx_real adjust_translation_scale
Definition ufbx.h:950
ufbx_rotation_order rotation_order
Definition ufbx.h:918
ufbx_nullable ufbx_node * parent
Definition ufbx.h:858
ufbx_mirror_axis adjust_mirror_axis
Definition ufbx.h:951
ufbx_vec3 euler_rotation
Definition ufbx.h:921
ufbx_props props
Definition ufbx.h:847
bool has_root_adjust_transform
Definition ufbx.h:980
ufbx_nullable ufbx_node * scale_helper
Definition ufbx.h:886
ufbx_quat adjust_post_rotation
Definition ufbx.h:948
ufbx_nullable ufbx_element * attrib
Definition ufbx.h:878
ufbx_transform local_transform
Definition ufbx.h:901
uint32_t typed_id
Definition ufbx.h:849
ufbx_matrix unscaled_node_to_world
Definition ufbx.h:940
ufbx_element_type attrib_type
Definition ufbx.h:889
ufbx_transform geometry_transform
Definition ufbx.h:902
ufbx_nullable ufbx_node * geometry_transform_helper
Definition ufbx.h:882
ufbx_nullable ufbx_mesh * mesh
Definition ufbx.h:869
ufbx_node_list children
Definition ufbx.h:861
bool is_geometry_transform_helper
Definition ufbx.h:984
ufbx_material_list materials
Definition ufbx.h:956
ufbx_matrix node_to_parent
Definition ufbx.h:928
bool use_rotation_space
Definition ufbx.h:972
ufbx_matrix node_to_world
Definition ufbx.h:931
ufbx_nullable ufbx_pose * bind_pose
Definition ufbx.h:959
ufbx_real adjust_post_scale
Definition ufbx.h:949
ufbx_real adjust_pre_scale
Definition ufbx.h:947
ufbx_string name
Definition ufbx.h:846
ufbx_inherit_mode original_inherit_mode
Definition ufbx.h:900
bool visible
Definition ufbx.h:962
uint32_t node_depth
Definition ufbx.h:995
ufbx_vec3 inherit_scale
Definition ufbx.h:906
bool has_adjust_transform
Definition ufbx.h:977
bool is_root
Definition ufbx.h:965
ufbx_nullable ufbx_light * light
Definition ufbx.h:870
ufbx_vec3 adjust_pre_translation
Definition ufbx.h:945
bool is_scale_compensate_parent
Definition ufbx.h:991
ufbx_matrix geometry_to_world
Definition ufbx.h:938
bool has_geometry_transform
Definition ufbx.h:968
ufbx_nullable ufbx_bone * bone
Definition ufbx.h:872
uint32_t element_id
Definition ufbx.h:848
ufbx_matrix geometry_to_node
Definition ufbx.h:935
Definition ufbx.h:1710
ufbx_real_list knot_vector
Definition ufbx.h:1720
ufbx_real t_max
Definition ufbx.h:1724
ufbx_nurbs_topology topology
Definition ufbx.h:1717
bool is_2d
Definition ufbx.h:1730
uint32_t order
Definition ufbx.h:1714
ufbx_real t_min
Definition ufbx.h:1723
bool valid
Definition ufbx.h:1741
size_t num_wrap_control_points
Definition ufbx.h:1738
ufbx_real_list spans
Definition ufbx.h:1727
Definition ufbx.h:1745
ufbx_element element
Definition ufbx.h:1746
ufbx_node_list instances
Definition ufbx.h:1751
ufbx_vec4_list control_points
Definition ufbx.h:1760
ufbx_string name
Definition ufbx.h:1747
uint32_t typed_id
Definition ufbx.h:1750
ufbx_props props
Definition ufbx.h:1748
uint32_t element_id
Definition ufbx.h:1749
ufbx_nurbs_basis basis
Definition ufbx.h:1755
Definition ufbx.h:1763
ufbx_string name
Definition ufbx.h:1765
ufbx_node_list instances
Definition ufbx.h:1769
uint32_t span_subdivision_v
Definition ufbx.h:1788
uint32_t element_id
Definition ufbx.h:1767
ufbx_nurbs_basis basis_v
Definition ufbx.h:1774
ufbx_nurbs_basis basis_u
Definition ufbx.h:1773
size_t num_control_points_u
Definition ufbx.h:1777
uint32_t typed_id
Definition ufbx.h:1768
ufbx_props props
Definition ufbx.h:1766
bool flip_normals
Definition ufbx.h:1791
uint32_t span_subdivision_u
Definition ufbx.h:1787
ufbx_vec4_list control_points
Definition ufbx.h:1784
size_t num_control_points_v
Definition ufbx.h:1778
ufbx_nullable ufbx_material * material
Definition ufbx.h:1795
ufbx_element element
Definition ufbx.h:1764
Definition ufbx.h:1808
ufbx_node_list instances
Definition ufbx.h:1814
ufbx_string name
Definition ufbx.h:1810
ufbx_element element
Definition ufbx.h:1809
uint32_t typed_id
Definition ufbx.h:1813
uint32_t element_id
Definition ufbx.h:1812
ufbx_props props
Definition ufbx.h:1811
Definition ufbx.h:1798
ufbx_props props
Definition ufbx.h:1801
ufbx_element element
Definition ufbx.h:1799
ufbx_string name
Definition ufbx.h:1800
uint32_t typed_id
Definition ufbx.h:1803
uint32_t element_id
Definition ufbx.h:1802
ufbx_node_list instances
Definition ufbx.h:1804
Definition ufbx.h:4194
void * user
Definition ufbx.h:4196
ufbx_open_file_fn * fn
Definition ufbx.h:4195
Definition ufbx.h:4177
ufbx_open_file_type type
Definition ufbx.h:4184
ufbx_blob original_filename
Definition ufbx.h:4188
ufbx_open_file_context context
Definition ufbx.h:4181
Definition ufbx.h:4204
ufbx_unsafe bool filename_null_terminated
Definition ufbx.h:4211
uint32_t _end_zero
Definition ufbx.h:4213
ufbx_allocator_opts allocator
Definition ufbx.h:4208
uint32_t _begin_zero
Definition ufbx.h:4205
Definition ufbx.h:4229
ufbx_close_memory_cb close_cb
Definition ufbx.h:4243
uint32_t _end_zero
Definition ufbx.h:4245
ufbx_unsafe bool no_copy
Definition ufbx.h:4240
ufbx_allocator_opts allocator
Definition ufbx.h:4234
uint32_t _begin_zero
Definition ufbx.h:4230
Definition ufbx.h:5240
size_t message_length
Definition ufbx.h:5242
char message[UFBX_PANIC_MESSAGE_LENGTH]
Definition ufbx.h:5243
bool did_panic
Definition ufbx.h:5241
Definition ufbx.h:3461
ufbx_string name
Definition ufbx.h:3463
ufbx_element element
Definition ufbx.h:3462
ufbx_bone_pose_list bone_poses
Definition ufbx.h:3474
ufbx_props props
Definition ufbx.h:3464
bool is_bind_pose
Definition ufbx.h:3470
uint32_t typed_id
Definition ufbx.h:3466
uint32_t element_id
Definition ufbx.h:3465
Definition ufbx.h:1820
uint32_t typed_id
Definition ufbx.h:1825
ufbx_string name
Definition ufbx.h:1822
ufbx_element element
Definition ufbx.h:1821
ufbx_node_list instances
Definition ufbx.h:1826
uint32_t element_id
Definition ufbx.h:1824
ufbx_props props
Definition ufbx.h:1823
Definition ufbx.h:4395
void * user
Definition ufbx.h:4397
ufbx_progress_fn * fn
Definition ufbx.h:4396
Definition ufbx.h:4373
uint64_t bytes_read
Definition ufbx.h:4374
uint64_t bytes_total
Definition ufbx.h:4375
Definition ufbx.h:4967
int64_t value_int
Definition ufbx.h:4978
ufbx_string prop_name
Definition ufbx.h:4972
uint32_t element_id
Definition ufbx.h:4969
ufbx_string value_str
Definition ufbx.h:4977
ufbx_vec4 value
Definition ufbx.h:4976
Definition ufbx.h:3038
ufbx_vec4 value
Definition ufbx.h:3044
ufbx_string prop_name
Definition ufbx.h:3043
uint32_t _internal_key
Definition ufbx.h:3041
ufbx_string value_str
Definition ufbx.h:3045
int64_t value_int
Definition ufbx.h:3046
uint32_t element_id
Definition ufbx.h:3039
Definition ufbx.h:542
int64_t value_int
Definition ufbx.h:552
ufbx_vec2 value_vec2
Definition ufbx.h:556
ufbx_real value_real_arr[4]
Definition ufbx.h:554
ufbx_blob value_blob
Definition ufbx.h:551
ufbx_string value_str
Definition ufbx.h:550
ufbx_vec4 value_vec4
Definition ufbx.h:558
ufbx_prop_flags flags
Definition ufbx.h:548
uint32_t _internal_key
Definition ufbx.h:545
ufbx_real value_real
Definition ufbx.h:555
ufbx_string name
Definition ufbx.h:543
ufbx_vec3 value_vec3
Definition ufbx.h:557
ufbx_prop_type type
Definition ufbx.h:547
Definition ufbx.h:567
size_t num_animated
Definition ufbx.h:569
ufbx_nullable ufbx_props * defaults
Definition ufbx.h:571
ufbx_prop_list props
Definition ufbx.h:568
Definition ufbx.h:328
ufbx_real x
Definition ufbx.h:330
ufbx_real v[4]
Definition ufbx.h:331
ufbx_real z
Definition ufbx.h:330
ufbx_real w
Definition ufbx.h:330
ufbx_real y
Definition ufbx.h:330
Definition ufbx.h:3901
double frames_per_second
Definition ufbx.h:3915
ufbx_time_mode time_mode
Definition ufbx.h:3922
ufbx_vec3 ambient_color
Definition ufbx.h:3917
ufbx_coordinate_axis original_axis_up
Definition ufbx.h:3928
ufbx_real original_unit_meters
Definition ufbx.h:3931
ufbx_coordinate_axes axes
Definition ufbx.h:3907
ufbx_snap_mode snap_mode
Definition ufbx.h:3924
ufbx_real unit_meters
Definition ufbx.h:3912
ufbx_time_protocol time_protocol
Definition ufbx.h:3923
ufbx_props props
Definition ufbx.h:3902
ufbx_string default_camera
Definition ufbx.h:3918
Definition ufbx.h:3935
ufbx_anim_layer_list anim_layers
Definition ufbx.h:3993
ufbx_texture_list textures
Definition ufbx.h:3986
ufbx_mesh_list meshes
Definition ufbx.h:3955
ufbx_element_list elements_by_type[UFBX_ELEMENT_TYPE_COUNT]
Definition ufbx.h:4015
ufbx_metadata metadata
Definition ufbx.h:3936
ufbx_node_list nodes
Definition ufbx.h:3952
ufbx_selection_node_list selection_nodes
Definition ufbx.h:4000
ufbx_nurbs_curve_list nurbs_curves
Definition ufbx.h:3963
ufbx_anim_curve_list anim_curves
Definition ufbx.h:3995
ufbx_shader_binding_list shader_bindings
Definition ufbx.h:3989
ufbx_camera_list cameras
Definition ufbx.h:3957
ufbx_skin_deformer_list skin_deformers
Definition ufbx.h:3976
ufbx_video_list videos
Definition ufbx.h:3987
ufbx_constraint_list constraints
Definition ufbx.h:4004
ufbx_connection_list connections_src
Definition ufbx.h:4023
ufbx_light_list lights
Definition ufbx.h:3956
ufbx_empty_list empties
Definition ufbx.h:3959
ufbx_procedural_geometry_list procedural_geometries
Definition ufbx.h:3969
ufbx_character_list characters
Definition ufbx.h:4003
ufbx_blend_deformer_list blend_deformers
Definition ufbx.h:3978
ufbx_nurbs_surface_list nurbs_surfaces
Definition ufbx.h:3964
ufbx_metadata_object_list metadata_objects
Definition ufbx.h:4012
ufbx_texture_file_list texture_files
Definition ufbx.h:4019
ufbx_scene_settings settings
Definition ufbx.h:3939
ufbx_nurbs_trim_surface_list nurbs_trim_surfaces
Definition ufbx.h:3965
ufbx_connection_list connections_dst
Definition ufbx.h:4024
ufbx_anim * anim
Definition ufbx.h:3945
ufbx_unknown_list unknowns
Definition ufbx.h:3949
ufbx_shader_list shaders
Definition ufbx.h:3988
ufbx_selection_set_list selection_sets
Definition ufbx.h:3999
ufbx_audio_clip_list audio_clips
Definition ufbx.h:4008
ufbx_anim_value_list anim_values
Definition ufbx.h:3994
ufbx_element_list elements
Definition ufbx.h:4022
ufbx_nurbs_trim_boundary_list nurbs_trim_boundaries
Definition ufbx.h:3966
ufbx_cache_deformer_list cache_deformers
Definition ufbx.h:3981
ufbx_pose_list poses
Definition ufbx.h:4011
ufbx_marker_list markers
Definition ufbx.h:3972
ufbx_skin_cluster_list skin_clusters
Definition ufbx.h:3977
ufbx_node * root_node
Definition ufbx.h:3942
ufbx_anim_stack_list anim_stacks
Definition ufbx.h:3992
ufbx_camera_switcher_list camera_switchers
Definition ufbx.h:3971
ufbx_nullable ufbx_dom_node * dom_root
Definition ufbx.h:4030
ufbx_line_curve_list line_curves
Definition ufbx.h:3962
ufbx_bone_list bones
Definition ufbx.h:3958
ufbx_lod_group_list lod_groups
Definition ufbx.h:3973
ufbx_audio_layer_list audio_layers
Definition ufbx.h:4007
ufbx_blend_shape_list blend_shapes
Definition ufbx.h:3980
ufbx_blend_channel_list blend_channels
Definition ufbx.h:3979
ufbx_cache_file_list cache_files
Definition ufbx.h:3982
ufbx_stereo_camera_list stereo_cameras
Definition ufbx.h:3970
ufbx_display_layer_list display_layers
Definition ufbx.h:3998
ufbx_material_list materials
Definition ufbx.h:3985
ufbx_name_element_list elements_by_name
Definition ufbx.h:4027
Definition ufbx.h:3273
ufbx_nullable ufbx_node * target_node
Definition ufbx.h:3282
ufbx_props props
Definition ufbx.h:3276
uint32_t element_id
Definition ufbx.h:3277
ufbx_uint32_list vertices
Definition ufbx.h:3289
ufbx_uint32_list edges
Definition ufbx.h:3290
ufbx_nullable ufbx_mesh * target_mesh
Definition ufbx.h:3283
ufbx_element element
Definition ufbx.h:3274
bool include_node
Definition ufbx.h:3284
ufbx_uint32_list faces
Definition ufbx.h:3291
uint32_t typed_id
Definition ufbx.h:3278
ufbx_string name
Definition ufbx.h:3275
Definition ufbx.h:3260
uint32_t typed_id
Definition ufbx.h:3265
ufbx_element element
Definition ufbx.h:3261
ufbx_string name
Definition ufbx.h:3262
ufbx_selection_node_list nodes
Definition ufbx.h:3269
uint32_t element_id
Definition ufbx.h:3264
ufbx_props props
Definition ufbx.h:3263
Definition ufbx.h:3025
ufbx_element element
Definition ufbx.h:3026
ufbx_shader_prop_binding_list prop_bindings
Definition ufbx.h:3033
ufbx_string name
Definition ufbx.h:3027
uint32_t element_id
Definition ufbx.h:3029
uint32_t typed_id
Definition ufbx.h:3030
ufbx_props props
Definition ufbx.h:3028
Definition ufbx.h:3017
ufbx_string shader_prop
Definition ufbx.h:3018
ufbx_string material_prop
Definition ufbx.h:3019
Definition ufbx.h:2775
bool texture_enabled
Definition ufbx.h:2799
ufbx_vec4 value_vec4
Definition ufbx.h:2785
ufbx_blob value_blob
Definition ufbx.h:2789
int64_t texture_output_index
Definition ufbx.h:2795
ufbx_nullable ufbx_prop * texture_prop
Definition ufbx.h:2805
ufbx_string value_str
Definition ufbx.h:2788
ufbx_prop * prop
Definition ufbx.h:2802
ufbx_nullable ufbx_prop * texture_enabled_prop
Definition ufbx.h:2808
ufbx_real value_real
Definition ufbx.h:2782
ufbx_vec2 value_vec2
Definition ufbx.h:2783
ufbx_nullable ufbx_texture * texture
Definition ufbx.h:2792
ufbx_vec3 value_vec3
Definition ufbx.h:2784
int64_t value_int
Definition ufbx.h:2787
ufbx_string name
Definition ufbx.h:2778
Definition ufbx.h:2821
ufbx_string prop_prefix
Definition ufbx.h:2850
ufbx_shader_texture_type type
Definition ufbx.h:2824
ufbx_string shader_name
Definition ufbx.h:2827
ufbx_texture * main_texture
Definition ufbx.h:2843
uint64_t shader_type_id
Definition ufbx.h:2830
ufbx_string shader_source
Definition ufbx.h:2837
ufbx_blob raw_shader_source
Definition ufbx.h:2838
ufbx_shader_texture_input_list inputs
Definition ufbx.h:2834
int64_t main_texture_output_index
Definition ufbx.h:2846
Definition ufbx.h:2998
ufbx_shader_binding_list bindings
Definition ufbx.h:3013
ufbx_shader_type type
Definition ufbx.h:3007
uint32_t element_id
Definition ufbx.h:3002
ufbx_element element
Definition ufbx.h:2999
uint32_t typed_id
Definition ufbx.h:3003
ufbx_props props
Definition ufbx.h:3001
ufbx_string name
Definition ufbx.h:3000
Definition ufbx.h:2011
ufbx_element element
Definition ufbx.h:2012
ufbx_matrix mesh_node_to_bone
Definition ufbx.h:2029
ufbx_props props
Definition ufbx.h:2014
uint32_t typed_id
Definition ufbx.h:2016
ufbx_string name
Definition ufbx.h:2013
uint32_t element_id
Definition ufbx.h:2015
ufbx_real_list weights
Definition ufbx.h:2045
ufbx_matrix geometry_to_bone
Definition ufbx.h:2025
ufbx_matrix geometry_to_world
Definition ufbx.h:2037
ufbx_uint32_list vertices
Definition ufbx.h:2044
ufbx_matrix bind_to_world
Definition ufbx.h:2033
ufbx_transform geometry_to_world_transform
Definition ufbx.h:2038
size_t num_weights
Definition ufbx.h:2043
ufbx_nullable ufbx_node * bone_node
Definition ufbx.h:2022
Definition ufbx.h:1982
ufbx_props props
Definition ufbx.h:1985
ufbx_skinning_method skinning_method
Definition ufbx.h:1990
uint32_t element_id
Definition ufbx.h:1986
uint32_t typed_id
Definition ufbx.h:1987
ufbx_string name
Definition ufbx.h:1984
ufbx_skin_cluster_list clusters
Definition ufbx.h:1993
ufbx_element element
Definition ufbx.h:1983
ufbx_skin_vertex_list vertices
Definition ufbx.h:1996
size_t max_weights_per_vertex
Definition ufbx.h:2000
ufbx_real_list dq_weights
Definition ufbx.h:2007
size_t num_dq_weights
Definition ufbx.h:2005
ufbx_skin_weight_list weights
Definition ufbx.h:1997
ufbx_uint32_list dq_vertices
Definition ufbx.h:2006
Definition ufbx.h:1954
ufbx_real dq_weight
Definition ufbx.h:1965
uint32_t weight_begin
Definition ufbx.h:1960
uint32_t num_weights
Definition ufbx.h:1961
Definition ufbx.h:1972
ufbx_real weight
Definition ufbx.h:1974
uint32_t cluster_index
Definition ufbx.h:1973
Definition ufbx.h:1830
ufbx_props props
Definition ufbx.h:1833
uint32_t element_id
Definition ufbx.h:1834
ufbx_string name
Definition ufbx.h:1832
ufbx_nullable ufbx_camera * left
Definition ufbx.h:1839
ufbx_nullable ufbx_camera * right
Definition ufbx.h:1840
ufbx_node_list instances
Definition ufbx.h:1836
uint32_t typed_id
Definition ufbx.h:1835
ufbx_element element
Definition ufbx.h:1831
Definition ufbx.h:4155
ufbx_size_fn * size_fn
Definition ufbx.h:4158
ufbx_close_fn * close_fn
Definition ufbx.h:4159
ufbx_read_fn * read_fn
Definition ufbx.h:4156
ufbx_skip_fn * skip_fn
Definition ufbx.h:4157
void * user
Definition ufbx.h:4162
Definition ufbx.h:282
const char * data
Definition ufbx.h:283
size_t length
Definition ufbx.h:284
Definition ufbx.h:5157
size_t max_skin_weights
Definition ufbx.h:5188
uint32_t _begin_zero
Definition ufbx.h:5158
bool evaluate_source_vertices
Definition ufbx.h:5178
uint32_t _end_zero
Definition ufbx.h:5193
size_t max_source_vertices
Definition ufbx.h:5181
bool evaluate_skin_weights
Definition ufbx.h:5185
bool ignore_normals
Definition ufbx.h:5167
ufbx_subdivision_boundary boundary
Definition ufbx.h:5163
bool interpolate_normals
Definition ufbx.h:5171
size_t skin_deformer_index
Definition ufbx.h:5191
ufbx_allocator_opts result_allocator
Definition ufbx.h:5161
ufbx_subdivision_boundary uv_boundary
Definition ufbx.h:5164
bool interpolate_tangents
Definition ufbx.h:5174
ufbx_allocator_opts temp_allocator
Definition ufbx.h:5160
Definition ufbx.h:1163
size_t result_memory_used
Definition ufbx.h:1164
ufbx_subdivision_weight_range_list source_vertex_ranges
Definition ufbx.h:1171
ufbx_subdivision_weight_list source_vertex_weights
Definition ufbx.h:1172
size_t temp_memory_used
Definition ufbx.h:1165
ufbx_subdivision_weight_range_list skin_cluster_ranges
Definition ufbx.h:1176
ufbx_subdivision_weight_list skin_cluster_weights
Definition ufbx.h:1177
size_t result_allocs
Definition ufbx.h:1166
size_t temp_allocs
Definition ufbx.h:1167
Definition ufbx.h:1149
uint32_t num_weights
Definition ufbx.h:1151
uint32_t weight_begin
Definition ufbx.h:1150
Definition ufbx.h:1156
uint32_t index
Definition ufbx.h:1158
ufbx_real weight
Definition ufbx.h:1157
Definition ufbx.h:4041
ufbx_vec3 derivative_u
Definition ufbx.h:4044
bool valid
Definition ufbx.h:4042
ufbx_vec3 position
Definition ufbx.h:4043
ufbx_vec3 derivative_v
Definition ufbx.h:4045
Definition ufbx.h:3186
float dx
Definition ufbx.h:3187
float dy
Definition ufbx.h:3188
Definition ufbx.h:5121
ufbx_allocator_opts temp_allocator
Definition ufbx.h:5124
size_t span_subdivision
Definition ufbx.h:5128
ufbx_allocator_opts result_allocator
Definition ufbx.h:5125
uint32_t _end_zero
Definition ufbx.h:5130
uint32_t _begin_zero
Definition ufbx.h:5122
Definition ufbx.h:5135
uint32_t _begin_zero
Definition ufbx.h:5136
size_t span_subdivision_u
Definition ufbx.h:5146
size_t span_subdivision_v
Definition ufbx.h:5147
ufbx_allocator_opts result_allocator
Definition ufbx.h:5139
bool skip_mesh_parts
Definition ufbx.h:5150
ufbx_allocator_opts temp_allocator
Definition ufbx.h:5138
uint32_t _end_zero
Definition ufbx.h:5152
Definition ufbx.h:2855
ufbx_string relative_filename
Definition ufbx.h:2870
ufbx_blob raw_relative_filename
Definition ufbx.h:2880
ufbx_string absolute_filename
Definition ufbx.h:2867
ufbx_blob raw_absolute_filename
Definition ufbx.h:2877
uint32_t index
Definition ufbx.h:2858
ufbx_blob content
Definition ufbx.h:2883
ufbx_blob raw_filename
Definition ufbx.h:2875
ufbx_string filename
Definition ufbx.h:2865
Definition ufbx.h:2749
ufbx_texture * texture
Definition ufbx.h:2750
ufbx_blend_mode blend_mode
Definition ufbx.h:2751
ufbx_real alpha
Definition ufbx.h:2752
Definition ufbx.h:2890
ufbx_element element
Definition ufbx.h:2891
ufbx_texture_layer_list layers
Definition ufbx.h:2936
ufbx_texture_list file_textures
Definition ufbx.h:2945
ufbx_blob raw_filename
Definition ufbx.h:2916
ufbx_string absolute_filename
Definition ufbx.h:2908
ufbx_transform uv_transform
Definition ufbx.h:2956
ufbx_blob raw_relative_filename
Definition ufbx.h:2921
ufbx_string filename
Definition ufbx.h:2906
ufbx_wrap_mode wrap_v
Definition ufbx.h:2952
ufbx_string uv_set
Definition ufbx.h:2948
ufbx_blob raw_absolute_filename
Definition ufbx.h:2918
ufbx_matrix uv_to_texture
Definition ufbx.h:2958
ufbx_props props
Definition ufbx.h:2893
ufbx_blob content
Definition ufbx.h:2924
bool has_uv_transform
Definition ufbx.h:2955
ufbx_nullable ufbx_video * video
Definition ufbx.h:2927
ufbx_string relative_filename
Definition ufbx.h:2911
uint32_t file_index
Definition ufbx.h:2930
ufbx_texture_type type
Definition ufbx.h:2899
uint32_t element_id
Definition ufbx.h:2894
ufbx_nullable ufbx_shader_texture * shader
Definition ufbx.h:2941
ufbx_string name
Definition ufbx.h:2892
bool has_file
Definition ufbx.h:2933
uint32_t typed_id
Definition ufbx.h:2895
ufbx_wrap_mode wrap_u
Definition ufbx.h:2951
ufbx_matrix texture_to_uv
Definition ufbx.h:2957
Definition ufbx.h:4659
size_t memory_limit
Definition ufbx.h:4673
size_t num_tasks
Definition ufbx.h:4667
ufbx_thread_pool pool
Definition ufbx.h:4663
Definition ufbx.h:4617
uint32_t max_concurrent_tasks
Definition ufbx.h:4618
Definition ufbx.h:4650
ufbx_thread_pool_wait_fn * wait_fn
Definition ufbx.h:4653
ufbx_thread_pool_free_fn * free_fn
Definition ufbx.h:4654
ufbx_thread_pool_run_fn * run_fn
Definition ufbx.h:4652
void * user
Definition ufbx.h:4655
ufbx_thread_pool_init_fn * init_fn
Definition ufbx.h:4651
Definition ufbx.h:3738
ufbx_blob data
Definition ufbx.h:3750
ufbx_props props
Definition ufbx.h:3739
uint32_t height
Definition ufbx.h:3743
uint32_t width
Definition ufbx.h:3742
ufbx_thumbnail_format format
Definition ufbx.h:3746
Definition ufbx.h:4056
uint32_t face
Definition ufbx.h:4061
uint32_t prev
Definition ufbx.h:4059
uint32_t index
Definition ufbx.h:4057
ufbx_topo_flags flags
Definition ufbx.h:4064
uint32_t next
Definition ufbx.h:4058
uint32_t edge
Definition ufbx.h:4062
uint32_t twin
Definition ufbx.h:4060
Definition ufbx.h:3051
ufbx_transform transform
Definition ufbx.h:3053
uint32_t node_id
Definition ufbx.h:3052
Definition ufbx.h:357
ufbx_quat rotation
Definition ufbx.h:359
ufbx_vec3 scale
Definition ufbx.h:360
ufbx_vec3 translation
Definition ufbx.h:358
Definition ufbx.h:778
ufbx_string name
Definition ufbx.h:781
ufbx_string type
Definition ufbx.h:790
uint32_t typed_id
Definition ufbx.h:784
uint32_t element_id
Definition ufbx.h:783
ufbx_element element
Definition ufbx.h:780
ufbx_string super_type
Definition ufbx.h:791
ufbx_string sub_type
Definition ufbx.h:792
ufbx_props props
Definition ufbx.h:782
Definition ufbx.h:1076
ufbx_vertex_vec3 vertex_tangent
Definition ufbx.h:1082
ufbx_string name
Definition ufbx.h:1077
ufbx_vertex_vec2 vertex_uv
Definition ufbx.h:1081
uint32_t index
Definition ufbx.h:1078
ufbx_vertex_vec3 vertex_bitangent
Definition ufbx.h:1083
Definition ufbx.h:298
ufbx_real x
Definition ufbx.h:300
ufbx_real v[2]
Definition ufbx.h:301
ufbx_real y
Definition ufbx.h:300
Definition ufbx.h:308
ufbx_real z
Definition ufbx.h:310
ufbx_real y
Definition ufbx.h:310
ufbx_real x
Definition ufbx.h:310
ufbx_real v[3]
Definition ufbx.h:311
Definition ufbx.h:318
ufbx_real z
Definition ufbx.h:320
ufbx_real x
Definition ufbx.h:320
ufbx_real v[4]
Definition ufbx.h:321
ufbx_real w
Definition ufbx.h:320
ufbx_real y
Definition ufbx.h:320
Definition ufbx.h:1007
bool exists
Definition ufbx.h:1009
ufbx_uint32_list indices
Definition ufbx.h:1013
bool unique_per_vertex
Definition ufbx.h:1017
size_t value_reals
Definition ufbx.h:1015
ufbx_real_list values_w
Definition ufbx.h:1024
ufbx_void_list values
Definition ufbx.h:1011
Definition ufbx.h:1028
size_t value_reals
Definition ufbx.h:1032
ufbx_real_list values_w
Definition ufbx.h:1034
bool exists
Definition ufbx.h:1029
ufbx_real_list values
Definition ufbx.h:1030
bool unique_per_vertex
Definition ufbx.h:1033
ufbx_uint32_list indices
Definition ufbx.h:1031
Definition ufbx.h:4070
size_t vertex_size
Definition ufbx.h:4073
void * data
Definition ufbx.h:4071
size_t vertex_count
Definition ufbx.h:4072
Definition ufbx.h:1040
ufbx_real_list values_w
Definition ufbx.h:1046
bool unique_per_vertex
Definition ufbx.h:1045
size_t value_reals
Definition ufbx.h:1044
bool exists
Definition ufbx.h:1041
ufbx_uint32_list indices
Definition ufbx.h:1043
ufbx_vec2_list values
Definition ufbx.h:1042
Definition ufbx.h:1052
bool exists
Definition ufbx.h:1053
size_t value_reals
Definition ufbx.h:1056
ufbx_uint32_list indices
Definition ufbx.h:1055
bool unique_per_vertex
Definition ufbx.h:1057
ufbx_real_list values_w
Definition ufbx.h:1058
ufbx_vec3_list values
Definition ufbx.h:1054
Definition ufbx.h:1064
bool exists
Definition ufbx.h:1065
size_t value_reals
Definition ufbx.h:1068
ufbx_vec4_list values
Definition ufbx.h:1066
bool unique_per_vertex
Definition ufbx.h:1069
ufbx_real_list values_w
Definition ufbx.h:1070
ufbx_uint32_list indices
Definition ufbx.h:1067
Definition ufbx.h:2962
ufbx_string absolute_filename
Definition ufbx.h:2977
ufbx_props props
Definition ufbx.h:2965
uint32_t element_id
Definition ufbx.h:2966
ufbx_blob raw_absolute_filename
Definition ufbx.h:2987
uint32_t typed_id
Definition ufbx.h:2967
ufbx_element element
Definition ufbx.h:2963
ufbx_string filename
Definition ufbx.h:2975
ufbx_string name
Definition ufbx.h:2964
ufbx_string relative_filename
Definition ufbx.h:2980
ufbx_blob content
Definition ufbx.h:2993
ufbx_blob raw_filename
Definition ufbx.h:2985
ufbx_blob raw_relative_filename
Definition ufbx.h:2990
Definition ufbx.h:382
size_t count
Definition ufbx.h:384
void * data
Definition ufbx.h:383
Definition ufbx.h:3597
uint32_t element_id
Definition ufbx.h:3603
ufbx_string description
Definition ufbx.h:3601
ufbx_warning_type type
Definition ufbx.h:3599
size_t count
Definition ufbx.h:3605
static ufbxi_noinline ufbx_real curve
Definition ufbx.cpp:25978
uint8_t name_len
Definition ufbx.cpp:8975
static ufbxi_noinline ufbx_real flags
Definition ufbx.cpp:25978
static ufbxi_noinline void layer
Definition ufbx.cpp:25700
dst name length
Definition ufbx.cpp:10732
const char * name
Definition ufbx.cpp:9020
static ufbxi_noinline ufbxi_aa_node node
Definition ufbx.cpp:4444
dst values count
Definition ufbx.cpp:10795
tag text data
Definition ufbx.cpp:7532
double time
Definition ufbx.cpp:26005
static ufbxi_noinline void weight
Definition ufbx.cpp:25700
static ufbxi_noinline ufbxi_aa_node index
Definition ufbx.cpp:4444
static ufbxi_noinline void ctx
Definition ufbx.cpp:25700
enum ufbx_material_pbr_map UFBX_ENUM_REPR ufbx_material_pbr_map
enum ufbx_blend_mode UFBX_ENUM_REPR ufbx_blend_mode
UFBX_ERROR_BAD_NURBS
Definition ufbx.h:4320
UFBX_ELEMENT_VIDEO
Definition ufbx.h:721
UFBX_TIME_PROTOCOL_FRAME_COUNT
Definition ufbx.h:3881
ufbx_abi ufbx_real ufbx_catch_get_vertex_w_vec3(ufbx_panic *panic, const ufbx_vertex_vec3 *v, size_t index)
Definition ufbx.cpp:33025
UFBX_ELEMENT_ANIM_STACK
Definition ufbx.h:724
UFBX_TIME_MODE_120_FPS
Definition ufbx.h:3856
void ufbx_thread_pool_run_fn(void *user, ufbx_thread_pool_context ctx, uint32_t group, uint32_t start_index, uint32_t count)
Definition ufbx.h:4629
ufbx_abi ufbx_transform ufbx_evaluate_transform(const ufbx_anim *anim, const ufbx_node *node, double time)
Definition ufbx.cpp:31025
UFBX_PROP_FLAG_CONNECTED
Definition ufbx.h:518
enum ufbx_element_type UFBX_ENUM_REPR ufbx_element_type
enum ufbx_nurbs_topology UFBX_ENUM_REPR ufbx_nurbs_topology
UFBX_WARNING_MISSING_EXTERNAL_FILE
Definition ufbx.h:3536
ufbx_abi void ufbx_retain_mesh(ufbx_mesh *mesh)
Definition ufbx.cpp:32638
enum ufbx_topo_flags UFBX_FLAG_REPR ufbx_topo_flags
bool ufbx_open_file_fn(void *user, ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_info *info)
Definition ufbx.h:4192
UFBX_PIVOT_HANDLING_ADJUST_TO_PIVOT
Definition ufbx.h:3723
#define ufbx_nullable
Definition ufbx.h:112
UFBX_MATERIAL_FBX_REFLECTION_FACTOR
Definition ufbx.h:2397
ufbx_abi ufbx_material * ufbx_find_material_len(const ufbx_scene *scene, const char *name, size_t name_len)
Definition ufbx.cpp:30770
UFBX_MATERIAL_PBR_SHEEN_COLOR
Definition ufbx.h:2448
ufbx_abi_data const ufbx_coordinate_axes ufbx_axes_right_handed_z_up
Definition ufbx.h:5264
UFBX_APERTURE_MODE_HORIZONTAL
Definition ufbx.h:1490
ufbx_abi ufbx_blend_shape * ufbx_as_blend_shape(const ufbx_element *element)
Definition ufbx.cpp:33055
UFBX_ERROR_DUPLICATE_OVERRIDE
Definition ufbx.h:4337
UFBX_ELEMENT_ANIM_CURVE
Definition ufbx.h:727
UFBX_SHADER_WAVEFRONT_MTL
Definition ufbx.h:2383
UFBX_ELEMENT_EMPTY
Definition ufbx.h:701
UFBX_DOM_VALUE_ARRAY_I64
Definition ufbx.h:405
UFBX_CONSTRAINT_IK_POLE_NODE
Definition ufbx.h:3347
ufbx_abi ufbx_prop * ufbx_find_prop(const ufbx_props *props, const char *name)
Definition ufbx.cpp:33142
UFBX_SHADER_3DS_MAX_PHYSICAL_MATERIAL
Definition ufbx.h:2362
UFBX_SUBDIVISION_DISPLAY_HULL
Definition ufbx.h:1183
UFBX_BLEND_COLOR_DODGE
Definition ufbx.h:2714
UFBX_PROP_FLAG_ANIMATABLE
Definition ufbx.h:483
ufbx_abi void ufbx_catch_compute_normals(ufbx_panic *panic, const ufbx_mesh *mesh, const ufbx_vertex_vec3 *positions, const uint32_t *normal_indices, size_t num_normal_indices, ufbx_vec3 *normals, size_t num_normals)
Definition ufbx.cpp:32585
ufbx_abi bool ufbx_coordinate_axes_valid(ufbx_coordinate_axes axes)
Definition ufbx.cpp:31478
UFBX_LIGHT_SPOT
Definition ufbx.h:1389
ufbx_abi ufbx_blend_channel * ufbx_as_blend_channel(const ufbx_element *element)
Definition ufbx.cpp:33054
UFBX_ASPECT_MODE_WINDOW_SIZE
Definition ufbx.h:1469
UFBX_MATERIAL_PBR_COAT_GLOSSINESS
Definition ufbx.h:2474
UFBX_LIGHT_DECAY_QUADRATIC
Definition ufbx.h:1406
UFBX_BLEND_DARKER_COLOR
Definition ufbx.h:2711
ufbx_abi void ufbx_retain_line_curve(ufbx_line_curve *curve)
Definition ufbx.cpp:32370
UFBX_MATERIAL_PBR_MATTE_FACTOR
Definition ufbx.h:2470
UFBX_ELEMENT_MESH
Definition ufbx.h:697
UFBX_ERROR_TRUNCATED_VERTEX_STREAM
Definition ufbx.h:4310
UFBX_ERROR_UNSAFE_OPTIONS
Definition ufbx.h:4334
#define ufbx_inline
Definition ufbx.h:95
enum ufbx_warning_type UFBX_ENUM_REPR ufbx_warning_type
UFBX_BAKE_STEP_HANDLING_CUSTOM_DURATION
Definition ufbx.h:5019
ufbx_abi ufbx_anim_value * ufbx_as_anim_value(const ufbx_element *element)
Definition ufbx.cpp:33065
enum ufbx_constraint_aim_up_type UFBX_ENUM_REPR ufbx_constraint_aim_up_type
UFBX_ROTATION_ORDER_XYZ
Definition ufbx.h:342
UFBX_MATERIAL_PBR_EMISSION_COLOR
Definition ufbx.h:2463
UFBX_LIGHT_VOLUME
Definition ufbx.h:1395
UFBX_ELEMENT_SELECTION_SET
Definition ufbx.h:729
UFBX_FILE_FORMAT_UNKNOWN
Definition ufbx.h:3523
UFBX_WARNING_DUPLICATE_CONNECTION
Definition ufbx.h:3549
ufbx_abi ufbx_vec3 ufbx_quat_to_euler(ufbx_quat q, ufbx_rotation_order order)
Definition ufbx.cpp:31622
UFBX_APERTURE_FORMAT_IMAX
Definition ufbx.h:1537
UFBX_APERTURE_FORMAT_70MM_PROJECTION
Definition ufbx.h:1534
ufbx_abi bool ufbx_default_open_file(void *user, ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_info *info)
Definition ufbx.cpp:30406
UFBX_CONSTRAINT_AIM_UP_NONE
Definition ufbx.h:3337
UFBX_CONSTRAINT_AIM_UP_VECTOR
Definition ufbx.h:3336
UFBX_MATERIAL_FBX_BUMP
Definition ufbx.h:2406
UFBX_PROP_BLOB
Definition ufbx.h:471
ufbx_abi ufbx_cache_deformer * ufbx_as_cache_deformer(const ufbx_element *element)
Definition ufbx.cpp:33056
UFBX_ELEMENT_CAMERA
Definition ufbx.h:699
UFBX_GEOMETRY_TRANSFORM_HANDLING_PRESERVE
Definition ufbx.h:3657
UFBX_BAKE_STEP_HANDLING_IDENTICAL_TIME
Definition ufbx.h:5024
ufbx_abi ufbx_anim_stack * ufbx_find_anim_stack(const ufbx_scene *scene, const char *name)
Definition ufbx.cpp:33152
UFBX_CONSTRAINT_AIM
Definition ufbx.h:3308
ufbx_abi ufbx_double_list ufbx_dom_as_double_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33112
ufbx_abi ufbx_unknown * ufbx_as_unknown(const ufbx_element *element)
Definition ufbx.cpp:33034
UFBX_PIVOT_HANDLING_RETAIN
Definition ufbx.h:3717
void ufbx_thread_pool_free_fn(void *user, ufbx_thread_pool_context ctx)
Definition ufbx.h:4636
ufbx_abi ufbx_shader_texture_input * ufbx_find_shader_texture_input_len(const ufbx_shader_texture *shader, const char *name, size_t name_len)
Definition ufbx.cpp:31463
ufbx_abi ufbx_quat ufbx_quat_fix_antipodal(ufbx_quat q, ufbx_quat reference)
Definition ufbx.cpp:31519
UFBX_INHERIT_MODE_HANDLING_PRESERVE
Definition ufbx.h:3685
UFBX_MATERIAL_PBR_OPACITY
Definition ufbx.h:2464
UFBX_OPEN_FILE_GEOMETRY_CACHE
Definition ufbx.h:4167
UFBX_MATERIAL_FEATURE_COAT
Definition ufbx.h:2490
ufbx_abi void ufbx_free_geometry_cache(ufbx_geometry_cache *cache)
Definition ufbx.cpp:32666
ufbx_abi ufbx_prop * ufbx_find_prop_len(const ufbx_props *props, const char *name, size_t name_len)
Definition ufbx.cpp:30635
UFBX_ELEMENT_MARKER
Definition ufbx.h:710
UFBX_PROP_FLAG_MUTE_Z
Definition ufbx.h:500
UFBX_PROP_COLOR
Definition ufbx.h:462
UFBX_BLEND_LIGHTEN
Definition ufbx.h:2712
UFBX_MATERIAL_PBR_SUBSURFACE_RADIUS
Definition ufbx.h:2442
UFBX_SUBDIVISION_DISPLAY_HULL_AND_SMOOTH
Definition ufbx.h:1184
UFBX_PROP_FLAG_LOCK_Y
Definition ufbx.h:493
UFBX_MATERIAL_PBR_BASE_COLOR
Definition ufbx.h:2421
UFBX_MATERIAL_PBR_TRANSMISSION_PRIORITY
Definition ufbx.h:2438
UFBX_MATERIAL_PBR_GLOSSINESS
Definition ufbx.h:2473
uintptr_t ufbx_open_file_context
Definition ufbx.h:4175
ufbx_abi ufbx_real ufbx_matrix_determinant(const ufbx_matrix *m)
Definition ufbx.cpp:31749
ufbx_abi ufbx_selection_node * ufbx_as_selection_node(const ufbx_element *element)
Definition ufbx.cpp:33069
UFBX_MIRROR_AXIS_X
Definition ufbx.h:832
ufbx_abi ufbx_int64_list ufbx_dom_as_int64_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33094
UFBX_MIRROR_AXIS_Y
Definition ufbx.h:833
ufbx_abi ufbx_curve_point ufbx_evaluate_nurbs_curve(const ufbx_nurbs_curve *curve, ufbx_real u)
Definition ufbx.cpp:32168
UFBX_SHADER_3DS_MAX_PBR_METAL_ROUGH
Definition ufbx.h:2365
enum ufbx_material_feature UFBX_ENUM_REPR ufbx_material_feature
UFBX_MATERIAL_FBX_AMBIENT_FACTOR
Definition ufbx.h:2403
ufbx_abi ufbx_scene * ufbx_load_memory(const void *data, size_t data_size, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30502
UFBX_CACHE_DATA_FORMAT_UNKNOWN
Definition ufbx.h:2129
UFBX_MATERIAL_PBR_COAT_AFFECT_BASE_ROUGHNESS
Definition ufbx.h:2458
ufbx_abi size_t ufbx_generate_normal_mapping(const ufbx_mesh *mesh, const ufbx_topo_edge *topo, size_t num_topo, uint32_t *normal_indices, size_t num_normal_indices, bool assume_smooth)
Definition ufbx.cpp:32580
UFBX_PROP_FLAG_VALUE_INT
Definition ufbx.h:534
ufbx_abi ufbx_real ufbx_find_real_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_real def)
Definition ufbx.cpp:30652
ufbx_abi ufbx_baked_anim * ufbx_bake_anim(const ufbx_scene *scene, const ufbx_anim *anim, const ufbx_bake_opts *opts, ufbx_error *error)
Definition ufbx.cpp:31242
ufbx_abi ufbx_int32_list ufbx_dom_as_int32_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33085
#define UFBX_ENUM_TYPE(p_name, p_prefix, p_last)
Definition ufbx.h:235
enum ufbx_bake_step_handling UFBX_ENUM_REPR ufbx_bake_step_handling
ufbx_unsafe ufbx_abi void ufbx_thread_pool_run_task(ufbx_thread_pool_context ctx, uint32_t index)
Definition ufbx.cpp:32976
ufbx_abi_data const ufbx_coordinate_axes ufbx_axes_left_handed_y_up
Definition ufbx.h:5265
ufbx_abi void ufbx_free_line_curve(ufbx_line_curve *curve)
Definition ufbx.cpp:32359
UFBX_ERROR_MEMORY_LIMIT
Definition ufbx.h:4280
UFBX_SUBDIVISION_BOUNDARY_SHARP_BOUNDARY
Definition ufbx.h:1200
UFBX_APERTURE_FORMAT_SUPER_16MM
Definition ufbx.h:1528
ufbx_abi void ufbx_retain_anim(ufbx_anim *anim)
Definition ufbx.cpp:31231
#define UFBX_ERROR_INFO_LENGTH
Definition ufbx.h:165
ufbx_abi ufbx_anim_layer * ufbx_as_anim_layer(const ufbx_element *element)
Definition ufbx.cpp:33064
UFBX_MATERIAL_FEATURE_TRANSMISSION
Definition ufbx.h:2489
UFBX_TIME_MODE_100_FPS
Definition ufbx.h:3857
uintptr_t ufbx_thread_pool_context
Definition ufbx.h:4614
UFBX_PROP_FLAG_SYNTHETIC
Definition ufbx.h:506
size_t ufbx_read_fn(void *user, void *data, size_t size)
Definition ufbx.h:4143
ufbx_abi ufbx_vec4 ufbx_catch_get_vertex_vec4(ufbx_panic *panic, const ufbx_vertex_vec4 *v, size_t index)
Definition ufbx.cpp:33017
UFBX_PROP_UNKNOWN
Definition ufbx.h:457
ufbx_abi ufbx_matrix ufbx_get_compatible_matrix_for_normals(const ufbx_node *node)
Definition ufbx.cpp:30814
ufbx_inline ufbx_real ufbx_get_vertex_w_vec3(const ufbx_vertex_vec3 *v, size_t index)
Definition ufbx.h:5769
ufbx_abi ufbx_camera * ufbx_as_camera(const ufbx_element *element)
Definition ufbx.cpp:33038
ufbx_abi int64_t ufbx_find_int(const ufbx_props *props, const char *name, int64_t def)
Definition ufbx.cpp:33145
UFBX_GATE_FIT_OVERSCAN
Definition ufbx.h:1513
UFBX_COORDINATE_AXIS_POSITIVE_Y
Definition ufbx.h:1547
UFBX_CACHE_INTERPRETATION_VERTEX_POSITION
Definition ufbx.h:2160
UFBX_ELEMENT_BLEND_SHAPE
Definition ufbx.h:716
UFBX_PROP_FLAG_ANIMATED
Definition ufbx.h:509
void ufbx_thread_pool_wait_fn(void *user, ufbx_thread_pool_context ctx, uint32_t group, uint32_t max_index)
Definition ufbx.h:4633
UFBX_PROP_STRING
Definition ufbx.h:464
UFBX_MATERIAL_PBR_COAT_COLOR
Definition ufbx.h:2451
UFBX_BLEND_COLOR_BURN
Definition ufbx.h:2709
UFBX_BAKE_STEP_HANDLING_ADJACENT_DOUBLE
Definition ufbx.h:5031
UFBX_MATERIAL_PBR_MATTE_COLOR
Definition ufbx.h:2471
UFBX_MATERIAL_FEATURE_SPECULAR
Definition ufbx.h:2487
UFBX_SNAP_MODE_PLAY
Definition ufbx.h:3892
ufbx_abi ufbx_anim_prop_list ufbx_find_anim_props(const ufbx_anim_layer *layer, const ufbx_element *element)
Definition ufbx.cpp:30792
ufbx_abi bool ufbx_find_bool_len(const ufbx_props *props, const char *name, size_t name_len, bool def)
Definition ufbx.cpp:30682
UFBX_ASPECT_MODE_FIXED_RATIO
Definition ufbx.h:1471
enum ufbx_prop_type UFBX_ENUM_REPR ufbx_prop_type
ufbx_abi ufbx_light * ufbx_as_light(const ufbx_element *element)
Definition ufbx.cpp:33037
ufbx_unsafe ufbx_abi bool ufbx_open_memory_ctx(ufbx_stream *stream, ufbx_open_file_context ctx, const void *data, size_t data_size, const ufbx_open_memory_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30442
UFBX_ELEMENT_BONE
Definition ufbx.h:700
UFBX_ELEMENT_TYPE_FIRST_ATTRIB
Definition ufbx.h:738
ufbx_abi ufbx_vec3 ufbx_evaluate_anim_value_vec3(const ufbx_anim_value *anim_value, double time)
Definition ufbx.cpp:30921
UFBX_ELEMENT_UNKNOWN
Definition ufbx.h:695
UFBX_TRANSFORM_FLAG_INCLUDE_SCALE
Definition ufbx.h:5469
UFBX_PROP_FLAG_VALUE_VEC2
Definition ufbx.h:531
ufbx_abi ufbx_anim * ufbx_create_anim(const ufbx_scene *scene, const ufbx_anim_opts *opts, ufbx_error *error)
Definition ufbx.cpp:31194
enum ufbx_dom_value_type UFBX_ENUM_REPR ufbx_dom_value_type
ufbx_abi void ufbx_free_mesh(ufbx_mesh *mesh)
Definition ufbx.cpp:32627
ufbx_abi_data const ufbx_matrix ufbx_identity_matrix
Definition ufbx.h:5255
enum ufbx_texture_type UFBX_ENUM_REPR ufbx_texture_type
UFBX_MATERIAL_PBR_TRANSMISSION_FACTOR
Definition ufbx.h:2430
UFBX_ASPECT_MODE_FIXED_RESOLUTION
Definition ufbx.h:1473
UFBX_TIME_MODE_NTSC_FULL_FRAME
Definition ufbx.h:3864
ufbx_abi ufbx_mesh * ufbx_as_mesh(const ufbx_element *element)
Definition ufbx.cpp:33036
struct ufbx_mesh ufbx_mesh
Definition ufbx.h:591
UFBX_INDEX_ERROR_HANDLING_NO_INDEX
Definition ufbx.h:4458
UFBX_EXTRAPOLATION_CONSTANT
Definition ufbx.h:3166
ufbx_abi ufbx_anim_stack * ufbx_find_anim_stack_len(const ufbx_scene *scene, const char *name, size_t name_len)
Definition ufbx.cpp:30765
UFBX_LOD_DISPLAY_HIDE
Definition ufbx.h:1881
UFBX_APERTURE_FORMAT_VISTAVISION
Definition ufbx.h:1535
UFBX_MATERIAL_FEATURE_DIFFUSE_ROUGHNESS
Definition ufbx.h:2497
UFBX_ELEMENT_NURBS_TRIM_BOUNDARY
Definition ufbx.h:706
ufbx_abi ufbx_skin_cluster * ufbx_as_skin_cluster(const ufbx_element *element)
Definition ufbx.cpp:33052
UFBX_INHERIT_MODE_HANDLING_COMPENSATE
Definition ufbx.h:3696
ufbx_abi void ufbx_catch_compute_topology(ufbx_panic *panic, const ufbx_mesh *mesh, ufbx_topo_edge *topo, size_t num_topo)
Definition ufbx.cpp:32477
UFBX_ERROR_UNINITIALIZED_OPTIONS
Definition ufbx.h:4304
UFBX_TIME_PROTOCOL_SMPTE
Definition ufbx.h:3880
UFBX_GATE_FIT_VERTICAL
Definition ufbx.h:1507
ufbx_abi ufbx_quat ufbx_euler_to_quat(ufbx_vec3 v, ufbx_rotation_order order)
Definition ufbx.cpp:31566
UFBX_PROP_FLAG_USER_DEFINED
Definition ufbx.h:486
ufbx_abi uint32_t ufbx_catch_topo_next_vertex_edge(ufbx_panic *panic, const ufbx_topo_edge *topo, size_t num_topo, uint32_t index)
Definition ufbx.cpp:32484
UFBX_ROTATION_ORDER_SPHERIC
Definition ufbx.h:348
UFBX_BAKE_STEP_HANDLING_DEFAULT
Definition ufbx.h:5015
UFBX_MATERIAL_FBX_SPECULAR_COLOR
Definition ufbx.h:2395
ufbx_abi ufbx_material * ufbx_find_material(const ufbx_scene *scene, const char *name)
Definition ufbx.cpp:33153
struct ufbx_scene ufbx_scene
Definition ufbx.h:574
ufbx_abi ufbx_material * ufbx_as_material(const ufbx_element *element)
Definition ufbx.cpp:33058
#define UFBX_PANIC_MESSAGE_LENGTH
Definition ufbx.h:164
UFBX_BLEND_DIVIDE
Definition ufbx.h:2726
ufbx_abi ufbx_baked_node * ufbx_find_baked_node(ufbx_baked_anim *bake, ufbx_node *node)
Definition ufbx.cpp:31320
UFBX_BLEND_ADDITIVE
Definition ufbx.h:2702
UFBX_WARNING_BAD_VERTEX_W_ATTRIBUTE
Definition ufbx.h:3552
UFBX_PROGRESS_CONTINUE
Definition ufbx.h:4383
void ufbx_close_fn(void *user)
Definition ufbx.h:4153
ufbx_abi ufbx_character * ufbx_as_character(const ufbx_element *element)
Definition ufbx.cpp:33070
UFBX_WARNING_BAD_BASE64_CONTENT
Definition ufbx.h:3570
UFBX_ELEMENT_SHADER_BINDING
Definition ufbx.h:723
void * ufbx_realloc_fn(void *user, void *old_ptr, size_t old_size, size_t new_size)
Definition ufbx.h:4088
ufbx_abi ufbx_vec3 ufbx_find_vec3(const ufbx_props *props, const char *name, ufbx_vec3 def)
Definition ufbx.cpp:33144
ufbx_abi ufbx_element * ufbx_find_prop_element_len(const ufbx_element *element, const char *name, size_t name_len, ufbx_element_type type)
Definition ufbx.cpp:30750
UFBX_BAKED_KEY_KEYFRAME
Definition ufbx.h:4502
ufbx_abi int64_t ufbx_find_int_len(const ufbx_props *props, const char *name, size_t name_len, int64_t def)
Definition ufbx.cpp:30672
UFBX_BLEND_DARKEN
Definition ufbx.h:2708
UFBX_LIGHT_AREA
Definition ufbx.h:1392
UFBX_ERROR_ZERO_VERTEX_SIZE
Definition ufbx.h:4307
UFBX_MATERIAL_FBX_EMISSION_COLOR
Definition ufbx.h:2402
UFBX_MATERIAL_PBR_DIFFUSE_ROUGHNESS
Definition ufbx.h:2424
UFBX_OPEN_FILE_OBJ_MTL
Definition ufbx.h:4168
ufbx_abi void ufbx_free_baked_anim(ufbx_baked_anim *bake)
Definition ufbx.cpp:31301
UFBX_TIME_MODE_72_FPS
Definition ufbx.h:3871
UFBX_MATERIAL_FEATURE_PBR
Definition ufbx.h:2484
ufbx_abi ufbx_element * ufbx_find_prop_element(const ufbx_element *element, const char *name, ufbx_element_type type)
Definition ufbx.cpp:33149
ufbx_abi ufbx_scene * ufbx_load_stdio(void *file, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30529
UFBX_CONSTRAINT_AIM_UP_ALIGN_NODE
Definition ufbx.h:3335
ufbx_abi_data const ufbx_string ufbx_empty_string
Definition ufbx.h:5253
UFBX_TIME_MODE_96_FPS
Definition ufbx.h:3870
UFBX_ELEMENT_CHARACTER
Definition ufbx.h:731
UFBX_SUBDIVISION_BOUNDARY_SHARP_CORNERS
Definition ufbx.h:1196
UFBX_MATERIAL_PBR_NORMAL_MAP
Definition ufbx.h:2467
ufbx_abi ufbx_string ufbx_find_shader_prop(const ufbx_shader *shader, const char *name)
Definition ufbx.cpp:33158
UFBX_BLEND_SATURATION
Definition ufbx.h:2728
UFBX_EVALUATE_FLAG_NO_EXTRAPOLATION
Definition ufbx.h:4681
UFBX_SHADER_3DS_MAX_PBR_SPEC_GLOSS
Definition ufbx.h:2368
UFBX_MATERIAL_FEATURE_OPACITY
Definition ufbx.h:2492
void ufbx_close_memory_fn(void *user, void *data, size_t data_size)
Definition ufbx.h:4217
UFBX_WARNING_BAD_ELEMENT_CONNECTED_TO_ROOT
Definition ufbx.h:3573
enum ufbx_evaluate_flags UFBX_FLAG_REPR ufbx_evaluate_flags
UFBX_PROP_FLAG_LOCK_X
Definition ufbx.h:492
UFBX_PROP_TRANSLATION
Definition ufbx.h:466
UFBX_WARNING_MISSING_GEOMETRY_DATA
Definition ufbx.h:3546
UFBX_MIRROR_AXIS_Z
Definition ufbx.h:834
UFBX_MATERIAL_PBR_SPECULAR_FACTOR
Definition ufbx.h:2425
UFBX_CACHE_DATA_FORMAT_VEC3_FLOAT
Definition ufbx.h:2131
UFBX_EXPORTER_BLENDER_BINARY
Definition ufbx.h:3506
UFBX_PROP_INTEGER
Definition ufbx.h:459
ufbx_abi ufbx_baked_node * ufbx_find_baked_node_by_typed_id(ufbx_baked_anim *bake, uint32_t typed_id)
Definition ufbx.cpp:31312
UFBX_TIME_MODE_48_FPS
Definition ufbx.h:3860
UFBX_MATERIAL_PBR_COAT_IOR
Definition ufbx.h:2453
ufbx_abi ufbx_vec3 ufbx_vec3_normalize(ufbx_vec3 v)
Definition ufbx.cpp:31497
UFBX_SKINNING_METHOD_RIGID
Definition ufbx.h:1940
UFBX_INTERPOLATION_CONSTANT_NEXT
Definition ufbx.h:3156
UFBX_CONSTRAINT_AIM_UP_SCENE
Definition ufbx.h:3333
ufbx_abi ufbx_vec3 ufbx_find_vec3_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_vec3 def)
Definition ufbx.cpp:30662
UFBX_BAKED_KEY_REDUCED
Definition ufbx.h:4505
UFBX_DOM_VALUE_ARRAY_F32
Definition ufbx.h:406
#define UFBX_LIST_TYPE(p_name, p_type)
Definition ufbx.h:215
UFBX_MARKER_FK_EFFECTOR
Definition ufbx.h:1855
UFBX_BLEND_DIFFERENCE
Definition ufbx.h:2723
UFBX_CONSTRAINT_SINGLE_CHAIN_IK
Definition ufbx.h:3315
UFBX_PROP_FLAG_HIDDEN
Definition ufbx.h:489
UFBX_BLEND_PIN_LIGHT
Definition ufbx.h:2721
ufbx_abi ufbx_prop ufbx_evaluate_prop_flags_len(const ufbx_anim *anim, const ufbx_element *element, const char *name, size_t name_len, double time, uint32_t flags)
Definition ufbx.cpp:30956
enum ufbx_transform_flags UFBX_FLAG_REPR ufbx_transform_flags
UFBX_EXTRAPOLATION_REPEAT_RELATIVE
Definition ufbx.h:3170
UFBX_PROP_VECTOR
Definition ufbx.h:461
UFBX_CONSTRAINT_IK_POLE_VECTOR
Definition ufbx.h:3346
UFBX_UNICODE_ERROR_HANDLING_REPLACEMENT_CHARACTER
Definition ufbx.h:4474
UFBX_CONSTRAINT_POSITION
Definition ufbx.h:3310
UFBX_MATERIAL_PBR_SPECULAR_ROTATION
Definition ufbx.h:2429
UFBX_BAKED_KEY_STEP_LEFT
Definition ufbx.h:4495
ufbx_abi ufbx_shader_binding * ufbx_as_shader_binding(const ufbx_element *element)
Definition ufbx.cpp:33062
ufbx_abi ptrdiff_t ufbx_inflate(void *dst, size_t dst_size, const ufbx_inflate_input *input, ufbx_inflate_retain *retain)
Definition ufbx.cpp:3131
enum ufbx_pivot_handling UFBX_ENUM_REPR ufbx_pivot_handling
UFBX_EXPORTER_UFBX_WRITE
Definition ufbx.h:3509
UFBX_SHADER_OPENPBR_MATERIAL
Definition ufbx.h:2374
ufbx_abi ufbx_matrix ufbx_matrix_for_normals(const ufbx_matrix *m)
Definition ufbx.cpp:31784
ufbx_abi size_t ufbx_sample_geometry_cache_real(const ufbx_cache_channel *channel, double time, ufbx_real *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts)
Definition ufbx.cpp:32861
ufbx_abi ufbx_prop ufbx_evaluate_prop(const ufbx_anim *anim, const ufbx_element *element, const char *name, double time)
Definition ufbx.cpp:33155
UFBX_TOPO_NON_MANIFOLD
Definition ufbx.h:4051
enum ufbx_subdivision_boundary UFBX_ENUM_REPR ufbx_subdivision_boundary
UFBX_UNICODE_ERROR_HANDLING_UNDERSCORE
Definition ufbx.h:4476
UFBX_ELEMENT_NURBS_TRIM_SURFACE
Definition ufbx.h:705
UFBX_WARNING_DUPLICATE_OBJECT_ID
Definition ufbx.h:3576
UFBX_ERROR_UNRECOGNIZED_FILE_FORMAT
Definition ufbx.h:4298
ufbx_abi ufbx_selection_set * ufbx_as_selection_set(const ufbx_element *element)
Definition ufbx.cpp:33068
UFBX_COORDINATE_AXIS_POSITIVE_Z
Definition ufbx.h:1549
ufbx_abi ufbx_matrix ufbx_matrix_invert(const ufbx_matrix *m)
Definition ufbx.cpp:31756
UFBX_PROJECTION_MODE_PERSPECTIVE
Definition ufbx.h:1455
UFBX_WARNING_IMPLICIT_MTL
Definition ufbx.h:3540
ufbx_abi ufbx_blend_deformer * ufbx_as_blend_deformer(const ufbx_element *element)
Definition ufbx.cpp:33053
UFBX_DOM_VALUE_ARRAY_IGNORED
Definition ufbx.h:409
UFBX_EXTRAPOLATION_SLOPE
Definition ufbx.h:3169
UFBX_MATERIAL_FEATURE_EXIT_TO_BACKGROUND
Definition ufbx.h:2501
UFBX_TIME_MODE_30_FPS_DROP
Definition ufbx.h:3862
UFBX_MATERIAL_PBR_THIN_FILM_THICKNESS
Definition ufbx.h:2460
UFBX_CACHE_FILE_FORMAT_PC2
Definition ufbx.h:2120
ufbx_abi ufbx_blob ufbx_find_blob_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_blob def)
Definition ufbx.cpp:30702
enum ufbx_constraint_ik_pole_type UFBX_ENUM_REPR ufbx_constraint_ik_pole_type
ufbx_abi ufbx_scene * ufbx_load_file_len(const char *filename, size_t filename_len, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30518
enum ufbx_baked_key_flags UFBX_FLAG_REPR ufbx_baked_key_flags
ufbx_abi ufbx_node * ufbx_find_node_len(const ufbx_scene *scene, const char *name, size_t name_len)
Definition ufbx.cpp:30760
ufbx_abi ufbx_nurbs_curve * ufbx_as_nurbs_curve(const ufbx_element *element)
Definition ufbx.cpp:33042
UFBX_ELEMENT_CONSTRAINT
Definition ufbx.h:732
UFBX_UNICODE_ERROR_HANDLING_UNSAFE_IGNORE
Definition ufbx.h:4486
UFBX_SPACE_CONVERSION_ADJUST_TRANSFORMS
Definition ufbx.h:3633
UFBX_PROP_FLAG_MUTE_W
Definition ufbx.h:501
enum ufbx_cache_data_format UFBX_ENUM_REPR ufbx_cache_data_format
UFBX_ERROR_OUT_OF_MEMORY
Definition ufbx.h:4277
ufbx_abi ufbx_pose * ufbx_as_pose(const ufbx_element *element)
Definition ufbx.cpp:33074
UFBX_MATERIAL_FEATURE_COAT_ROUGHNESS_AS_GLOSSINESS
Definition ufbx.h:2505
#define UFBX_FLAG_REPR
Definition ufbx.h:230
UFBX_BLEND_HARD_LIGHT
Definition ufbx.h:2718
UFBX_SHADER_BLENDER_PHONG
Definition ufbx.h:2381
ufbx_abi_data const ufbx_blob ufbx_empty_blob
Definition ufbx.h:5254
UFBX_SHADER_SHADERFX_GRAPH
Definition ufbx.h:2377
ufbx_abi size_t ufbx_read_geometry_cache_vec3(const ufbx_cache_frame *frame, ufbx_vec3 *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts)
Definition ufbx.cpp:32933
UFBX_DOM_VALUE_BLOB
Definition ufbx.h:403
UFBX_MATERIAL_PBR_INDIRECT_DIFFUSE
Definition ufbx.h:2465
UFBX_MATERIAL_FEATURE_THIN_WALLED
Definition ufbx.h:2499
UFBX_MATERIAL_FEATURE_CAUSTICS
Definition ufbx.h:2500
enum ufbx_subdivision_display_mode UFBX_ENUM_REPR ufbx_subdivision_display_mode
UFBX_ELEMENT_SKIN_CLUSTER
Definition ufbx.h:713
UFBX_MATERIAL_PBR_COAT_ROUGHNESS
Definition ufbx.h:2452
UFBX_BLEND_HUE
Definition ufbx.h:2727
UFBX_MATERIAL_PBR_SPECULAR_COLOR
Definition ufbx.h:2426
UFBX_BLEND_HARD_MIX
Definition ufbx.h:2722
enum ufbx_cache_data_encoding UFBX_ENUM_REPR ufbx_cache_data_encoding
#define UFBX_REAL_TYPE
Definition ufbx.h:158
UFBX_BLEND_VIVID_LIGHT
Definition ufbx.h:2719
ufbx_abi ufbx_anim_curve * ufbx_as_anim_curve(const ufbx_element *element)
Definition ufbx.cpp:33066
#define UFBX_FLAG_FORCE_WIDTH(p_prefix)
Definition ufbx.h:231
UFBX_UNICODE_ERROR_HANDLING_ABORT_LOADING
Definition ufbx.h:4482
UFBX_MATERIAL_PBR_SPECULAR_ANISOTROPY
Definition ufbx.h:2428
ufbx_abi size_t ufbx_catch_generate_normal_mapping(ufbx_panic *panic, const ufbx_mesh *mesh, const ufbx_topo_edge *topo, size_t num_topo, uint32_t *normal_indices, size_t num_normal_indices, bool assume_smooth)
Definition ufbx.cpp:32534
UFBX_ELEMENT_AUDIO_CLIP
Definition ufbx.h:734
UFBX_THUMBNAIL_FORMAT_RGB_24
Definition ufbx.h:3612
UFBX_ELEMENT_TEXTURE
Definition ufbx.h:720
UFBX_MATERIAL_FBX_TRANSPARENCY_COLOR
Definition ufbx.h:2400
UFBX_MATERIAL_PBR_COAT_ANISOTROPY
Definition ufbx.h:2454
enum ufbx_aspect_mode UFBX_ENUM_REPR ufbx_aspect_mode
ufbx_abi ufbx_marker * ufbx_as_marker(const ufbx_element *element)
Definition ufbx.cpp:33049
UFBX_TIME_MODE_CUSTOM
Definition ufbx.h:3869
ufbx_abi ufbx_baked_element * ufbx_find_baked_element_by_element_id(ufbx_baked_anim *bake, uint32_t element_id)
Definition ufbx.cpp:31326
UFBX_TIME_MODE_50_FPS
Definition ufbx.h:3859
UFBX_BLEND_LINEAR_BURN
Definition ufbx.h:2710
UFBX_MATERIAL_FEATURE_UNLIT
Definition ufbx.h:2495
UFBX_LOD_DISPLAY_USE_LOD
Definition ufbx.h:1879
UFBX_ERROR_NODE_DEPTH_LIMIT
Definition ufbx.h:4326
ufbx_abi ufbx_float_list ufbx_dom_as_float_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33103
enum ufbx_space_conversion UFBX_ENUM_REPR ufbx_space_conversion
ufbx_unsafe ufbx_abi void * ufbx_thread_pool_get_user_ptr(ufbx_thread_pool_context ctx)
Definition ufbx.cpp:32987
UFBX_PROP_DATE_TIME
Definition ufbx.h:465
UFBX_MATERIAL_FEATURE_DIFFUSE
Definition ufbx.h:2486
bool ufbx_skip_fn(void *user, size_t size)
Definition ufbx.h:4146
UFBX_TRANSFORM_FLAG_INCLUDE_ROTATION
Definition ufbx.h:5467
ufbx_abi ufbx_node * ufbx_as_node(const ufbx_element *element)
Definition ufbx.cpp:33035
UFBX_ERROR_UNSUPPORTED_VERSION
Definition ufbx.h:4341
UFBX_BLEND_COLOR
Definition ufbx.h:2729
UFBX_MATERIAL_PBR_SHEEN_ROUGHNESS
Definition ufbx.h:2449
UFBX_ELEMENT_LIGHT
Definition ufbx.h:698
UFBX_CACHE_DATA_ENCODING_LITTLE_ENDIAN
Definition ufbx.h:2142
UFBX_ERROR_INVALID_UTF8
Definition ufbx.h:4313
UFBX_SHADER_ARNOLD_STANDARD_SURFACE
Definition ufbx.h:2359
UFBX_FILE_FORMAT_FBX
Definition ufbx.h:3524
UFBX_ELEMENT_SELECTION_NODE
Definition ufbx.h:730
UFBX_WRAP_REPEAT
Definition ufbx.h:2740
UFBX_APERTURE_FORMAT_35MM_ACADEMY
Definition ufbx.h:1529
ufbx_abi size_t ufbx_format_error(char *dst, size_t dst_size, const ufbx_error *error)
Definition ufbx.cpp:30598
ufbx_inline ufbx_vec2 ufbx_get_vertex_vec2(const ufbx_vertex_vec2 *v, size_t index)
Definition ufbx.h:5764
enum ufbx_light_type UFBX_ENUM_REPR ufbx_light_type
UFBX_BAKED_KEY_STEP_KEY
Definition ufbx.h:4500
UFBX_MATERIAL_PBR_SUBSURFACE_TINT_COLOR
Definition ufbx.h:2445
UFBX_MATERIAL_PBR_COAT_AFFECT_BASE_COLOR
Definition ufbx.h:2457
UFBX_SKINNING_METHOD_LINEAR
Definition ufbx.h:1938
void * ufbx_alloc_fn(void *user, size_t size)
Definition ufbx.h:4082
enum ufbx_material_fbx_map UFBX_ENUM_REPR ufbx_material_fbx_map
UFBX_GEOMETRY_TRANSFORM_HANDLING_HELPER_NODES
Definition ufbx.h:3662
ufbx_abi ufbx_quat ufbx_quat_slerp(ufbx_quat a, ufbx_quat b, ufbx_real t)
Definition ufbx.cpp:31527
UFBX_COORDINATE_AXIS_NEGATIVE_Z
Definition ufbx.h:1550
ufbx_abi ufbx_texture * ufbx_find_prop_texture(const ufbx_material *material, const char *name)
Definition ufbx.cpp:33157
enum ufbx_thumbnail_format UFBX_ENUM_REPR ufbx_thumbnail_format
UFBX_SNAP_MODE_SNAP_AND_PLAY
Definition ufbx.h:3893
UFBX_DOM_VALUE_ARRAY_BLOB
Definition ufbx.h:408
ufbx_abi ufbx_anim_prop * ufbx_find_anim_prop(const ufbx_anim_layer *layer, const ufbx_element *element, const char *prop)
Definition ufbx.cpp:33154
UFBX_MATERIAL_PBR_TRANSMISSION_ROUGHNESS
Definition ufbx.h:2436
UFBX_COORDINATE_AXIS_UNKNOWN
Definition ufbx.h:1551
UFBX_WRAP_CLAMP
Definition ufbx.h:2741
ufbx_abi ufbx_matrix ufbx_catch_get_skin_vertex_matrix(ufbx_panic *panic, const ufbx_skin_deformer *skin, size_t vertex, const ufbx_matrix *fallback)
Definition ufbx.cpp:31928
UFBX_MATERIAL_FBX_DIFFUSE_FACTOR
Definition ufbx.h:2392
UFBX_COORDINATE_AXIS_POSITIVE_X
Definition ufbx.h:1545
ufbx_abi ufbx_vec3 ufbx_transform_direction(const ufbx_matrix *m, ufbx_vec3 v)
Definition ufbx.cpp:31816
UFBX_MATERIAL_FBX_VECTOR_DISPLACEMENT
Definition ufbx.h:2411
UFBX_MATERIAL_FEATURE_INTERNAL_REFLECTIONS
Definition ufbx.h:2502
UFBX_CONSTRAINT_PARENT
Definition ufbx.h:3309
UFBX_CONSTRAINT_SCALE
Definition ufbx.h:3312
UFBX_WARNING_BAD_UNICODE
Definition ufbx.h:3567
UFBX_MATERIAL_PBR_SUBSURFACE_COLOR
Definition ufbx.h:2441
struct ufbx_line_curve ufbx_line_curve
Definition ufbx.h:598
UFBX_MATERIAL_PBR_INDIRECT_SPECULAR
Definition ufbx.h:2466
ufbx_abi ufbx_real_list ufbx_dom_as_real_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33121
UFBX_MATERIAL_FEATURE_TRANSMISSION_ROUGHNESS_AS_GLOSSINESS
Definition ufbx.h:2506
ufbx_abi_data const ufbx_quat ufbx_identity_quat
Definition ufbx.h:5260
ufbx_abi uint32_t ufbx_topo_next_vertex_edge(const ufbx_topo_edge *topo, size_t num_topo, uint32_t index)
Definition ufbx.cpp:33171
UFBX_MATERIAL_PBR_TRANSMISSION_DEPTH
Definition ufbx.h:2432
UFBX_SHADER_UNKNOWN
Definition ufbx.h:2349
UFBX_NURBS_TOPOLOGY_OPEN
Definition ufbx.h:1698
UFBX_TIME_MODE_FILM_FULL_FRAME
Definition ufbx.h:3868
ufbx_abi ufbx_texture * ufbx_find_prop_texture_len(const ufbx_material *material, const char *name, size_t name_len)
Definition ufbx.cpp:31414
UFBX_TEXTURE_LAYERED
Definition ufbx.h:2682
ufbx_abi ufbx_metadata_object * ufbx_as_metadata_object(const ufbx_element *element)
Definition ufbx.cpp:33075
UFBX_PROP_FLAG_NO_VALUE
Definition ufbx.h:521
UFBX_ELEMENT_LINE_CURVE
Definition ufbx.h:702
ufbx_abi void ufbx_retain_baked_anim(ufbx_baked_anim *bake)
Definition ufbx.cpp:31291
UFBX_MATERIAL_FEATURE_IOR
Definition ufbx.h:2496
enum ufbx_unicode_error_handling UFBX_ENUM_REPR ufbx_unicode_error_handling
ufbx_abi ufbx_geometry_cache * ufbx_load_geometry_cache(const char *filename, const ufbx_geometry_cache_opts *opts, ufbx_error *error)
Definition ufbx.cpp:32649
UFBX_APERTURE_FORMAT_35MM_185_PROJECTION
Definition ufbx.h:1532
UFBX_LIGHT_DIRECTIONAL
Definition ufbx.h:1386
UFBX_SUBDIVISION_DISPLAY_SMOOTH
Definition ufbx.h:1185
ufbx_abi ufbx_anim_prop * ufbx_find_anim_prop_len(const ufbx_anim_layer *layer, const ufbx_element *element, const char *prop, size_t prop_len)
Definition ufbx.cpp:30775
UFBX_MATERIAL_FBX_TRANSPARENCY_FACTOR
Definition ufbx.h:2399
ufbx_abi ufbx_geometry_cache * ufbx_load_geometry_cache_len(const char *filename, size_t filename_len, const ufbx_geometry_cache_opts *opts, ufbx_error *error)
Definition ufbx.cpp:32657
UFBX_MATERIAL_PBR_SUBSURFACE_SCALE
Definition ufbx.h:2443
UFBX_WARNING_TYPE_FIRST_DEDUPLICATED
Definition ufbx.h:3587
UFBX_MATERIAL_FEATURE_TRANSMISSION_ROUGHNESS
Definition ufbx.h:2498
ufbx_abi void ufbx_free_anim(ufbx_anim *anim)
Definition ufbx.cpp:31220
ufbx_abi ufbx_dom_node * ufbx_dom_find(const ufbx_dom_node *parent, const char *name)
Definition ufbx.cpp:33161
UFBX_LIGHT_DECAY_LINEAR
Definition ufbx.h:1405
ufbx_abi ufbx_bone_pose * ufbx_get_bone_pose(const ufbx_pose *pose, const ufbx_node *node)
Definition ufbx.cpp:31405
ufbx_abi ufbx_blob_list ufbx_dom_as_blob_list(const ufbx_dom_node *node)
Definition ufbx.cpp:33130
enum ufbx_shader_texture_type UFBX_ENUM_REPR ufbx_shader_texture_type
ufbx_abi ufbx_texture * ufbx_as_texture(const ufbx_element *element)
Definition ufbx.cpp:33059
ufbx_abi void ufbx_retain_geometry_cache(ufbx_geometry_cache *cache)
Definition ufbx.cpp:32677
UFBX_BLEND_LINEAR_DODGE
Definition ufbx.h:2715
ufbx_abi ufbx_video * ufbx_as_video(const ufbx_element *element)
Definition ufbx.cpp:33060
enum ufbx_error_type UFBX_ENUM_REPR ufbx_error_type
#define UFBX_CALLBACK_IMPL(p_name, p_fn, p_return, p_params, p_args)
Definition ufbx.h:252
UFBX_NURBS_TOPOLOGY_CLOSED
Definition ufbx.h:1702
ufbx_abi void ufbx_add_blend_shape_vertex_offsets(const ufbx_blend_shape *shape, ufbx_vec3 *vertices, size_t num_vertices, ufbx_real weight)
Definition ufbx.cpp:32062
#define UFBX_CONVERSION_TO_IMPL(p_name)
Definition ufbx.h:202
UFBX_BLEND_EXCLUSION
Definition ufbx.h:2724
ufbx_abi ufbx_prop ufbx_evaluate_prop_len(const ufbx_anim *anim, const ufbx_element *element, const char *name, size_t name_len, double time)
Definition ufbx.cpp:30951
UFBX_APERTURE_FORMAT_CUSTOM
Definition ufbx.h:1526
UFBX_MATERIAL_PBR_TRANSMISSION_SCATTER
Definition ufbx.h:2433
UFBX_SHADER_TEXTURE_UNKNOWN
Definition ufbx.h:2758
UFBX_INDEX_ERROR_HANDLING_CLAMP
Definition ufbx.h:4453
ufbx_inline ufbx_vec4 ufbx_get_vertex_vec4(const ufbx_vertex_vec4 *v, size_t index)
Definition ufbx.h:5766
UFBX_APERTURE_FORMAT_35MM_FULL_APERTURE
Definition ufbx.h:1531
enum ufbx_open_file_type UFBX_ENUM_REPR ufbx_open_file_type
UFBX_TRANSFORM_FLAG_NO_EXTRAPOLATION
Definition ufbx.h:5473
enum ufbx_progress_result UFBX_ENUM_REPR ufbx_progress_result
ufbx_abi ufbx_real ufbx_evaluate_anim_value_real_flags(const ufbx_anim_value *anim_value, double time, uint32_t flags)
Definition ufbx.cpp:30926
UFBX_INHERIT_MODE_HANDLING_COMPENSATE_NO_FALLBACK
Definition ufbx.h:3700
#define UFBX_ERROR_STACK_MAX_DEPTH
Definition ufbx.h:163
UFBX_ELEMENT_METADATA_OBJECT
Definition ufbx.h:736
enum ufbx_rotation_order UFBX_ENUM_REPR ufbx_rotation_order
UFBX_LIGHT_DECAY_CUBIC
Definition ufbx.h:1407
UFBX_INTERPOLATION_CUBIC
Definition ufbx.h:3158
UFBX_ERROR_THREADED_ASCII_PARSE
Definition ufbx.h:4331
ufbx_abi ufbx_vec3 ufbx_catch_get_vertex_vec3(ufbx_panic *panic, const ufbx_vertex_vec3 *v, size_t index)
Definition ufbx.cpp:33009
enum ufbx_light_area_shape UFBX_ENUM_REPR ufbx_light_area_shape
ufbx_unsafe ufbx_abi void ufbx_thread_pool_set_user_ptr(ufbx_thread_pool_context ctx, void *user_ptr)
Definition ufbx.cpp:32981
ufbx_abi ufbx_real ufbx_evaluate_blend_weight(const ufbx_anim *anim, const ufbx_blend_channel *channel, double time)
Definition ufbx.cpp:31162
ufbx_abi_data const uint32_t ufbx_source_version
Definition ufbx.h:5272
UFBX_MATERIAL_FEATURE_DOUBLE_SIDED
Definition ufbx.h:2503
ufbx_abi ufbx_matrix ufbx_transform_to_matrix(const ufbx_transform *t)
Definition ufbx.cpp:31828
UFBX_WARNING_MISSING_POLYGON_MAPPING
Definition ufbx.h:3555
ufbx_abi ufbx_vec3 ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list keyframes, double time)
Definition ufbx.cpp:31340
ufbx_abi_data const ufbx_coordinate_axes ufbx_axes_right_handed_y_up
Definition ufbx.h:5263
ufbx_abi bool ufbx_dom_is_array(const ufbx_dom_node *node)
Definition ufbx.cpp:33077
enum ufbx_aperture_format UFBX_ENUM_REPR ufbx_aperture_format
ufbx_abi ufbx_vec3 ufbx_catch_get_weighted_face_normal(ufbx_panic *panic, const ufbx_vertex_vec3 *positions, ufbx_face face)
Definition ufbx.cpp:32501
bool ufbx_thread_pool_init_fn(void *user, ufbx_thread_pool_context ctx, const ufbx_thread_pool_info *info)
Definition ufbx.h:4623
ufbx_abi_data const ufbx_coordinate_axes ufbx_axes_left_handed_z_up
Definition ufbx.h:5266
UFBX_PROP_FLAG_OVERRIDDEN
Definition ufbx.h:525
UFBX_ELEMENT_SHADER
Definition ufbx.h:722
ufbx_abi bool ufbx_is_thread_safe(void)
Definition ufbx.cpp:30497
ufbx_inline ufbx_matrix ufbx_get_skin_vertex_matrix(const ufbx_skin_deformer *skin, size_t vertex, const ufbx_matrix *fallback)
Definition ufbx.h:5601
enum ufbx_snap_mode UFBX_ENUM_REPR ufbx_snap_mode
ufbx_abi ufbx_dom_node * ufbx_dom_find_len(const ufbx_dom_node *parent, const char *name, size_t name_len)
Definition ufbx.cpp:32957
UFBX_SNAP_MODE_NONE
Definition ufbx.h:3890
ufbx_abi ufbx_real ufbx_find_real(const ufbx_props *props, const char *name, ufbx_real def)
Definition ufbx.cpp:33143
UFBX_SUBDIVISION_DISPLAY_DISABLED
Definition ufbx.h:1182
UFBX_TIME_MODE_DEFAULT
Definition ufbx.h:3855
ufbx_abi size_t ufbx_generate_indices(const ufbx_vertex_stream *streams, size_t num_streams, uint32_t *indices, size_t num_indices, const ufbx_allocator_opts *allocator, ufbx_error *error)
Definition ufbx.cpp:32966
ufbx_abi ufbx_scene * ufbx_load_stdio_prefix(void *file, const void *prefix, size_t prefix_size, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30534
ufbx_abi ufbx_real ufbx_catch_get_vertex_real(ufbx_panic *panic, const ufbx_vertex_real *v, size_t index)
Definition ufbx.cpp:32993
UFBX_MATERIAL_FBX_NORMAL_MAP
Definition ufbx.h:2405
UFBX_TRANSFORM_FLAG_IGNORE_COMPONENTWISE_SCALE
Definition ufbx.h:5459
UFBX_APERTURE_FORMAT_35MM_ANAMORPHIC
Definition ufbx.h:1533
enum ufbx_interpolation UFBX_ENUM_REPR ufbx_interpolation
ufbx_abi_data const ufbx_vec4 ufbx_zero_vec4
Definition ufbx.h:5259
ufbx_abi ufbx_baked_element * ufbx_find_baked_element(ufbx_baked_anim *bake, ufbx_element *element)
Definition ufbx.cpp:31334
UFBX_SPACE_CONVERSION_TRANSFORM_ROOT
Definition ufbx.h:3627
UFBX_PROGRESS_CANCEL
Definition ufbx.h:4386
UFBX_ROTATION_ORDER_YXZ
Definition ufbx.h:345
UFBX_BAKE_STEP_HANDLING_IGNORE
Definition ufbx.h:5034
UFBX_MATERIAL_PBR_COAT_NORMAL
Definition ufbx.h:2456
UFBX_CACHE_INTERPRETATION_VERTEX_NORMAL
Definition ufbx.h:2163
UFBX_MATERIAL_PBR_ROUGHNESS
Definition ufbx.h:2422
UFBX_TIME_MODE_24_FPS
Definition ufbx.h:3866
UFBX_INDEX_ERROR_HANDLING_UNSAFE_IGNORE
Definition ufbx.h:4465
UFBX_TIME_MODE_60_FPS
Definition ufbx.h:3858
ufbx_abi ufbx_prop ufbx_evaluate_prop_flags(const ufbx_anim *anim, const ufbx_element *element, const char *name, double time, uint32_t flags)
Definition ufbx.cpp:33156
ufbx_abi uint32_t ufbx_find_face_index(ufbx_mesh *mesh, size_t index)
Definition ufbx.cpp:32381
ufbx_abi ufbx_nurbs_surface * ufbx_as_nurbs_surface(const ufbx_element *element)
Definition ufbx.cpp:33043
UFBX_TEXTURE_SHADER
Definition ufbx.h:2689
ufbx_abi ufbx_element * ufbx_find_element_len(const ufbx_scene *scene, ufbx_element_type type, const char *name, size_t name_len)
Definition ufbx.cpp:30730
ufbx_inline ufbx_real ufbx_get_vertex_real(const ufbx_vertex_real *v, size_t index)
Definition ufbx.h:5763
UFBX_ELEMENT_STEREO_CAMERA
Definition ufbx.h:708
ufbx_abi void ufbx_compute_topology(const ufbx_mesh *mesh, ufbx_topo_edge *topo, size_t num_topo)
Definition ufbx.cpp:33168
ufbx_abi ufbx_nurbs_trim_surface * ufbx_as_nurbs_trim_surface(const ufbx_element *element)
Definition ufbx.cpp:33044
UFBX_MATERIAL_PBR_TRANSMISSION_DISPERSION
Definition ufbx.h:2435
UFBX_MATERIAL_PBR_METALNESS
Definition ufbx.h:2423
UFBX_ELEMENT_TYPE_LAST_ATTRIB
Definition ufbx.h:739
UFBX_SHADER_GLTF_MATERIAL
Definition ufbx.h:2371
ufbx_abi ufbx_display_layer * ufbx_as_display_layer(const ufbx_element *element)
Definition ufbx.cpp:33067
UFBX_CACHE_DATA_ENCODING_UNKNOWN
Definition ufbx.h:2141
UFBX_ELEMENT_BLEND_DEFORMER
Definition ufbx.h:714
struct ufbx_anim ufbx_anim
UFBX_INHERIT_MODE_IGNORE_PARENT_SCALE
Definition ufbx.h:814
UFBX_WARNING_TRUNCATED_ARRAY
Definition ufbx.h:3543
UFBX_BLEND_LIGHTER_COLOR
Definition ufbx.h:2716
UFBX_CONSTRAINT_UNKNOWN
Definition ufbx.h:3307
void ufbx_free_allocator_fn(void *user)
Definition ufbx.h:4094
UFBX_ERROR_ALLOCATION_LIMIT
Definition ufbx.h:4283
UFBX_PROP_FLAG_LOCK_Z
Definition ufbx.h:494
UFBX_MATERIAL_FBX_DISPLACEMENT_FACTOR
Definition ufbx.h:2408
UFBX_MATERIAL_FBX_REFLECTION_COLOR
Definition ufbx.h:2398
UFBX_ERROR_EMPTY_FILE
Definition ufbx.h:4270
UFBX_MATERIAL_PBR_EMISSION_FACTOR
Definition ufbx.h:2462
UFBX_EXPORTER_UNKNOWN
Definition ufbx.h:3504
UFBX_CONSTRAINT_AIM_UP_TO_NODE
Definition ufbx.h:3334
ufbx_abi bool ufbx_find_bool(const ufbx_props *props, const char *name, bool def)
Definition ufbx.cpp:33146
UFBX_INHERIT_MODE_HANDLING_IGNORE
Definition ufbx.h:3706
ufbx_abi ufbx_element * ufbx_get_prop_element(const ufbx_element *element, const ufbx_prop *prop, ufbx_element_type type)
Definition ufbx.cpp:30743
ufbx_abi ufbx_shader * ufbx_as_shader(const ufbx_element *element)
Definition ufbx.cpp:33061
UFBX_TIME_MODE_59_94_FPS
Definition ufbx.h:3872
ufbx_abi void ufbx_compute_normals(const ufbx_mesh *mesh, const ufbx_vertex_vec3 *positions, const uint32_t *normal_indices, size_t num_normal_indices, ufbx_vec3 *normals, size_t num_normals)
Definition ufbx.cpp:32614
UFBX_NURBS_TOPOLOGY_PERIODIC
Definition ufbx.h:1700
UFBX_ELEMENT_NODE
Definition ufbx.h:696
ufbx_abi ufbx_stereo_camera * ufbx_as_stereo_camera(const ufbx_element *element)
Definition ufbx.cpp:33047
UFBX_SPACE_CONVERSION_MODIFY_GEOMETRY
Definition ufbx.h:3638
ufbx_abi ufbx_vec3 ufbx_transform_position(const ufbx_matrix *m, ufbx_vec3 v)
Definition ufbx.cpp:31804
enum ufbx_projection_mode UFBX_ENUM_REPR ufbx_projection_mode
UFBX_TIME_MODE_1000_FPS
Definition ufbx.h:3867
UFBX_MATERIAL_PBR_AMBIENT_OCCLUSION
Definition ufbx.h:2472
enum ufbx_extrapolation_mode UFBX_ENUM_REPR ufbx_extrapolation_mode
ufbx_abi ufbx_quat ufbx_quat_normalize(ufbx_quat q)
Definition ufbx.cpp:31507
ufbx_abi void ufbx_add_blend_vertex_offsets(const ufbx_blend_deformer *blend, ufbx_vec3 *vertices, size_t num_vertices, ufbx_real weight)
Definition ufbx.cpp:32083
UFBX_TRANSFORM_FLAG_INCLUDE_TRANSLATION
Definition ufbx.h:5465
ufbx_abi ufbx_element * ufbx_find_element(const ufbx_scene *scene, ufbx_element_type type, const char *name)
Definition ufbx.cpp:33150
UFBX_ELEMENT_CACHE_FILE
Definition ufbx.h:718
UFBX_PROP_FLAG_MUTE_Y
Definition ufbx.h:499
ufbx_abi ufbx_string ufbx_find_string(const ufbx_props *props, const char *name, ufbx_string def)
Definition ufbx.cpp:33147
UFBX_MATERIAL_FBX_BUMP_FACTOR
Definition ufbx.h:2407
UFBX_MATERIAL_PBR_TRANSMISSION_GLOSSINESS
Definition ufbx.h:2475
UFBX_MATERIAL_PBR_THIN_FILM_IOR
Definition ufbx.h:2461
UFBX_TRANSFORM_FLAG_IGNORE_SCALE_HELPER
Definition ufbx.h:5454
UFBX_ERROR_TRUNCATED_FILE
Definition ufbx.h:4286
UFBX_BLEND_OVERLAY
Definition ufbx.h:2731
UFBX_ERROR_CANCELLED
Definition ufbx.h:4293
UFBX_MATERIAL_FEATURE_MATTE
Definition ufbx.h:2494
struct ufbx_baked_anim ufbx_baked_anim
ufbx_abi ufbx_real ufbx_evaluate_curve(const ufbx_anim_curve *curve, double time, ufbx_real default_value)
Definition ufbx.cpp:30827
UFBX_MATERIAL_PBR_SHEEN_FACTOR
Definition ufbx.h:2447
enum ufbx_cache_interpretation UFBX_ENUM_REPR ufbx_cache_interpretation
UFBX_GATE_FIT_NONE
Definition ufbx.h:1505
ufbx_abi uint32_t ufbx_topo_prev_vertex_edge(const ufbx_topo_edge *topo, size_t num_topo, uint32_t index)
Definition ufbx.cpp:33174
UFBX_CACHE_FILE_FORMAT_MC
Definition ufbx.h:2121
UFBX_MATERIAL_FEATURE_METALNESS
Definition ufbx.h:2485
UFBX_ROTATION_ORDER_ZYX
Definition ufbx.h:347
UFBX_BLEND_TRANSLUCENT
Definition ufbx.h:2701
ufbx_abi ufbx_camera_switcher * ufbx_as_camera_switcher(const ufbx_element *element)
Definition ufbx.cpp:33048
UFBX_DOM_VALUE_ARRAY_F64
Definition ufbx.h:407
UFBX_GATE_FIT_HORIZONTAL
Definition ufbx.h:1509
UFBX_CACHE_INTERPRETATION_UNKNOWN
Definition ufbx.h:2153
UFBX_MATERIAL_FEATURE_EMISSION
Definition ufbx.h:2488
ufbx_abi size_t ufbx_sample_geometry_cache_vec3(const ufbx_cache_channel *channel, double time, ufbx_vec3 *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts)
Definition ufbx.cpp:32945
UFBX_CACHE_INTERPRETATION_POINTS
Definition ufbx.h:2157
UFBX_MATERIAL_PBR_THIN_FILM_FACTOR
Definition ufbx.h:2459
UFBX_MATERIAL_FEATURE_ROUGHNESS_AS_GLOSSINESS
Definition ufbx.h:2504
UFBX_BAKED_KEY_STEP_RIGHT
Definition ufbx.h:4497
UFBX_PROP_FLAG_MUTE_X
Definition ufbx.h:498
UFBX_PROP_SCALING
Definition ufbx.h:468
enum ufbx_wrap_mode UFBX_ENUM_REPR ufbx_wrap_mode
UFBX_APERTURE_MODE_HORIZONTAL_AND_VERTICAL
Definition ufbx.h:1488
ufbx_abi ufbx_line_curve * ufbx_as_line_curve(const ufbx_element *element)
Definition ufbx.cpp:33041
ufbx_abi ufbx_node * ufbx_find_node(const ufbx_scene *scene, const char *name)
Definition ufbx.cpp:33151
UFBX_ELEMENT_PROCEDURAL_GEOMETRY
Definition ufbx.h:707
ufbx_abi ufbx_nurbs_trim_boundary * ufbx_as_nurbs_trim_boundary(const ufbx_element *element)
Definition ufbx.cpp:33045
ufbx_abi ufbx_bone * ufbx_as_bone(const ufbx_element *element)
Definition ufbx.cpp:33039
UFBX_ROTATION_ORDER_YZX
Definition ufbx.h:344
UFBX_INTERPOLATION_CONSTANT_PREV
Definition ufbx.h:3155
ufbx_abi ufbx_constraint * ufbx_as_constraint(const ufbx_element *element)
Definition ufbx.cpp:33071
enum ufbx_prop_flags UFBX_FLAG_REPR ufbx_prop_flags
enum ufbx_geometry_transform_handling UFBX_ENUM_REPR ufbx_geometry_transform_handling
UFBX_MATERIAL_FBX_AMBIENT_COLOR
Definition ufbx.h:2404
UFBX_MATERIAL_PBR_SPECULAR_IOR
Definition ufbx.h:2427
enum ufbx_exporter UFBX_ENUM_REPR ufbx_exporter
UFBX_SHADER_OSL_STANDARD_SURFACE
Definition ufbx.h:2356
ufbx_abi size_t ufbx_dom_array_size(const ufbx_dom_node *node)
Definition ufbx.cpp:33082
ufbx_abi ufbx_prop * ufbx_find_prop_concat(const ufbx_props *props, const ufbx_string *parts, size_t num_parts)
Definition ufbx.cpp:30712
ufbx_abi ufbx_skin_deformer * ufbx_as_skin_deformer(const ufbx_element *element)
Definition ufbx.cpp:33051
UFBX_MATERIAL_FBX_SPECULAR_FACTOR
Definition ufbx.h:2394
UFBX_PROP_FLAG_VALUE_REAL
Definition ufbx.h:530
UFBX_LIGHT_DECAY_NONE
Definition ufbx.h:1404
UFBX_PROJECTION_MODE_ORTHOGRAPHIC
Definition ufbx.h:1458
ufbx_abi ufbx_props ufbx_evaluate_props_flags(const ufbx_anim *anim, const ufbx_element *element, double time, ufbx_prop *buffer, size_t buffer_size, uint32_t flags)
Definition ufbx.cpp:30996
UFBX_LOD_DISPLAY_SHOW
Definition ufbx.h:1880
ufbx_abi ufbx_shader_texture_input * ufbx_find_shader_texture_input(const ufbx_shader_texture *shader, const char *name)
Definition ufbx.cpp:33160
UFBX_ELEMENT_ANIM_LAYER
Definition ufbx.h:725
ufbx_abi ufbx_vec3 ufbx_get_weighted_face_normal(const ufbx_vertex_vec3 *positions, ufbx_face face)
Definition ufbx.cpp:33177
ufbx_abi ufbx_string ufbx_find_string_len(const ufbx_props *props, const char *name, size_t name_len, ufbx_string def)
Definition ufbx.cpp:30692
UFBX_INTERPOLATION_LINEAR
Definition ufbx.h:3157
UFBX_SHADER_TEXTURE_OSL
Definition ufbx.h:2767
UFBX_MATERIAL_FEATURE_SHEEN
Definition ufbx.h:2491
UFBX_WARNING_INDEX_CLAMPED
Definition ufbx.h:3563
UFBX_BLEND_LUMINOSITY
Definition ufbx.h:2730
UFBX_PROP_FLAG_VALUE_VEC4
Definition ufbx.h:533
UFBX_TEXTURE_FILE
Definition ufbx.h:2679
ufbx_abi ufbx_empty * ufbx_as_empty(const ufbx_element *element)
Definition ufbx.cpp:33040
ufbx_abi_data const ufbx_vec2 ufbx_zero_vec2
Definition ufbx.h:5257
UFBX_FILE_FORMAT_OBJ
Definition ufbx.h:3525
ufbx_abi ufbx_vec3 ufbx_get_blend_shape_vertex_offset(const ufbx_blend_shape *shape, size_t vertex)
Definition ufbx.cpp:32035
UFBX_SUBDIVISION_BOUNDARY_SHARP_INTERIOR
Definition ufbx.h:1202
UFBX_BLEND_OVER
Definition ufbx.h:2705
UFBX_PROP_FLAG_VALUE_STR
Definition ufbx.h:535
UFBX_DOM_VALUE_STRING
Definition ufbx.h:402
enum ufbx_inherit_mode_handling UFBX_ENUM_REPR ufbx_inherit_mode_handling
UFBX_BLEND_MULTIPLY_2X
Definition ufbx.h:2704
ufbx_abi ufbx_string ufbx_find_shader_prop_len(const ufbx_shader *shader, const char *name, size_t name_len)
Definition ufbx.cpp:31425
enum ufbx_coordinate_axis UFBX_ENUM_REPR ufbx_coordinate_axis
UFBX_THUMBNAIL_FORMAT_UNKNOWN
Definition ufbx.h:3611
ufbx_abi ufbx_anim_stack * ufbx_as_anim_stack(const ufbx_element *element)
Definition ufbx.cpp:33063
UFBX_SNAP_MODE_SNAP
Definition ufbx.h:3891
UFBX_UNICODE_ERROR_HANDLING_QUESTION_MARK
Definition ufbx.h:4478
UFBX_TIME_MODE_PAL
Definition ufbx.h:3865
ufbx_abi ufbx_line_curve * ufbx_tessellate_nurbs_curve(const ufbx_nurbs_curve *curve, const ufbx_tessellate_curve_opts *opts, ufbx_error *error)
Definition ufbx.cpp:32282
UFBX_MATERIAL_FBX_EMISSION_FACTOR
Definition ufbx.h:2401
UFBX_MATERIAL_PBR_SUBSURFACE_TYPE
Definition ufbx.h:2446
UFBX_ERROR_UNKNOWN
Definition ufbx.h:4264
ufbx_abi ufbx_scene * ufbx_load_stream(const ufbx_stream *stream, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30556
ufbx_abi ufbx_mesh * ufbx_tessellate_nurbs_surface(const ufbx_nurbs_surface *surface, const ufbx_tessellate_surface_opts *opts, ufbx_error *error)
Definition ufbx.cpp:32320
UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY_NO_FALLBACK
Definition ufbx.h:3672
UFBX_UNICODE_ERROR_HANDLING_REMOVE
Definition ufbx.h:4480
ufbx_abi ufbx_scene * ufbx_evaluate_scene(const ufbx_scene *scene, const ufbx_anim *anim, double time, const ufbx_evaluate_opts *opts, ufbx_error *error)
Definition ufbx.cpp:31178
UFBX_BLEND_REPLACE
Definition ufbx.h:2706
UFBX_TIME_PROTOCOL_DEFAULT
Definition ufbx.h:3882
enum ufbx_cache_file_format UFBX_ENUM_REPR ufbx_cache_file_format
struct ufbx_geometry_cache ufbx_geometry_cache
UFBX_ELEMENT_DISPLAY_LAYER
Definition ufbx.h:728
ufbx_abi ufbx_transform ufbx_evaluate_transform_flags(const ufbx_anim *anim, const ufbx_node *node, double time, uint32_t flags)
Definition ufbx.cpp:31062
UFBX_EXPORTER_FBX_SDK
Definition ufbx.h:3505
ufbx_abi uint32_t ufbx_catch_topo_prev_vertex_edge(ufbx_panic *panic, const ufbx_topo_edge *topo, size_t num_topo, uint32_t index)
Definition ufbx.cpp:32494
UFBX_MATERIAL_FBX_VECTOR_DISPLACEMENT_FACTOR
Definition ufbx.h:2410
UFBX_ELEMENT_AUDIO_LAYER
Definition ufbx.h:733
#define ufbx_unsafe
Definition ufbx.h:116
UFBX_APERTURE_FORMAT_35MM_TV_PROJECTION
Definition ufbx.h:1530
#define UFBX_ENUM_REPR
Definition ufbx.h:228
enum ufbx_light_decay UFBX_ENUM_REPR ufbx_light_decay
UFBX_ERROR_FEATURE_DISABLED
Definition ufbx.h:4316
UFBX_SHADER_FBX_LAMBERT
Definition ufbx.h:2351
#define ufbx_abi_data
Definition ufbx.h:138
UFBX_SHADER_FBX_PHONG
Definition ufbx.h:2353
void ufbx_free_fn(void *user, void *ptr, size_t size)
Definition ufbx.h:4091
ufbx_abi uint32_t ufbx_catch_triangulate_face(ufbx_panic *panic, uint32_t *indices, size_t num_indices, const ufbx_mesh *mesh, ufbx_face face)
Definition ufbx.cpp:32392
#define ufbx_abi
Definition ufbx.h:128
UFBX_ELEMENT_NURBS_SURFACE
Definition ufbx.h:704
UFBX_ELEMENT_CACHE_DEFORMER
Definition ufbx.h:717
uint64_t ufbx_size_fn(void *user)
Definition ufbx.h:4150
ufbx_abi ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings_len(const ufbx_shader *shader, const char *name, size_t name_len)
Definition ufbx.cpp:31434
enum ufbx_file_format UFBX_ENUM_REPR ufbx_file_format
UFBX_ROTATION_ORDER_XZY
Definition ufbx.h:343
UFBX_PROP_BOOLEAN
Definition ufbx.h:458
UFBX_CONSTRAINT_ROTATION
Definition ufbx.h:3311
ufbx_abi size_t ufbx_read_geometry_cache_real(const ufbx_cache_frame *frame, ufbx_real *data, size_t num_data, const ufbx_geometry_cache_data_opts *opts)
Definition ufbx.cpp:32696
ufbx_abi_data const ufbx_transform ufbx_identity_transform
Definition ufbx.h:5256
UFBX_CACHE_DATA_FORMAT_REAL_FLOAT
Definition ufbx.h:2130
enum ufbx_marker_type UFBX_ENUM_REPR ufbx_marker_type
UFBX_PROP_COMPOUND
Definition ufbx.h:470
ufbx_abi ufbx_audio_clip * ufbx_as_audio_clip(const ufbx_element *element)
Definition ufbx.cpp:33073
ufbx_inline ufbx_vec3 ufbx_get_vertex_vec3(const ufbx_vertex_vec3 *v, size_t index)
Definition ufbx.h:5765
UFBX_PROP_FLAG_VALUE_BLOB
Definition ufbx.h:536
UFBX_MARKER_UNKNOWN
Definition ufbx.h:1854
UFBX_MATERIAL_PBR_SUBSURFACE_FACTOR
Definition ufbx.h:2440
UFBX_ERROR_IO
Definition ufbx.h:4290
enum ufbx_constraint_type UFBX_ENUM_REPR ufbx_constraint_type
UFBX_PROP_FLAG_VALUE_VEC3
Definition ufbx.h:532
UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY
Definition ufbx.h:3668
UFBX_MATERIAL_PBR_TRANSMISSION_ENABLE_IN_AOV
Definition ufbx.h:2439
UFBX_BLEND_MULTIPLY
Definition ufbx.h:2703
UFBX_PROP_REFERENCE
Definition ufbx.h:472
UFBX_CACHE_DATA_ENCODING_BIG_ENDIAN
Definition ufbx.h:2143
UFBX_MATERIAL_FBX_DIFFUSE_COLOR
Definition ufbx.h:2393
ufbx_abi size_t ufbx_evaluate_nurbs_basis(const ufbx_nurbs_basis *basis, ufbx_real u, ufbx_real *weights, size_t num_weights, ufbx_real *derivatives, size_t num_derivatives)
Definition ufbx.cpp:32097
UFBX_SUBDIVISION_BOUNDARY_DEFAULT
Definition ufbx.h:1193
ufbx_abi bool ufbx_open_memory(ufbx_stream *stream, const void *data, size_t data_size, const ufbx_open_memory_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30437
ufbx_abi ufbx_scene * ufbx_load_stream_prefix(const ufbx_stream *stream, const void *prefix, size_t prefix_size, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30561
enum ufbx_aperture_mode UFBX_ENUM_REPR ufbx_aperture_mode
UFBX_MATERIAL_PBR_TANGENT_MAP
Definition ufbx.h:2468
ufbx_abi uint32_t ufbx_get_blend_shape_offset_index(const ufbx_blend_shape *shape, size_t vertex)
Definition ufbx.cpp:32020
UFBX_MATERIAL_PBR_TRANSMISSION_COLOR
Definition ufbx.h:2431
UFBX_ELEMENT_NURBS_CURVE
Definition ufbx.h:703
UFBX_ELEMENT_LOD_GROUP
Definition ufbx.h:711
UFBX_EXPORTER_BLENDER_ASCII
Definition ufbx.h:3507
UFBX_MARKER_IK_EFFECTOR
Definition ufbx.h:1856
UFBX_DOM_VALUE_ARRAY_I32
Definition ufbx.h:404
UFBX_ELEMENT_BLEND_CHANNEL
Definition ufbx.h:715
UFBX_LIGHT_AREA_SHAPE_SPHERE
Definition ufbx.h:1416
enum ufbx_inherit_mode UFBX_ENUM_REPR ufbx_inherit_mode
UFBX_ERROR_EXTERNAL_FILE_NOT_FOUND
Definition ufbx.h:4274
UFBX_FILE_FORMAT_MTL
Definition ufbx.h:3526
UFBX_MATERIAL_PBR_BASE_FACTOR
Definition ufbx.h:2420
ufbx_abi ufbx_real ufbx_quat_dot(ufbx_quat a, ufbx_quat b)
Definition ufbx.cpp:31502
UFBX_TIME_MODE_30_FPS
Definition ufbx.h:3861
UFBX_APERTURE_MODE_FOCAL_LENGTH
Definition ufbx.h:1494
UFBX_APERTURE_FORMAT_16MM_THEATRICAL
Definition ufbx.h:1527
UFBX_APERTURE_FORMAT_DYNAVISION
Definition ufbx.h:1536
UFBX_ELEMENT_CAMERA_SWITCHER
Definition ufbx.h:709
enum ufbx_mirror_axis UFBX_ENUM_REPR ufbx_mirror_axis
UFBX_MATERIAL_FEATURE_AMBIENT_OCCLUSION
Definition ufbx.h:2493
UFBX_EXPORTER_MOTION_BUILDER
Definition ufbx.h:3508
ufbx_abi ufbx_matrix ufbx_matrix_mul(const ufbx_matrix *a, const ufbx_matrix *b)
Definition ufbx.cpp:31723
UFBX_CACHE_DATA_FORMAT_REAL_DOUBLE
Definition ufbx.h:2132
ufbx_abi ufbx_real ufbx_evaluate_blend_weight_flags(const ufbx_anim *anim, const ufbx_blend_channel *channel, double time, uint32_t flags)
Definition ufbx.cpp:31167
ufbx_abi ufbx_lod_group * ufbx_as_lod_group(const ufbx_element *element)
Definition ufbx.cpp:33050
ufbx_abi ufbx_blob ufbx_find_blob(const ufbx_props *props, const char *name, ufbx_blob def)
Definition ufbx.cpp:33148
UFBX_BLEND_DISSOLVE
Definition ufbx.h:2707
ufbx_abi ufbx_mesh * ufbx_subdivide_mesh(const ufbx_mesh *mesh, size_t level, const ufbx_subdivide_opts *opts, ufbx_error *error)
Definition ufbx.cpp:32619
ufbx_progress_result ufbx_progress_fn(void *user, const ufbx_progress *progress)
Definition ufbx.h:4393
UFBX_INHERIT_MODE_HANDLING_HELPER_NODES
Definition ufbx.h:3690
UFBX_CACHE_FILE_FORMAT_UNKNOWN
Definition ufbx.h:2119
ufbx_abi void ufbx_retain_scene(ufbx_scene *scene)
Definition ufbx.cpp:30588
UFBX_DOM_VALUE_NUMBER
Definition ufbx.h:401
UFBX_EXTRAPOLATION_MIRROR
Definition ufbx.h:3168
ufbx_abi uint32_t ufbx_triangulate_face(uint32_t *indices, size_t num_indices, const ufbx_mesh *mesh, ufbx_face face)
Definition ufbx.cpp:33165
UFBX_BLEND_LINEAR_LIGHT
Definition ufbx.h:2720
UFBX_COORDINATE_AXIS_NEGATIVE_Y
Definition ufbx.h:1548
UFBX_ELEMENT_ANIM_VALUE
Definition ufbx.h:726
enum ufbx_time_protocol UFBX_ENUM_REPR ufbx_time_protocol
UFBX_PROP_ROTATION
Definition ufbx.h:467
#define UFBX_CONVERSION_IMPL(p_name)
Definition ufbx.h:201
UFBX_MATERIAL_FBX_DISPLACEMENT
Definition ufbx.h:2409
ufbx_abi_data const size_t ufbx_element_type_size[UFBX_ELEMENT_TYPE_COUNT]
Definition ufbx.h:5269
ufbx_abi ufbx_surface_point ufbx_evaluate_nurbs_surface(const ufbx_nurbs_surface *surface, ufbx_real u, ufbx_real v)
Definition ufbx.cpp:32214
UFBX_ROTATION_ORDER_ZXY
Definition ufbx.h:346
ufbx_abi ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings(const ufbx_shader *shader, const char *name)
Definition ufbx.cpp:33159
UFBX_WARNING_UNKNOWN_OBJ_DIRECTIVE
Definition ufbx.h:3583
ufbx_abi ufbx_cache_file * ufbx_as_cache_file(const ufbx_element *element)
Definition ufbx.cpp:33057
ufbx_unsafe ufbx_abi bool ufbx_open_file_ctx(ufbx_stream *stream, ufbx_open_file_context ctx, const char *path, size_t path_len, const ufbx_open_file_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30417
UFBX_PROP_FLAG_NOT_FOUND
Definition ufbx.h:512
UFBX_BLEND_SCREEN
Definition ufbx.h:2713
UFBX_PIVOT_HANDLING_ADJUST_TO_ROTATION_PIVOT
Definition ufbx.h:3730
ufbx_abi ufbx_scene * ufbx_load_file(const char *filename, const ufbx_load_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30513
UFBX_ASPECT_MODE_FIXED_HEIGHT
Definition ufbx.h:1477
UFBX_WARNING_UNSUPPORTED_VERSION
Definition ufbx.h:3559
UFBX_SKINNING_METHOD_BLENDED_DQ_LINEAR
Definition ufbx.h:1946
UFBX_EXTRAPOLATION_REPEAT
Definition ufbx.h:3167
ufbx_abi ufbx_vec3 ufbx_evaluate_anim_value_vec3_flags(const ufbx_anim_value *anim_value, double time, uint32_t flags)
Definition ufbx.cpp:30937
enum ufbx_lod_display UFBX_ENUM_REPR ufbx_lod_display
#define ufbx_assert(cond)
Definition ufbx.h:107
UFBX_TIME_MODE_NTSC_DROP_FRAME
Definition ufbx.h:3863
ufbx_abi ufbx_quat ufbx_quat_mul(ufbx_quat a, ufbx_quat b)
Definition ufbx.cpp:31492
ufbx_abi ufbx_vec2 ufbx_catch_get_vertex_vec2(ufbx_panic *panic, const ufbx_vertex_vec2 *v, size_t index)
Definition ufbx.cpp:33001
UFBX_MATERIAL_FBX_SPECULAR_EXPONENT
Definition ufbx.h:2396
UFBX_MATERIAL_PBR_DISPLACEMENT_MAP
Definition ufbx.h:2469
UFBX_ELEMENT_SKIN_DEFORMER
Definition ufbx.h:712
UFBX_ERROR_FILE_NOT_FOUND
Definition ufbx.h:4267
UFBX_PROP_NUMBER
Definition ufbx.h:460
ufbx_abi ufbx_real ufbx_evaluate_curve_flags(const ufbx_anim_curve *curve, double time, ufbx_real default_value, uint32_t flags)
Definition ufbx.cpp:30832
UFBX_MATERIAL_PBR_TRANSMISSION_SCATTER_ANISOTROPY
Definition ufbx.h:2434
UFBX_INHERIT_MODE_NORMAL
Definition ufbx.h:806
UFBX_APERTURE_MODE_VERTICAL
Definition ufbx.h:1492
UFBX_OPEN_FILE_MAIN_MODEL
Definition ufbx.h:4166
UFBX_MATERIAL_PBR_COAT_FACTOR
Definition ufbx.h:2450
UFBX_BLEND_SUBTRACT
Definition ufbx.h:2725
UFBX_PROP_FLAG_LOCK_W
Definition ufbx.h:495
ufbx_abi bool ufbx_open_file(ufbx_stream *stream, const char *path, size_t path_len, const ufbx_open_file_opts *opts, ufbx_error *error)
Definition ufbx.cpp:30412
ufbx_abi ufbx_procedural_geometry * ufbx_as_procedural_geometry(const ufbx_element *element)
Definition ufbx.cpp:33046
UFBX_MATERIAL_PBR_TRANSMISSION_EXTRA_ROUGHNESS
Definition ufbx.h:2437
UFBX_MATERIAL_PBR_COAT_ROTATION
Definition ufbx.h:2455
UFBX_ERROR_NONE
Definition ufbx.h:4260
UFBX_MIRROR_AXIS_NONE
Definition ufbx.h:831
UFBX_TRANSFORM_FLAG_EXPLICIT_INCLUDES
Definition ufbx.h:5462
UFBX_SKINNING_METHOD_DUAL_QUATERNION
Definition ufbx.h:1942
UFBX_PROP_COLOR_WITH_ALPHA
Definition ufbx.h:463
enum ufbx_time_mode UFBX_ENUM_REPR ufbx_time_mode
UFBX_GATE_FIT_FILL
Definition ufbx.h:1511
UFBX_BLEND_SOFT_LIGHT
Definition ufbx.h:2717
UFBX_THUMBNAIL_FORMAT_RGBA_32
Definition ufbx.h:3613
enum ufbx_shader_type UFBX_ENUM_REPR ufbx_shader_type
ufbx_abi ufbx_audio_layer * ufbx_as_audio_layer(const ufbx_element *element)
Definition ufbx.cpp:33072
UFBX_COORDINATE_AXIS_NEGATIVE_X
Definition ufbx.h:1546
UFBX_SUBDIVISION_BOUNDARY_LEGACY
Definition ufbx.h:1194
ufbx_abi ufbx_vec3 ufbx_quat_rotate_vec3(ufbx_quat q, ufbx_vec3 v)
Definition ufbx.cpp:31554
ufbx_abi ufbx_quat ufbx_evaluate_baked_quat(ufbx_baked_quat_list keyframes, double time)
Definition ufbx.cpp:31372
UFBX_SHADER_TEXTURE_SELECT_OUTPUT
Definition ufbx.h:2763
UFBX_ELEMENT_POSE
Definition ufbx.h:735
#define UFBX_ENUM_FORCE_WIDTH(p_prefix)
Definition ufbx.h:229
enum ufbx_skinning_method UFBX_ENUM_REPR ufbx_skinning_method
ufbx_abi void ufbx_free_scene(ufbx_scene *scene)
Definition ufbx.cpp:30578
UFBX_CACHE_DATA_FORMAT_VEC3_DOUBLE
Definition ufbx.h:2133
UFBX_INDEX_ERROR_HANDLING_ABORT_LOADING
Definition ufbx.h:4460
UFBX_MATERIAL_PBR_SUBSURFACE_ANISOTROPY
Definition ufbx.h:2444
UFBX_LIGHT_AREA_SHAPE_RECTANGLE
Definition ufbx.h:1415
#define UFBX_VERTEX_ATTRIB_IMPL(p_type)
Definition ufbx.h:242
enum ufbx_index_error_handling UFBX_ENUM_REPR ufbx_index_error_handling
ufbx_abi ufbx_real ufbx_evaluate_anim_value_real(const ufbx_anim_value *anim_value, double time)
Definition ufbx.cpp:30916
UFBX_ERROR_BAD_INDEX
Definition ufbx.h:4323
UFBX_ELEMENT_MATERIAL
Definition ufbx.h:719
UFBX_REAL_TYPE ufbx_real
Definition ufbx.h:279
UFBX_SUBDIVISION_BOUNDARY_SHARP_NONE
Definition ufbx.h:1198
ufbx_abi_data const ufbx_vec3 ufbx_zero_vec3
Definition ufbx.h:5258
UFBX_TEXTURE_PROCEDURAL
Definition ufbx.h:2685
ufbx_abi ufbx_props ufbx_evaluate_props(const ufbx_anim *anim, const ufbx_element *element, double time, ufbx_prop *buffer, size_t buffer_size)
Definition ufbx.cpp:30991
UFBX_INHERIT_MODE_COMPONENTWISE_SCALE
Definition ufbx.h:821
UFBX_ASPECT_MODE_FIXED_WIDTH
Definition ufbx.h:1475
UFBX_LIGHT_POINT
Definition ufbx.h:1383
UFBX_GATE_FIT_STRETCH
Definition ufbx.h:1516
ufbx_abi ufbx_transform ufbx_matrix_to_transform(const ufbx_matrix *m)
Definition ufbx.cpp:31854
enum ufbx_gate_fit UFBX_ENUM_REPR ufbx_gate_fit
ufbx_abi ufbx_vec3 ufbx_get_blend_vertex_offset(const ufbx_blend_deformer *blend, size_t vertex)
Definition ufbx.cpp:32042
UFBX_PROP_DISTANCE
Definition ufbx.h:469
UFBX_WARNING_EMPTY_FACE_REMOVED
Definition ufbx.h:3580