Skip to content

Commit

Permalink
create gltf output folder, fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
ScanMountGoat committed Dec 23, 2023
1 parent 2517d71 commit 31a55fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fixed an issue where some Xenoblade 3 models used incorrect vertex skinning weights.
* Fixed an issue where Xenoblade 1 DE and Xenoblade 2 models did not load the high resolution base mip level.
* Fixed an issue where some Xenoblade 3 DLC maps failed to load due to prop instance indexing issues.
* Fixed an issue where gltf export would fail if the destination folder did not exist.

## 0.2.0 - 2023-11-22
### Added
Expand Down
6 changes: 6 additions & 0 deletions xc3_gltf/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::path::Path;

use clap::Parser;
use xc3_model::{gltf::GltfFile, load_model, shader_database::ShaderDatabase};

Expand Down Expand Up @@ -37,6 +39,10 @@ fn main() {
.to_string_lossy()
.to_string();

if let Some(parent) = Path::new(&cli.output).parent() {
std::fs::create_dir_all(parent).unwrap();
}

let file = GltfFile::new(&name, &roots);
file.save(&cli.output);

Expand Down

0 comments on commit 31a55fd

Please sign in to comment.