• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
« Previous 1 2 3 4
Shared an small .bat file

 
  • 0 Vote(s) - 0 Average
Shared an small .bat file

povmaniac
Offline

Member

Posts: 178
Threads: 7
Joined: May 2013
#1
06-07-2013, 08:14 PM
I want shared an small .bat file for use with .xml YafaRay files.
Is useful for 'drap and drop' files or command line mode.
I also used http://www.xnview.com for view images.

Code:
rem [][][] YAFARAY XML RENDERER BAT FILE [][][]
echo off
rem Example .bat for 'drap and drop' YafaRay .XML files and
rem command line mode. Change params for you own YafaRay configuration
rem
set HOME=C:\YafarayMaster
rem
@if not exist %HOME%\yafaray-xml.exe goto ERROR

rem Set binary file
set BIN=yafaray-xml.exe

rem Set path to plugins
set PLUGINS=%HOME%\plugins

rem Set image format in command line.
rem This option override 'out file' parameter inside .XML scene
rem Types allowed; tga, png, jpg, tif, hdr or exr
rem For use the commandline parameter.. Example: 'this_file.bat' file.xml 'image extension'
rem
set IMAGE=%2

rem If use 'drap and drop' option.. default file format is 'tga'
@if "%IMAGE%"=="" set IMAGE=tga

rem Set verbosity level for YafaRay console messages
set VL= 1
rem set custom message
set CS= "Rendered with YafaRay bat file"

rem  GO!! to render...
%HOME%\%BIN% -vl %VL% -pp "%PLUGINS%" -f %IMAGE% -dp -cs %CS% -op "%HOME%" %1

rem I use a free XnView (http://www.xnview.com/) for view render image
rem This soft no support 'exr' files.. atm.
if "%IMAGE%"=="exr" goto EXR

set VIEWER=h:\XnView\XnView.exe
rem go to view..
%VIEWER% "%HOME%\yafray.%IMAGE%"
goto EXIT

:ERROR
echo !! Not yafaray-xml.exe in your path !!
pause

:EXR
echo !! Xnview not support .exr files. Use other viewer. !!
pause

rem
:EXIT
The Universe is an infinite equation
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Shared an small .bat file - by povmaniac - 06-07-2013, 08:14 PM
RE: Shared an small .bat file - by oort - 06-07-2013, 09:59 PM
RE: Shared an small .bat file - by povmaniac - 06-07-2013, 10:19 PM
RE: Shared an small .bat file - by Neon22 - 09-28-2013, 03:13 AM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode