50 lines
1.3 KiB
Batchfile
50 lines
1.3 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions EnableDelayedExpansion
|
|
|
|
rem Convenience launcher: find Blender on this machine and run compute export.
|
|
rem Session-local only — does not write machine paths into the repo.
|
|
|
|
cd /d "%~dp0\.."
|
|
if errorlevel 1 (
|
|
echo ERROR: could not cd to repo root from %~dp0
|
|
exit /b 1
|
|
)
|
|
|
|
if defined ORISYS_BLENDER (
|
|
if exist "%ORISYS_BLENDER%" goto :run
|
|
)
|
|
|
|
set "ORISYS_BLENDER="
|
|
set "PF=%ProgramFiles%"
|
|
if not defined PF set "PF=C:\Program Files"
|
|
|
|
rem Prefer Blender 5.0 when present, then newest Blender * folder.
|
|
if exist "%PF%\Blender Foundation\Blender 5.0\blender.exe" (
|
|
set "ORISYS_BLENDER=%PF%\Blender Foundation\Blender 5.0\blender.exe"
|
|
goto :found
|
|
)
|
|
|
|
for /f "delims=" %%D in ('dir /b /ad /o-n "%PF%\Blender Foundation\Blender *" 2^>nul') do (
|
|
if exist "%PF%\Blender Foundation\%%D\blender.exe" (
|
|
set "ORISYS_BLENDER=%PF%\Blender Foundation\%%D\blender.exe"
|
|
goto :found
|
|
)
|
|
)
|
|
|
|
echo ERROR: blender.exe not found under "%PF%\Blender Foundation"
|
|
echo Set ORISYS_BLENDER to your blender.exe path, then re-run.
|
|
exit /b 2
|
|
|
|
:found
|
|
echo Using Blender: %ORISYS_BLENDER%
|
|
|
|
:run
|
|
where orisys-design >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo ERROR: orisys-design not on PATH. From repo root run: python -m pip install -e .
|
|
exit /b 1
|
|
)
|
|
|
|
orisys-design export sensors/finger/r01 --profile compute
|
|
exit /b %ERRORLEVEL%
|