From 0048e924175bdbc05394ba842b990b788501aeb4 Mon Sep 17 00:00:00 2001 From: Dante Barbieri Date: Wed, 22 Apr 2026 12:25:49 -0500 Subject: [PATCH] fix(assimp): pass -f so non-extension targets work The assimp converter invokes `assimp export ` and relies on assimp's extension-based format inference to pick the output format. That works for targets whose id happens to match a real file extension (glb, gltf, obj, stl, ply, etc.) but silently fails for every target whose assimp id is not a conventional filename extension: glb2, gltf2, objnomtl, stlb, plyb, fbxa, assbin, assxml, pbrt, assjson Picking any of those in the UI aborts the job with: assimp export: no output format specified and I failed to guess it assimp_cmd's `-f` flag overrides extension inference, and the values in `properties.to.object` already correspond 1:1 to assimp's format ids (verified against `assimp listexport`). Passing `-f${convertTo}` makes every advertised target work without changing anything else. Reproduction: upload any .stl, convert to glb2. Before: ENOENT on the nonexistent output file. After: valid binary glTF 2.0. --- src/converters/assimp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converters/assimp.ts b/src/converters/assimp.ts index 69f3258..eae91c2 100644 --- a/src/converters/assimp.ts +++ b/src/converters/assimp.ts @@ -121,7 +121,7 @@ export async function convert( execFile: ExecFileFn = execFileOriginal, // to make it mockable ): Promise { return new Promise((resolve, reject) => { - execFile("assimp", ["export", filePath, targetPath], (error, stdout, stderr) => { + execFile("assimp", ["export", filePath, targetPath, `-f${convertTo}`], (error, stdout, stderr) => { if (error) { reject(`error: ${error}`); }