mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract WOM <-> OBJ/GLB/STL into cli_wom_io.cpp
Moves the four WOM interchange-format handlers (--export-obj,
--export-glb, --export-stl, --import-stl) out of main.cpp into
a new cli_wom_io.{hpp,cpp} module. WOM is our open M2
replacement; these are the bridge that lets it round-trip
through every external 3D tool — Blender, Three.js, slicers,
CAD packages — so the open format is actually useful.
main.cpp shrinks by 467 lines (9,464 to 8,997). The five WOB
and WHM exporters (--export-wob-glb, --export-whm-glb, etc.)
remain inline for a follow-up extraction.
This commit is contained in:
parent
c1f3d5aba4
commit
b59c310742
4 changed files with 549 additions and 471 deletions
20
tools/editor/cli_wom_io.hpp
Normal file
20
tools/editor/cli_wom_io.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the WOM <-> interchange-format handlers. WOM is our
|
||||
// open M2 replacement; these export it to / import it from the
|
||||
// formats every other 3D tool understands:
|
||||
// --export-obj WOM -> Wavefront OBJ (universal text format)
|
||||
// --export-glb WOM -> glTF 2.0 binary (browsers, Three.js)
|
||||
// --export-stl WOM -> ASCII STL (slicers / 3D printers)
|
||||
// --import-stl ASCII STL -> WOM (round-trip from CAD tools)
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleWomIo(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue