@echo off
if "%1"==""  goto usage
if not exist utils\3dto3d.exe goto noexe
if not exist %1.raw goto noraw
utils\3dto3d.exe %2 %3 %4 /t3 /o2 %1.raw
copy %1.udo UDO
del %1.udo
copy %1.inc POVSCN
del %1.inc
utils\3dto3d.exe %2 %3 %4 /t3 /o3 %1.raw
del %1.udo
copy %1.inc POLYSCN
del %1.inc
goto end
:usage
echo.
echo MAKEUDO   (C) Copyright SoftTronics, Lutz + Kretzschmar
echo Usage: makeudo file
echo                where file may not have an extension.
echo                This batch will then create a UDO and INC file for
echo                POV-Ray and Polyray in their respective directories. 
echo                This only works with the standard distribution setup.
echo.
goto end
:noraw
echo.
echo MAKEUDO   (C) Copyright SoftTronics, Lutz + Kretzschmar
echo Usage: makeudo file
echo                where file may not have an extension.
echo                This batch will then create a UDO and INC file for
echo                POV-Ray and Polyray in their respective directories. 
echo                This only works with the standard distribution setup.
echo.
echo Error : file %1.raw not found.
echo.
goto end
:noexe
echo MAKEUDO   (C) Copyright SoftTronics, Lutz + Kretzschmar
echo The 3DTO3D.EXE file was not found in UTILS.
echo.
echo 
:end
pause

