mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-01-19 12:14:47 +00:00
18 lines
441 B
TypeScript
18 lines
441 B
TypeScript
import fs from "node:fs/promises";
|
|
import { execFileSync } from "node:child_process";
|
|
|
|
const blender = `/Applications/Blender.app/Contents/MacOS/Blender`;
|
|
|
|
async function run() {
|
|
for await (const inFile of fs.glob("public/**/*.dif")) {
|
|
const outFile = inFile.replace(/\.dif$/i, ".gltf");
|
|
execFileSync(
|
|
blender,
|
|
["-b", "-P", "scripts/dif2gltf.py", "--", inFile, outFile],
|
|
{ stdio: "inherit" }
|
|
);
|
|
}
|
|
}
|
|
|
|
run();
|