Portability: Blender/ODA discovery via env > PATH > macOS default

The two hardcoded macOS paths in code become last-resort defaults:
- build_showcase_variants: env BLENDER > shutil.which("blender") > app bundle
- cad_dxf_report: env ODA_CONVERTER > shutil.which("ODAFileConverter") > app
  bundle (env override existed already; PATH lookup is new)
Docs annotate the macOS example paths with the discovery order.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 15:05:32 +08:00
parent 23cf3af678
commit b871a2f8bd
4 changed files with 20 additions and 4 deletions

View File

@@ -236,12 +236,16 @@ Expected outputs:
- `<project>.png`
- `model_metadata.json`
If Blender CLI fails, verify the path. On this machine, the app path has been:
If Blender CLI fails, verify the path. The macOS app-bundle path is:
```text
/Applications/Blender.app/Contents/MacOS/Blender
```
On Linux/other platforms use `blender` from PATH; scripts discover the
executable via env `BLENDER` > PATH > the macOS default, and ODA File
Converter via env `ODA_CONVERTER` > PATH > its macOS default.
## 8. Web Showcase
For a quick single-model preview, run: