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.

Intrinsic CommandsEXPLANATIONThis can turn on or off the undo mechanism in Houdini. With no options, the currentstate will be printed out. Please use this command with extreme caution. Turning offthe undo mechanism can cause scripts to execute with greater speed, but the changesmade by the script will not be undo-able. As well, be careful to restore the undostate at the conclusion of the script.The second usage with the -s option queries the memory usage of the undo mechanism.Note: Be careful to restore the undo state at the conclusion of the script! It wouldbe a shame to lose hours of work because a script forgot to turn undo’s back on.1.32 VERSIONSYNTAXversionEXPLANATIONDisplays the current version of the program you are running.1.33 WHILESYNTAXwhile (expression)...endEXPLANATIONThe while loop construct. A while loop will iterate continuously while the expressionevaluates true. When the expression is false, the loop will terminate. Thismeans you will have to manually include a variable within the expression, andincrement that variable somewhere within the body of the loop in order for a whileloop to Þnish its execution.Warning: It is very easy to create endless loops which will not terminate if you arenot careful about incrementing the variable within the expression somewhere withinthe body of your loop. You may want to use the foreach and for loop constructswhich implicitly increment your variable.EXAMPLEset i = 0while ( $i < 10 )set i = `$i+1`120 2 Houdini 6.0 Reference

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

Saved successfully!

Ooh no, something went wrong!