Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
file_save_options.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
10#include <cstdint>
11#include <string_view>
12
13namespace momentum {
14
15// ============================================================================
16// Permissive Mode
17// ============================================================================
18
19// Permissive specifies whether we want to be able to load mesh-only characters (without skin
20// weights), and whether we want to bake the unhandled pose information into base skeleton.
21enum class Permissive { No, Yes };
22
23// ============================================================================
24// GLTF File Format
25// ============================================================================
26
28enum class GltfFileFormat {
29 Auto = 0, // The file extension is used for deduction (e.g. ".gltf" --> ASCII)
30 Binary = 1, // Binary format (generally .glb)
31 Ascii = 2, // ASCII format (generally .gltf)
32};
33
34// ============================================================================
35// GLTF Animation Interpolation
36// ============================================================================
37
44enum class GltfAnimationInterpolation : uint8_t {
45 Step = 0,
46 Linear = 1,
47};
48
49// ============================================================================
50// FBX Coordinate System Options
51// ============================================================================
52
55enum class FbxUpVector { XAxis = 1, YAxis = 2, ZAxis = 3 };
56
62enum class FbxFrontVector { ParityEven = 1, ParityOdd = 2 };
63
67
75
76// ============================================================================
77// Unified File Save Options
78// ============================================================================
79
86 // ---- Common Options (used by both FBX and GLTF) ----
87
89 bool mesh = true;
90
92 bool locators = true;
93
95 bool collisions = true;
96
98 bool blendShapes = true;
99
102
103 // ---- FBX-Specific Options ----
104
107
110 std::string_view fbxNamespace = "";
111
112 // ---- GLTF-Specific Options ----
113
116 bool extensions = true;
117
121
125};
126
127} // namespace momentum
FbxFrontVector
Vector with origin at the screen pointing toward the camera.
FbxCoordSystem
Specifies the third vector of the system.
FbxUpVector
Specifies which canonical axis represents up in the system (typically Y or Z).
GltfAnimationInterpolation
How animation samplers written to a GLTF file interpolate between their keys.
@ Step
Hold each key until the next one (GLTF "STEP").
GltfFileFormat
File format in which the character is saved.
A struct containing the up, front vectors and coordinate system for FBX export.
FbxUpVector upVector
Default to the same orientations as FbxAxisSystem::eMayaYUp.
Unified options for saving files in both FBX and GLTF formats.
bool extensions
Enable GLTF extensions (default: true) Only used for GLTF output.
bool mesh
Include mesh geometry in the output (default: true).
bool collisions
Include collision geometry in the output (default: true).
bool locators
Include locators in the output (default: true).
FbxCoordSystemInfo coordSystemInfo
FBX coordinate system configuration (default: Maya Y-up).
Permissive permissive
Permissive mode: allow saving mesh-only characters without skin weights (default: false).
GltfAnimationInterpolation gltfAnimationInterpolation
Interpolation of the joint and blend shape animation samplers (default: Step) Marker animation always...
std::string_view fbxNamespace
Optional namespace prefix for FBX node names (e.g., "ns" becomes "ns:") Only used for FBX output (def...
bool blendShapes
Include blend shapes in the output (default: true).
GltfFileFormat gltfFileFormat
GLTF file format selection (default: Auto) Only used for GLTF output.