You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
762 B
Batchfile

@echo off
pushd %~dp0%\art
if not exist "art.blend" (
powershell Expand-Archive -Path art.zip -DestinationPath . || goto :error
)
set "blender="
if exist "%ProgramFiles%\Blender Foundation\Blender 3.5\blender.exe" (
echo Using Blender 3.5 detected
set "blender=%ProgramFiles%\Blender Foundation\Blender 3.5\blender.exe"
)
if exist "%ProgramFiles%\Blender Foundation\Blender 3.6\blender.exe" (
echo Using Blender 3.6 detected
set "blender=%ProgramFiles%\Blender Foundation\Blender 3.6\blender.exe"
)
if "%blender%" neq "" (
call "%blender%" --background art.blend --python Exporter.py || goto :error
) else (
goto :error
)
goto :success
:error
echo Blender export failed
:success
set "returncode=%ERRORLEVEL%"
popd
exit /B %returncode%