Skip to content

Commit

Permalink
Release 1.0.0-alpha.17; Fix animation bake rate (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrinktofit authored Apr 22, 2021
1 parent ce61a5a commit 5cb5773
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
11 changes: 4 additions & 7 deletions Cli/ReadCliArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,10 @@ std::optional<CliArgs> readCliArgs(int argc_, char *argv_[]) {
"path or relative path from input file's directory.") &
clipp::values("texture-search-locations", textureSearchLocations),

clipp::option("--animation-bake-rate")
.set(cliArgs.convertOptions.animationBakeRate)
.doc("Animation bake rate(in FPS)."),

clipp::option("--suspected-animation-duration-limit")
.set(cliArgs.convertOptions.suspectedAnimationDurationLimit)
.doc("The suspected animation duration limit."),
clipp::option("--animation-bake-rate") &
clipp::value("animation-bake-rate",
cliArgs.convertOptions.animationBakeRate)
.doc("Animation bake rate(in FPS)."),

clipp::option("--log-file")
.doc("Specify the log file(logs are outputed as JSON). If not "
Expand Down
1 change: 1 addition & 0 deletions Core/Source/bee/Convert/SceneConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ SceneConverter::SceneConverter(fbxsdk::FbxManager &fbx_manager_,
: _glTFBuilder(glTF_builder_), _fbxManager(fbx_manager_),
_fbxScene(fbx_scene_), _options(options_), _fbxFileName(fbx_file_name_),
_fbxGeometryConverter(&fbx_manager_) {
_animationTimeMode = fbxsdk::FbxTime::ConvertFrameRateToTimeMode(static_cast<double>(options_.animationBakeRate));
}

void SceneConverter::convert() {
Expand Down
3 changes: 0 additions & 3 deletions Core/Source/bee/Converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ struct ConvertOptions {

std::uint32_t animationBakeRate = 30;

std::uint32_t suspectedAnimationDurationLimit =
60 * 10; // I think 10 minutes is extraordinary enough...

struct TextureResolution {
bool disabled = false;
std::vector<std::u8string> locations;
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ SYNOPSIS
FBX-glTF-conv.exe <input file> [--out
<out-file>] [--fbm-dir <fbm-dir>] [--no-flip-v] [--unit-conversion <unit-conversion>]
[--no-texture-resolution] [--texture-search-locations <texture-search-locations>...]
[--animation-bake-rate] [--suspected-animation-duration-limit] [--log-file <log-file>]
[--verbose]
[--animation-bake-rate <animation-bake-rate>] [--log-file <log-file>] [--verbose]
OPTIONS
--out The output path to the .gltf or .glb file. Defaults to
Expand All @@ -45,12 +44,9 @@ OPTIONS
Texture search locations. These path shall be absolute path or relative path
from input file's directory.
--animation-bake-rate
<animation-bake-rate>
Animation bake rate(in FPS).
--suspected-animation-duration-limit
The suspected animation duration limit.
--log-file Specify the log file(logs are outputed as JSON). If not specified, logs're
printed to console
Expand Down

0 comments on commit 5cb5773

Please sign in to comment.