diff --git a/apps/cli/mesh_tool/src/apps/anim.rs b/apps/cli/mesh_tool/src/apps/anim.rs index 3310f58..b586b26 100644 --- a/apps/cli/mesh_tool/src/apps/anim.rs +++ b/apps/cli/mesh_tool/src/apps/anim.rs @@ -13,21 +13,27 @@ pub struct AnimApp { pub anim_path: String, #[arg(help = "Path to output directory", required = true)] pub output_path: String, + #[arg(short, long, help = "Use big endian serialization")] + pub big_endian: bool, } -// TODO: Get from args -const SYSTEM_INFO: SystemInfo = SystemInfo { - version: 25, - platform: Platform::X360, - endian: IOEndian::Little, -}; - impl SubApp for AnimApp { fn process(&mut self) -> Result<(), Box> { + // TODO: Get from args + let system_info: SystemInfo = SystemInfo { + version: 25, + platform: Platform::X360, + endian: if self.big_endian { + IOEndian::Big + } else { + IOEndian::Little + }, + }; + let importer = GltfImporter2::new(&self.anim_path)?; let assets = importer.process(); - assets.dump_to_directory(&self.output_path, &SYSTEM_INFO)?; + assets.dump_to_directory(&self.output_path, &system_info)?; Ok(()) }