$ show majimboo/mviewer
The mviewer repository is a Rust-based application for viewing and exporting Marmoset .mview scene files. It features a dual-mode interface: launching a GUI (using tao/wry embedded webview) for interactive preview when no arguments are provided, or running in CLI mode for batch conversion when arguments are given. The GUI loads a local HTTP server to serve an embedded, forked Marmoset JavaScript viewer that renders scenes with visual parity to Marmoset Toolbag. The core Rust logic handles loading the proprietary .mview archive format, extracting scene data (meshes, materials, animations, cameras, lights, textures), and exporting to glTF/GLB/OBJ formats. The application demonstrates strong modularity with clear separation between archive parsing, data processing, export pipelines, and GUI integration. While the embedded JavaScript viewer introduces some maintenance considerations due to its forked nature, the Rust components exhibit high reusability and craftsmanship, particularly in handling complex binary formats and data transformations.
The LLM identified 3 files worth highlighting for reuse:
Implements reading and decompression of the custom Marmoset .mview archive format. This self-contained module handles the proprietary archive structure, enabling extraction of scene data, meshes, textures, and animations. It demonstrates skill in reverse-engineering and parsing non-standard binary formats with minimal dependencies.
Defines the data structures serialized to JSON for communication between Rust and the embedded Marmoset JavaScript viewer. This module provides a clean, stable interface that isolates the core logic from the GUI, making it reusable for alternative viewers or testing scenarios without modifying Rust logic.
Parses Marmoset-specific animation data including matrix tables, skinning rigs, and keyframe tracks (Packed0/Packed1/Packed2). This module handles the complex decompression and transformation of animation data, enabling accurate export of skeletal animations to glTF format while being decoupled from GUI-specific code.