Files
benilla-octo/crates/benilla-formats/examples/gseqdump.rs
T
SamandClaude Fable 5 6b980b9efb the player build: one binary that carries its content
- a player build ships beside the dev one — dev chords and probe surfaces go dark, and a gate enforces what a player can still reach, by medium not by module
- the binary carries its own shaders and its shipped UI, finds the WoW folder by itself, and keeps its local state in one benilla-config folder
- the glue screens get a capture shutter, and the engine stops depending on the protocol crate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 18:18:02 +07:00

29 lines
1.3 KiB
Rust

//! `gseqdump <internal\path.m2>` — every global-sequence bone channel with its RAW KEYS.
//!
//! `benilla-extract m2anim` names which bones carry global-sequence channels and their periods,
//! but never the key VALUES — and for a twinkle (a scale loop on a star card) the values ARE the
//! effect: a 0→1 flicker and a 0→20 flare are the same one-line summary. Output is Blizzard
//! data — pipe it to the scratchpad, never into the repo.
fn main() -> anyhow::Result<()> {
let virt = std::env::args()
.nth(1)
.ok_or_else(|| anyhow::anyhow!("usage: gseqdump <m2 path>"))?;
let data = benilla_formats::wow_data().expect("no WoW install found (set $WOW_DATA)");
let mut chain = benilla_formats::open_chain(&data)?;
let bytes = chain.read_file(&virt)?;
for g in benilla_formats::parse_m2_global_sequence_bones(&bytes) {
println!("bone {}", g.bone);
if let Some(t) = &g.translation {
println!(" T period {}ms keys {:?}", t.period_ms, t.keys);
}
if let Some(r) = &g.rotation {
println!(" R period {}ms keys {:?}", r.period_ms, r.keys);
}
if let Some(s) = &g.scale {
println!(" S period {}ms keys {:?}", s.period_ms, s.keys);
}
}
Ok(())
}