20.08.2015 Views

1 Scripting

1 Scripting - Digital Cinema Arts

1 Scripting - Digital Cinema Arts

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Intrinsic Commandshscript-> setenv foo = 0 ; unix echo '$foo'01.27 SETENVSYNTAXsetenv [-l] varname = valuesetenv -u namesetenv [-s]EXPLANATIONThe setenv command sets the global variable you specify by name to the value speciÞed.If you do not provide a name, a list of all variables is displayed. When not providinga name, and using the -s option, the command will produce output suitablefor loading as a script.The -l (local) option on setenv makes it work like set – forcing the variable to actlocally, meaning their values are discarded once the current script Þle ends.If no name is speciÞed and the -s option is given, it will output the list of variables ina form which is useful for sourcing into another .hip Þle. This makes it easier tomove variables from one .hip Þle to another.The -u option will un-set the speciÞed variable.See also: set .Note: It is important to note that this command actually sets a real UNIX environmentvariable, its inßuence is therefore both within the Houdini shell, and in yourstandard UNIX shell. You can Þnd a complete list of Houdini-related environmentvariables in: Environment Variables p. 211.1.28 SHIFTSYNTAXshiftEXPLANATIONWhen a script is sourced, the arguments are set to variables $arg0, $arg1 ... Theshift command will shift the arguments so that $arg1 goes into $arg0, $arg2 goesinto $arg1 etc. The $argc variable is decremented to reßect the changes.118 2 Houdini 6.0 Reference

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

Saved successfully!

Ooh no, something went wrong!