20.08.2015 Views

1 Scripting

1 Scripting - Digital Cinema Arts

1 Scripting - Digital Cinema Arts

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Scripting</strong> With Hscript and the c-shellDo not incorporate extra spaces or comments on the line that contains the ENDCATterminator. If you do, you'll get an unknown variable error.Alternatively, you might see (and use) the line hscript& means any error messages that normally would appear on screen are insteadwritten to a Þle. In this case the Þle is called renlog. You should note that renlogcan be any Þle name.3.3 EXAMPLES – RENDERING SCRIPTSEXAMPLE 1 – BASIC RENDERLooking at a very simple example, the following script works with two parameters–the .hip Þle to render and the Þle name to send the rendered image to. The script isnamed simple_ren and would be invoked as follows:basic_render test.hip /usr/tmp/test_image.picsource#! /bin/csh -f#check to see if user suppled the correct number of arguments#- exit if notif ($#argv < 2) thenecho “USEAGE: ren_script ”exitendif# set up user supplied argumentsset HIP_FILE = $1set OUT_FILE = $2# start up hscript and allow commands to be sent from C shellhscript & renlogmread $HIP_FILEopcd \/out# set the ouput file name for the render output driveropparm mantra1 picture ( $OUT_FILE )#start the renderrender mantra1#signal an end to commands sent to hscriptENDCAT90 1 Houdini 6.0 Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!