Houdini 17.0 HScript commands

HScript language guide

On this page

List of HScript commands

Variables

In HScript, you can assign strings to variables with the set command:

Set a variable

set x = "hello"

Set a global variable

set -g x = "hello"

or

setenv x = "hello"

Unset a variable

set -u x

A variable name must begin with letter or an underscore (_), followed by any number of letters, numbers or underscores.

To use a variable in a command, prefix its name with a dollar sign ($):

> set foo = "bar"
> echo $foo
bar

You can optionally enclose the name of the variable in curly braces ({}) to prevent the variable name from running into surrounding text:

> echo ${foo}baz
barbaz

In addition, when you use curly braces HScript will expand variable references in the name before looking up its value. This lets you simulate simplistic arrays:

set foo1 = Padma
set foo2 = Mohammed
for i = 1 to 2 echo ${foo$i} end
Padma
Mohammed

In HScript, variables can be local or global (sometimes called system variables).

Local variables are local to the script being run. When the script is finished, the variable disappears. Local variables cannot be used outside the script in which they're defined. To create or set a local variable, use set. The variables created by the for and foreach loops are always local.

Global variables are available to all scripts and to any programs started by Houdini. To create or set a global variable, use setenv or set -g.

Variable modifiers

You can add modifiers to the end of variable names to edit the returned value. These modifiers do not change the value stored in the variable, they only change the value returned by the variable reference with the modifier.

To modify the variable value, add :code to the end of the variable name. For example:

> set afile = /home/matt/bin/foo.bar
> echo $afile:e
bar
> echo ${afile:e}
bar

The available codes are:

:h

(Head) The path part of a pathname (that is, the path up to the filename).

> echo ${afile:h}
/home/matt/bin

:t

(Tail) Just the filname part of a pathname.

> echo ${afile:t}
foo.bar

:e

The extension on the end of the filename.

> echo ${afile:e}
bar

:r

(Root) All parts of a pathname except the extension.

> echo ${afile:r}
/home/matt/bin/foo

:s/ptrn/repl/

Substitute occurrences of pattern ptrn with repl. See the :g and :a modifiers below.

> echo ${afile:s}/foo/baz/
/home/matt/bin/baz.bar

:u

Convert the value to uppercase. See the :g and :a modifiers below.

> set str = Hello There
> echo ${str:u}
HELLO THERE

:l

Convert the value to lowercase. See the :g and :a modifiers below.

> set str = Hello There
> echo ${str:l}
hello there

Use the following prefixes to modify the behavior of the codes:

:g

(Global) Treat the string as a whitespace-delimited list of strings, and apply the following code to each component independently.

:a

(All) Recursively apply the following code as many times as possible.

For example:

set A = "foo1 foo2 foo3 foofoo4"

$A:u == "Foo1 foo2 foo3 foofoo4"
$A:u:u == "FOo1 foo2 foo3 foofoo4"
$A:gu == "Foo1 Foo2 Foo3 Foofoo4"
$A:gu:u == "FOo1 Foo2 Foo3 Foofoo4"
$A:au == "FOO1 FOO2 FOO3 FOOFOO4"

$A:s/foo/bar/ == "bar1 foo2 foo3 foofoo4"
$A:s/foo/bar/:s/foo/bar/ == "bar1 bar2 foo3 foofoo4"
$A:gs/foo/bar/ == "bar1 bar2 bar3 barfoo4"
$A:as/foo/bar/ == "bar1 bar2 bar3 barbar4"

Put the output of a command in a variable

Unlike expression functions, HScript commands are not functions and do not have return values. They just print output to the textport. If you try to assign the result of a command to a variable, as in:

set objects = opls /obj

…you’ll just get the string "opls /obj" in the $objects variable. However, you can capture the output of a command as a string and put it in a variable to achieve the same effect. To capture the output of a command, put it inside a run expression function and then use backquotes to evaluate the expression in HScript. Essentially, you're calling HScript inside an expression (to get a return value) inside HScript.

set objects = `run("opsls /obj")`
echo $objects
model ambient1 light1 light2 light3 cam1

Redirect the output of a command to a file

To redirect the output of an HScript command to a file, use >filename in the command. To append to the file instead of overwriting it, use >>filename. To redirect the error output and the standard output of a command, use >&filename.

When using the unix command to launch an external process, you may want to do redirection in the external shell instead of in the textport. Enclose the argument in single quotes to prevent the Houdini command interpreter from acting on the redirection before the external shell can see it.

unix myscript.pl '>output.txt'

Control structures

if

The if statement executes a block of commands if a condition is true. You can optionally test alternate conditions with else if and execute a block of code if all other conditions fail with else.

if condition1 [then]
    commands to execute if condition is true
else if condition2
    commands to execute if condition2 is true
else
    commands to execute otherwise
endif

For example:

if ( $F == 1 ) then
    echo Frame One
else
    echo Not Frame One
endif

Currently, statements inside the if clause must occur on separate lines. That is, statements like if ($F == 1) echo Frame One will not work.

for

The for statement loops over a block of statements, incrementing a "counter" variable from a start number to an end number, optionally by a certain step.

for count_variable = start to end [step stepsize]
    commands to loop
end

Do not add a $ before the name of the count variable in the for statement. For example:

for i = 1 to 3
    echo $i
end

for i = 1 to 100 step 3
    echo $i
end

foreach

The foreach statement loops over a block of statements, setting a variable to the next element in a list each time.

foreach iterator_variable (list_string)
    commands to loop
end

For example:

foreach i ( a b c )
    echo $i
end

foreach object ( `run("opls -d")` )
    echo Object $object
end

HScript does not have a real list or array type. The list the for each statement loops over is a string that HScript splits into elements the same way it parses the command line into arguments. See how HScript splits up the command line.

while

The while statement loops over a block of statements as long as a condition is true. while condition commands to loop while condition is true end For example:

set i = 0
while ( $i < 10 )
    set i = `$i+1`
    echo $i
end

break/continue

The break statement exits the current loop prematurely. The continue statement ends the current iteration of a loop prematurely and starts the next one.

Condition operators

You can use these operators in the if and while structures:

()

Grouping, precedence.

== != < > <= >=

Comparison: equal, not equal, less-than, greater-than, less-than or equal, greater-than or equal.

&& ||

Logical and, logical or.

You can enclose HScript expressions in parentheses for clarity, but it is not necessary:

for i = 1 to 10
...
end

for (i = 1 to 10)
...
end

Quoted strings

Text inside single quotes (') is not expanded.

Text inside double quotes (") has variables expanded.

A double-quoted string is considered one argument.

A backslash character (\\) escapes the next character. For example, to use double-quotes in a string: "I had a \\"great\\" time.".

When a string doesn’t require variable expansion, use single quotes to speed up evaluation.

If you have two quoted strings next to each other with no spaces, they are considered a single argument.

For example:

set foo = "Hello world"
echo '$foo='"$foo"
$foo=Hello world

…the echo command has one argument: '$foo=Hello world'.

HScript evaluates backquotes with a higher priority than double quotes. If a double-quoted argument encloses a back-quoted string, the back-quoted string may contain double quotes without terminating the initial double quote delimiter.

For example, the string:

foo`ch("/obj/geo1/tx")`

…is considered a single argument.

As a general rule, do not include spaces between backquotes and what’s inside them. Houdini may not evaluate them if there are extra spaces.

Comments

Everything following a # character on a line is considered a comment. To use a literal # in an unquotes string without starting a comment, put a backslash (\\) in front of it.

Splitting the command line

Houdini splits input lines into words at space characters. The special characters ; < > ( ) = form separate words and Houdini will insert spaces around these characters in unquoted strings. HScript is very lax about arguments. Basically anything it doesn’t understand as a command or option, it will treat as a string. This can be useful when not having to put quotes around something makes multiple levels of quoting easier. However, it may insert extra spaces around special characters in unquoted strings.

As a general rule, you should put quotes around strings you don’t want HScript to alter.

Using the HScript textport

The textport lets you input HScript commands and see the results. To open a new textport window, choose Windows > HScript textport. To put a textport in a pane, open the pane’s Pane menu and choose Textport.

  • Quick copy and paste: select text, then click to immediately paste it into the command line.

  • Quick help: type help command_name to print a text version of the command’s online help in the textport.

  • Type ahead: you can start typing new commands before Houdini has finished executing the current command. Houdini will execute the "buffered" commands when it’s done.

  • Scrolling: use Page up and Page down to scroll, or press to grab the contents of the window and drag.

  • Continuation: if you press Enter in a command line that’s not finished (for example, in the middle of a for loop), the command line will continue until you finish the open block (with end).

  • Command history

    Recall a previous command on the command line

    Press and to move through the history of previous commands. You can edit the text of the recalled command before executing it.

    Repeat the last command

    Type !! on the command line.

    Repeat a previous command

    Type !-num on the command line to execute the command from num entries ago. For example, type !-5 to repeat the fifth most recent command.

    Repeat the last command matching a pattern

    Type !string on the command line to execute the previous command containing string.

    View the command history

    Use the history command to print the command history.

  • Create aliases of commonly used commands

    In HScript you can use the alias command to assign are frequently used command, often with arguments, to a new command name. For example, if you find you frequently need to list the names of the objects in the scene, you can assign the command to the shorter, easier to type alias objs.

    alias objs "opls /obj"
    

    Now typing objs on the command line will execute opls /obj.

    HScript’s alias expansion is not as sophisticated as csh. For example, there is no recursive alias expansion; the following sequence of commands will not produce the expected result:

    alias opcd opcf
    alias cd opcd
    

    The cd alias will result in an unknown command "opcd" message since the alias expansion terminates after the first expansion.

    Also, HScript’s alias expansion does not include the history meta-character substitution feature of csh.

hscript standalone application

The hscript application is in $HFS/bin. Running it on the system command line will give you a console similar to the textport in which you can run HScript commands and see the results.

The hscript application lets you write batch scripts that exercise the full power of Houdini without having to start up the entire graphical interface.

Use hscript -q on the command line to suppress the version information the utility normally prints when it starts up. This is useful when you're redirecting the output of the hscript standalone process.

Create and use script files

You can encapsulate a group of commands in a script file so you can reuse its functionality. Simply create a text file containing the commands you want to run. In general, you’ll want to save the script file in the script path, for example in $HOME/houdiniversion/scripts.

In scripts, you can use the exit statement to exit the script prematurely. This exits all loops cleanly. HScript does not support setting an "exit status" like a UNIX shell, but you can use a global variable to achieve the same thing.

You can pass arguments to the script when you run it to customize its behavior. To use arguments in the script file, use $argn variables:

$arg0 is set to the name of the script as it was called.

$arg1, $arg2, $arg3, etc. are set to the arguments passed in to the script.

$argc is set to the number of arguments passed in to the script. For example, if the script is called with myscript first second third (three arguments), $argc is 3.

To do simple parsing of the command line, or to work with a variable number of arguments, you can use the shift command. The shift command removes the first argument and shifts all the remaining arguments down, so $arg1 is now what was $arg2. So, you can iterate through all the arguments by processing the value of $arg1, then calling shift to move the next argument into $arg1.

You can also read input from the user with the read command.

Run a script

Run a script in the script path. Type the script name (with the .cmd extension), followed by any arguments: myscript.cmd hello 15 Run any script file from disk. Use the source command and the filename, followed by any arguments:

source ~/myscript.cmd 1 10 hello

The Houdini script path

The HOUDINI_SCRIPT_PATH environment variable contains a list of directories to search for scripts. It includes $HFS/houdini/scripts (for factory-installed scripts), $HSITE/scripts (for site-specific scripts), $JOB/scripts (for job-specific scripts), and $HOME/houdniversion/scripts (for each user’s scripts).

If a script file is in the path, you can run the script by typing its name (with the .cmd extension) in Houdini.

Scripts in directories later in the path will override scripts with the same name earlier in the path. You can use this feature to replace factory-installed scripts (such as 123.cmd) with your own scripts by putting script files with the same name in $HOME/houdniversion/scripts.

Run scripts in response to events

Startup

$HFS/houdini/scripts/123.cmd

Houdini runs this script when it first starts up. It does not run again if you choose File > New. This script contains a lot of code to set up the initial Houdini environment (including loading the initial geometry). If you want to change something in this file, you should copy it to somewhere higher in the script path (for example, $HOME/houdniversion/scripts) and modify that copy. 123.cmd is the startup script for Houdini FX. Other products such as Halo, Alfred, etc. use separate startup scripts in scripts/ named for the product.

Note

Only Houdini FX runs 123.cmd. Houdini Core runs houdinicore.cmd instead of 123.cmd on startup. Both 123.cmd and houdinicore.cmd serve the same purpose but for different products.

Open or create a new scene file

path/scripts/456.cmd

Houdini runs this script after you open a saved scene. This script does not exist in a factory install. If you create it somewhere in the script path (for example, $HOME/houdniversion/scripts), Houdini will run the script whenever a new scene opens, including on File > New.

Create a node

$HFS/houdini/scripts/op_type/op_internal_name.cmd

When you create a node, Houdini runs the corresponding script in a subdirectory of scripts/.

(Some operators have scripts in the factory install that perform various tasks, including preserving compatibility with scene files from old versions of Houdini, while other operators do not have any scripts.)

This is very useful for customizing the behavior of built-in operators, or enhancing custom operators (digital assets) you create.

You can create a new script with the proper directory structure and name in the script path (for example, $HOME/houdniversion/scripts/sop/box.cmd for the Box SOP) to have Houdini run the script when you create a node with the operator.

To get the internal name of an operator, choose Tools > Operator Type Manager and look under Internally defined operators.

Delete a node

To set a script to run when a certain node is deleted, click the Gear menu in the node’s parameter editor and choose Edit deletion script.

This is useful when you create a custom operator that has associated nodes you want to delete if the main node is deleted. For example, the built-in bone objects have deletion scripts that delete supporting nodes such as the kinematic solver CHOPs if the bones are deleted. You can set the deletion script for node in HScript with the opdelscript command. Digital asset events See scripting digital assets.

Select scripts

Houdini lets you run a custom script when the user selects a particular object in the viewer. Set the object’s Select script parameter (on the Misc tab). The value of the parameter is interpreted as HScript, however you can also choose to call an external script file. Houdini runs this script when you select the object in the viewer with the Select or Pose tools. It does not run when you select the node in the network editor, or select the object as part of using another tool.

Possible uses for this feature include creating user interfaces (such as "switch" or "button" objects that change things in the scene when you click them) and debugging (using message to pop up information about an object when you select it).

Houdini runs the script in the context of the object that was selected. Use opcf .. to go up to the network level in which the selected object lives. One very useful trick is to use the opset command to set the properties (such as the display flag) of other objects when you click an object. For example, you can create a simple interface where clicking an "on" Null turns makes a group of objects visible, and clicking an "off" Null turns the objects invisible.

Houdini makes these variables available to the select script. You can use them to modify the behavior of the script. To see the the value of these variables for a given object, you can use the message command in a selection script. For example, if you put the following script in the Select script parameter of an object:

message $SELECT_NAME

…when you select the object, Houdini will pop up a window showing the object’s name.

SELECT_NAME

The name of the selected object. SELECT_PATH The path to the selected object.

SELECT_SHIFT, SELECT_ALT, SELECT_CTRL

When these variables are set to 1 it means the corresponding modifier key was held down when the user selected the object.

SELECT_MOVE

Normally, a select script on an object prevents you from dragging the object directly (you must select the object, which triggers the script, then drag a handle). Unset this variable to allow the user to drag the object directly while still executing the selection script.

SELECT_PICK

Unset this variable to make this node become not selected.

To unset a variable, use set -u varname.

Example script

You can also take a look at the scripts included with Houdini for examples of real-world HScript.

# Script for a guessing game (guess.cmd)

# First, get a random seed

set foo = `system(date)`
set seed = `substr($foo, 14, 2)``substr($foo, 17, 2)`

# Then, pick a random number

set num = `int(rand($seed)*100)+1`

set guess = -1
echo Guess a random number between 1 and 100.

while ( "$guess" != "$num" )
    echo -n Enter guess (q to quit): "
    read guess

    if ( "$guess" == q || "$guess" == "") then
        break;
    endif

    # Convert to a number
    set iguess = `atof($guess)`

    if ( $iguess &lt; $num ) then
        echo Too low
    else if ( $iguess > $num ) then
        echo Too high
    else
        echo Spot on!
    endif
end

echo The number was $num

Useful scripts included with Houdini

123.cmd

Run when Houdini FX starts up. houdinicore.cmd (formerly hescape.cmd) serves a similar purpose for Houdini Core. See event scripts.

defaultscene.cmd

fixnodename.cmd

Performs prefix and suffix substitution on node names.

Type fixnodename in the textport with no arguments to see its usage.

pickandcenter.cmd

Takes an object name as an argument and centers that object in the viewer. This is intended to be run whenever you select a particular object. Use pickandcenter $OS as the selection script to call this script on the object you selected.

traverse.cmd

Takes the name of a command as an argument, and recursively calls that command on every node and sub-node.

uniquename.cmd

Takes a base object name and a variable name as arguments, and sets the named variable to a name (constructed from the base object name plus a number) which is guaranteed to be unique at the time the command is called. You can also use the -v flag of the opadd command to get the name of a node after you create it.

Call host system commands

Use the ucd and unix commands to start the language’s runtime as an external process.

Houdini passes any global HScript variables to the external process as environment variables, and sets the status variable to the exit code of the command.

Houdini includes dedicated HScript commands to call typical host system commands, such as uls to list the contents of a directory, urm to remove a file, and upwd to print the current directory. To make your code portable to non-UNIX systems such as Windows, use these HScript commands instead of explicitly calling the equivalent UNIX utility (ls, rm, pwd, etc.).

Change the current directory ucd
Print the current directory upwd
List the contents of a directory uls
Create a new directory umkdir
Remove a file urm
Start a host system command unix

How to refer to viewers and viewports in commands

Viewers have names with the form "desk.pane.type", where:

  • desk = The name of the desk containing the viewer pane.

  • pane = The name of the viewer pane.

  • type = "world", "particle", or "texture", depending on the contents of the pane.

To see a list of all viewers, use "viewls -n". For most viewer-related commands, you can specify more than one viewer at a time, and/or use wildcards in viewer names.

A viewer can be subdivided into up to four viewports (such as top, left, front, and perspective). Viewports have names with the form "desk.pane.type.viewport", where:

  • desk = The name of the desk containing the viewer pane.

  • pane = The name of the viewer pane.

  • type = "world", "particle", or "texture", depending on the contents of the pane.

  • viewport = The name of the viewport within the viewer pane. You can change the name of a viewport in the viewport’s display options editor. To list all viewports, use "viewls -n -v" (to show what viewer each viewport is in, just use "viewls -v").

For most viewport-related commands, you can specify more than one viewer at a time, and/or use wildcards in viewer names. You can also use the name of a viewer to refer to all viewports in the viewer. For example instead of "viewcamera -c cam1 Build.panetab1.world.persp1 Build.panetab1.world.top1 ...", you could do "viewcamera -c cam1 Build.panetab1.world.*" or just "viewcamera -c cam1 Build.panetab1.world".

Most viewport-related commands work on view-memories as well as viewports. View-memories have the format "desk.pane.type:memory", where memory is a number from 1-9 or a name. The first three components (desk name, pane name, type) can have wildcards. To list all view-memories, use viewls -n -l.

The viewlayout command controls the number and layout of viewports in a viewer pane.

HScript tips and tricks

  • Use commandecho on to make Houdini print the HScript commands it executes internally in the textport.

  • Maximum line length for a Houdini command is 8 KB after all expansions.

  • Maximum number of arguments on a command line is 1024.

  • Maximum number of number of nested if statements in a single source file is 128.

  • Maximum number of source files is limited by the system limit on open files.

  • No limit for nested loops.

HScript commands

  • alias

    Creates an alias for a command or sequence of commands.

  • appendseq

    Appends a series of files to the current sequence in mplay.

  • atjob

    Execute commands at a future time.

  • audiopanel

    Changes parameters of the audio pane.

  • autosave

    Enables/disables auto saving.

  • bonealigncapture

    Aligns the capture and animation (deform) regions.

  • boneconvert

    Updates bones from old Houdini 4 hip files.

  • bonefixchops

    Cleans up any references to a bone in InverseKin CHOPs before you delete the bone.

  • bonemoveend

    Adjusts the length and angles of the given bone object so that the bone would end at the given position in the rest chain.

  • bookmark

    Add, list, or remove bookmarks.

  • break

    Breaks out of the current loop.

  • bundlelist

    Allows different options of a bundle list pane to be set.

  • chadd

    Adds channels to the objects specified.

  • chalias

    Create an alias for a channel name.

  • animeditor

    Sets various options of the animation editor.

  • chanlist

    Sets various options of the channel list.

  • chautoscope

    Changes autoscope property of parameters (automatically scope when object is selected).

  • chautoselect

    Changes autoselect property of parameters (automatically select in channel list when object is selected).

  • chblockbegin

    Signals the start of a block of chadd/chkey commands in a script file.

  • chblockend

    Signals the end of a block of chadd/chkey commands in a script file.

  • chcommit

    Commits pending key changes.

  • chcp

    Copies the contents of one channel to another.

  • chgadd

    Creates one or more channel groups.

  • chgls

    Lists channel groups.

  • chgop

    Sets the contents of a channel group.

  • chgpopulate

    Populates a channel group with a node’s channels.

  • chgrm

    Removes channel groups

  • chhold

    Puts channels into "hold" or "pending" state.

  • chkey

    Edits or inserts a key.

  • chkeyget

    Samples channels at given times and returns key information.

  • chkeyls

    List key times for channels.

  • chkeymv

    Moves keys in channels to different frames/times

  • chkeyrm

    Removes keys in the specified channels at different frames/times

  • chlock

    Locks parameters so they can’t be modified.

  • chls

    Lists channels.

  • chopexportmap

    Manipulates CHOP export mapping overrides.

  • chopls

    Lists the tracks in a chop operator.

  • chopscope

    Assigns CHOP channels to available viewers by pairing CHOP paths with CHOP channels.

  • chopview

    Sets various CHOP viewer options.

  • chread

    Reads channel data from a file.

  • chrefit

    Refits the channels using cubic interpolation.

  • chrename

    Renames a channel.

  • chreverse

    Reverse the channel data over a given range.

  • chrm

    Removes a channel

  • chround

    Moves or replaces keys so that they lie on integer frame values.

  • chscope

    Sets the channel scope.

  • chstretch

    Stretches out animation on channels.

  • chwrite

    Writes channel data out to a .chan or .bchan file.

  • clear

    Clears the textport.

  • closeport

    Closes a communication port created by the openport command.

  • cmdread

    Runs the commands in a specified file.

  • colladaimport

    Imports a COLLADA (1.4.0) file.

  • colorsettings

    Changes the gamma and/or LUT on various UI gadgets.

  • commandecho

    Enables or disables the echoing of commands.

  • compfree

    Releases all cached data and images in use by all composite networks.

  • compopts

    Controls compositing cache usage and threading.

  • compproject

    Controls the current compositing project.

  • continue

    Skips to the end of a loop iteration.

  • cplane

    Changes construction plane parameters.

  • datatree

    Sets the current plugin used by a data tree pane.

  • desk

    Reconfigures pane layouts.

  • dopdatahint

    Adds hints for DOP networks to validate simulations.

  • dopdatatypealias

    Creates an alias for a DOP data type.

  • dopdatatypes

    Prints a list of available DOP data types.

  • dopsave

    Saves the entire state of a DOP simulation to a file.

  • dopsavedata

    Saves a DOP simulation data item to a file.

  • dopsolveadddata

    Adds data to a DOP object when running a Script Solver DOP.

  • dopsolvecopydata

    Copies some DOP data from one location to another when running a Script Solver DOP.

  • dopsolveremovedata

    Removes data from a DOP object when running a Script Solver DOP.

  • dopsolvesetoption

    Sets a value on a piece of DOP data when running a Script Solver DOP.

  • dsedit

    Built-in alias for otedit.

  • dsoinfo

    Displays paths of plug-in functions and operator types.

  • dsreload

    Reloads all OPs which are based on scripts.

  • echo

    Prints text to the textport.

  • else

    Else conditional for an if statement.

  • end

    Termination of a for or foreach statement.

  • endif

    Termination of the if statement.

  • excat

    Prints expression source code.

  • exedit

    Opens expressions in an editor.

  • exhelp

    Shows usage information for an expression.

  • exit

    Stops execution of the script file. If the optional status code is provided, then it sets the variable 'status' to the given integer.

  • exls

    Lists the current expression functions

  • exread

    Load custom expression source code from external files.

  • exrm

    Removes custom expressions.

  • fbximport

    Imports a Filmbox FBX file.

  • fbximportanim

    Imports a single Filmbox FBX animation curve.

  • fcur

    Gets or sets the current frame number.

  • fdependadd

    Adds a file dependency.

  • fdependhide

    Hides a file dependency.

  • fdependls

    Lists all file dependencies.

  • fdependrm

    Removes a file dependency.

  • filechooser

    Opens a file chooser and prints the chosen file.

  • for

    Loops through a block of commands according to a counter.

  • foreach

    Loops through a block of commands for each item in a list.

  • fplayback

    Sets various options of the playbar.

  • fps

    Gets or sets the current playback speed.

  • frange

    Sets the playback range on the playbar.

  • fset

    Sets the playback range to a certain length

  • ftimecode

    Gets or sets the current frame in timecode format.

  • geocache

    Manipulates the internal geometry cache.

  • glcache

    Manipulates the OpenGL caches.

  • help

    Prints usage help for a command.

  • helpbrowser

    Performs actions related to the help browser pane.

  • history

    Prints the command history.

  • if

    Conditionally executes a block of commands if a condition is true.

  • imgdispopt

    Sets the global image viewer display options.

  • imgsave

    Writes images from a Composite View or MPlay to disk

  • imgview

    Changes global options of a COP/Mplay image viewer.

  • imgview2d

    Changes options of a 2D view of a COP image viewer.

  • imgviewhist

    Changes options of a Histogram view of a COP image viewer.

  • imgviewls

    Prints the names of available COP/Mplay image viewers to use with imgview.

  • imgviewtime

    Changes options of a Timeline view of a COP image viewer.

  • imgviewtool

    Invokes a tool in a COP image viewer (or lists available tools).

  • iprview

    Sets various options of an IPR view pane.

  • java

    Starts a java virtual machine.

  • job

    Get or set the $JOB variable.

  • kinconvert

    Updates old hip files to new IK structure.

  • linker

    Sets various options of the light linker.

  • listchooser

    Presents a graphical interface to the user to choose from a list of options.

  • loadaudio

    Load, unload, and set options for audio.

  • loadseq

    Loads a sequence of files into mplay.

  • matrman

    Generate a RenderMan sl file from a shader.

  • matupdateref

    Updates all the Palette material references.

  • memory

    Prints current memory usage.

  • menurefresh

    Reloads the contents of the OPmenu.xml, PARMmenu.xml, ParmGearMenu.xml and CHGmenu.xml menu files.

  • message

    Presents text to the user.

  • mnew

    Resets the session.

  • mplayfit

    Fits the mplay window to the image (at 100%).

  • mplayhome

    Fits mplay image to the viewport size.

  • mplayprofile

    Sets the current mplay profile.

  • mread

    Loads a hip file.

  • mwrite

    Save the current session to a hip file.

  • nbadd

    Create network boxes

  • nbcolor

    Color network boxes

  • nbcp

    Copy network boxes

  • nbget

    Get network box flag information

  • nbglob

    Pattern expansion for network box names

  • nblocate

    Locate and move network boxes

  • nbls

    List network boxes

  • nblsop

    Lists operators contained in network boxes

  • nbname

    Renames a network box

  • nbop

    Sets the contents of a network box.

  • nbrm

    Deletes network boxes

  • nbset

    Set network box flags.

  • nbsize

    Resizes network boxes

  • netcolumns

    Sets the visible columns in the network editor’s list mode.

  • neteditor

    This command is no longer used.

  • netviewdep

    This command is no longer used.

  • networkeditor

    Sets various options of the network editor.

  • nextkey

    Moves playback to the next or previous key.

  • nodegraph

    This command is no longer used.

  • objcache

    Manipulates the internal object transformation cache.

  • objcleantransform

    Zeroes transforms on an object.

  • objextractpretransform

    Transfers an object’s pre-transform values to its local transforms.

  • objkinoverride

    Sets the kinematic override option.

  • objlightlink

    Manages object light category selection in a light-centric way.

  • objmaterial

    Manages object-local overrides of material parameters.

  • objparent

    Controls the "keep position when parenting" option.

  • objpretransform

    Sets or displays an object’s pre-transform matrix.

  • objresetpretransform

    Resets the given object’s pre-transform values to the identity matrix.

  • ombind

    Binds a handle to an operator parameter.

  • ombindinfo

    Lists parameters bound to an operator’s handle.

  • omls

    Lists the available handles for an operator type.

  • omparm

    Changes a handle’s settings.

  • omsbind

    Binds an operator parameter to a selector

  • omsbindinfo

    Lists the selectors bound to an operator.

  • omsls

    Lists the available selectors for an operator type.

  • omsunbind

    Removes bindings between operators and selectors.

  • omswhere

    Lists the operators bound to a selector.

  • omunbind

    Removes bindings between an operator and a handle.

  • omwhere

    Lists the operators bound to a handle.

  • omwrite

    Writes out all handle and selector bindings to a file.

  • opadd

    Adds an operator to the network.

  • opalias

    Allows an operator type to be created using an alternate name.

  • opautoplace

    Autoplaces a node tile within a network.

  • opbadd

    Creates operator bundles.

  • opbfilters

    Lists all valid filters for bundles.

  • opbls

    Lists bundles.

  • opbname

    Renames a bundle.

  • opbop

    Modifies operator bundles.

  • opbrm

    Removes operator bundles.

  • opcf

    Changes to a different folder in the operator hierarchy.

  • opchange

    Search and replace text in parameter values.

  • opchangetype

    Changes an operator to a new type.

  • opchmod

    Changes the access permissions of operators.

  • opcollapse

    Collapses nodes into a subnetwork.

  • opcolor

    Gets or sets an operator’s tile color in the network editor.

  • opcomment

    Gets or sets a comment string for an operator.

  • opcook

    Tells (or forces) an object to re-cook.

  • opcopy

    Copies an operator and its dependencies to the clipboard.

  • opcp

    Copies an operator to a new place in the operator hierarchy.

  • opdefaultcolor

    Changes the initial color of a node when it is put down.

  • opdefaultshape

    Changes the initial shape of a node when it is put down.

  • opdelscript

    Gets or sets a script to run when an operator is deleted.

  • opdepend

    Lists all operator dependencies of a node.

  • opdeprecate

    Marks node types as deprecated and hides them from the tab menu.

  • openport

    Opens a communication port to Houdini.

  • opeventscriptcache

    Manipulates the internal event script path cache used to avoid excessive searching of the HOUDINI_SCRIPT_PATH.

  • opexclude

    Deletes operator types from the current Houdini session.

  • opexprlanguage

    Gets or sets the default expression language for the specified nodes.

  • opextern

    Shows all/missing external references in a node.

  • opextract

    Expands a subnetwork

  • opfind

    Find operators that match a set of criteria.

  • opfirstname

    Changes the initial name of a node when it is put down.

  • opgadd

    Creates a new operator group.

  • opget

    Gets operator properties.

  • opgetinput

    Gets the node attached to a certain input of an operator.

  • opglob

    Expands a pattern into a list of operator names.

  • opgls

    Lists operator groups.

  • opgop

    Controls membership of operator groups

  • opgrm

    Removes an operator group from the current network.

  • ophelp

    Displays help for an operator or operator type.

  • ophide

    Hides nodes from the tab menu.

  • opinfo

    Displays information about the operator, including the comment.

  • oplayout

    Automatically lays out operators in the network editor.

  • oplegacyinputs

    Specifies input names for legacy nodes that were saved only with input numbers.

  • oplocate

    Gets/sets the X/Y coordinates of operator tiles in the network view.

  • opls

    Lists operators in the network hierarchy.

  • opmenu

    Shows the items of a menu parameter on an operator.

  • opmultiparm

    Gets or sets multiparm channel linking information for a node.

  • opname

    Renames an operator.

  • oporder

    Changes the user-defined order of operators.

  • oppane

    Show an editor for an operator.

  • opparm

    Gets/sets/manipulates parameters on a node.

  • oppaste

    Paste data copied with opcopy into a network.

  • oppresetload

    Loads channels and parameter values into an operator from a preset.

  • oppresetloadfile

    Loads channels and parameter values into an operator from a .preset file.

  • oppresetls

    Lists the presets available for an operator.

  • oppresetrm

    Removes a preset.

  • oppresetsave

    Saves channels and parameter values from an operator as a preset.

  • oppresetsavefile

    Saves channels and parameter values from an operator to a .preset file.

  • opproperty

    Creates spare properties from a set of pre-defined properties

  • oppwf

    Prints the current folder in the network hierarchy.

  • opramp

    Sets a key in an operator’s ramp.

  • opread

    Loads an operators file created with opwrite.

  • oprename

    Changes the name that appears on toolbars to represent an operator type.

  • oprm

    Deletes operators.

  • oprmtype

    Deletes operators of a specific type.

  • opsave

    Saves the output data of an operator to a file.

  • opscale

    Obsolete. Use neteditor -v instead.

  • opscript

    Prints the commands necessary to recreate an operator.

  • opset

    Turns various operator flags on or off.

  • opspare

    Add, remove or list spare parameters in an operator.

  • opspareds

    Sets the dialog script describing spare parameters on one or more nodes.

  • opstat

    Print node creation time, modification time, author, and permissions.

  • optype

    Prints type-specific information about operators.

  • optypeinstall

    Built-in alias for optyperead

  • optyperead

    Loads an .optype archive and installs the contained type into a Houdini directory.

  • optypeuninstall

    Removes all references to an operator.

  • opunhide

    Makes operators accessible in the toolbars.

  • opunload

    Causes a node to throw away any cached geometry.

  • opunwire

    Disconnects inputs from an operator.

  • opupdate

    Re-cooks operators if their referenced files have changed.

  • opuserdata

    Provides access to name/value pair data that can be set on a node.

  • opwire

    Connects the output of one operator to the input of another.

  • opwrite

    Saves operators to a file.

  • otcollapse

    Create an operator type library from separate files.

  • otcomment

    Gets/sets the comment text associated with an operator type.

  • otconfig

    Sets various options of the operator type manager.

  • otcontentadd

    Adds a file to an existing operator type definition.

  • otcontentdelete

    Removes data from an operator type definiton.

  • otcontentls

    Lists all sections in an operator type definition.

  • otcontentsave

    Extracts a file from inside an operator type definition.

  • otcopy

    Copies data from inside one HDA file to another.

  • otcreatecompiledtypefrom

    Creates a new operator type definition from a subnet.

  • otcreatetypefrom

    Creates a new operator type definition from a subnet.

  • otdelete

    Deletes operator definitions from an operator type library.

  • otedit

    Opens a property editor for an operator type.

  • otexpand

    Splits an operator type library into component files.

  • otgetotl

    Determines whether/where an operator type is defined.

  • otglob

    Lists operator types matching a pattern.

  • otinuse

    Helps determine what Operator Type Libraries are in a given Hip file.

  • otload

    Loads an operator type library into the current session.

  • otls

    Lists operator types defined in a library file.

  • otmerge

    Copies all operator type definitions from one library file to another.

  • otprefer

    Get/set which type definition to use when multiple implementations are available.

  • otrefresh

    Reloads an operator type library from disk.

  • otrenamesource

    Gives a descriptive name to a library source.

  • otsync

    Syncs the contents of nodes with the contents of their type definitions.

  • ottouch

    Sets the last modified time for an operator type definition.

  • otunload

    Unloads an operator type library.

  • otunsync

    Built in alias for otsync -u.

  • otversion

    Gets/sets the version of an operator type definition.

  • otwrite

    Saves an operator type into an operator type library file.

  • pane

    Creates, closes, or sets options on a pane.

  • panepath

    Sets the current node of all panes in a desk.

  • parmeditor

    Sets various options of a parameter editor.

  • parmlist

    Sets various options of the parameter list within a channel list gadget.

  • parmsheet

    Sets various options of the parameter spreadsheet.

  • pathmap

    Interface to modify or test the HOUDINI_PATHMAP variable.

  • perfmon

    Enable output from the performance monitor.

  • performance

    Set various options of the performance monitor.

  • pilist

    Sets various options of a handle list.

  • play

    Controls playback.

  • pomadd

    Creates a new persistent handle or group.

  • pomattach

    Attaches an operator to a handle, or a handle to a group.

  • pomclear

    Detaches all operators from a persistent handle, or clears a group.

  • pomdetach

    Detaches an operator from a persistent handle, or a handle from a group.

  • pomls

    Lists persistent handles or handle groups.

  • pomparm

    Changes settings of a handle.

  • pomremove

    Delete a persistent handle or handle group.

  • pomrename

    Renames a persistent handle or handle group.

  • pomscript

    Prints the commands to create a persistent handle or group.

  • pomset

    Sets the display flags of a persistent handle or group.

  • preference

    Gets/sets the general preference option values.

  • prependseq

    Inserts files before the current sequence.

  • prompt

    Change the textport prompt string.

  • propertyedit

    Built-in alias for otedit

  • python

    Execute Python statements.

  • pythonpanel

    Performs actions related to the Python panel pane.

  • quit

    Exits Houdini.

  • radial

    Controls radial settings.

  • read

    Reads a line on user input into one or more variables.

  • render

    Cause an output driver (ROP node) to render.

  • rexport

    Edits exprot variables for a network render.

  • rkill

    Stop or pause/unpause a render.

  • ropview

    Sets various options of an Outputs viewer pane.

  • rps

    Lists background render processes.

  • seqls

    Lists the sequences currently loaded in Mplay.

  • set

    Sets a local variable.

  • setcomp

    Set the color components to display.

  • setenv

    Sets a global variable.

  • setplane

    Sets the current plane.

  • shelfdock

    Adds shelves to and removes shelves from the shelf area (dock).

  • shift

    Shifts the contents of the command line argument variables.

  • shopconvert

    Converts RenderMan shaders to native.

  • shoppromote

    Automatically promotes all parameters from a material’s contained shaders onto the material.

  • shopthumb

    Generates a thumbnail image (shader ball) for a material.

  • shopvisible

    Show or hide shaders based on the renderer.

  • sopcache

    Manipulates the internal surface node cache.

  • sopcreateedit

    Create an Edit SOP from the differences between two SOPs.

  • source

    Executes the script commands in a file.

  • stampdirty

    Dirty nodes dependent on a stamping variable..

  • system

    Starts a host system command.

  • takeadd

    Creates a new take.

  • takeautomode

    Sets the take auto-include mode.

  • takeinclude

    Includes parameters in or removes parameters from the current take.

  • takelist

    Sets various options of the take list pane.

  • takeload

    Loads take information from a file saved with the takesave command.

  • takels

    Prints the names of existing takes.

  • takemerge

    Merges included parameters from one or more source takes into a destination take.

  • takemove

    Moves a take under a new parent.

  • takename

    Rename a take, set the label of a take, or change the default basename for new takes.

  • takerm

    Removes one or more takes.

  • takesave

    Saves take information to a file, or prints it to the textport.

  • takescript

    Prints the commands necessary to recreate a take.

  • takeset

    Switches to a different take.

  • tcur

    Gets or sets the current time.

  • test_access

    On Windows, tests the permission of a file path.

  • texcache

    Manipulates the internal texture cache.

  • time

    Print the time taken to execute a command.

  • timeslice

    Sets timeslice options for timesliced channel operators.

  • tmgadd

    Creates time groups.

  • tmgls

    Lists time groups.

  • tmgname

    Renames a time group.

  • tmgop

    Set, add to, or delete the contents of a time group.

  • tmgrm

    Deletes a time group.

  • tmgshift

    Shift a time group by a length of time or number of frames.

  • toolbar

    Creates, edits, or removes a toolbar.

  • treechooser

    Presents a graphical interface to the user to choose from a list of options.

  • treecontrol

    Sets various options of the tree contrl.

  • tset

    Gets/sets the global animation range.

  • ucd

    Change the UNIX working directory.

  • uls

    Returns a list of files and directories in the UNIX working directory. This command is non-recursive.

  • umkdir

    Creates a new directory, dir_name, in the file system.

  • undoctrl

    Turns undo on or off, or clears undo memory.

  • unitlength

    Controls the Houdini Unit Length option.

  • unitmass

    Controls the Houdini Unit Mass option.

  • unix

    Starts a host system command.

  • updateui

    Waits for Houdini’s UI to update.

  • upwd

    Prints the Unix working directory.

  • urm

    Unlinks file_name, in the file system. This method cannot unlink directories.

  • varchange

    Cooks any operators using changed variables.

  • version

    Prints the application’s version.

  • vexinfo

    Lists the currenly loaded VEX functions.

  • vexprofile

    Turns profiling of VEX functions on/off

  • viewagentopts

    Set various crowd agent display options for a viewport.

  • viewbackground

    Sets general options for the viewport background.

  • viewcamera

    Make a viewport look through a camera.

  • viewcolor

    Set the color override attribute in a particular viewport.

  • viewcopy

    Copies settings from one viewport or view-memory to another.

  • viewdisplay

    Set various options of a viewport or view-memory.

  • viewdispopts

    Set various options of a viewport.

  • viewdispset

    Set various options of a viewport. Replaces viewdisplay.

  • vieweffect

    Controls viewport settings.

  • viewergrouplist

    Set group list options of viewer panes.

  • viewerinspect

    Gets/sets inspection options for a viewer.

  • vieweroption

    Sets various options for viewer panes.

  • viewerstow

    Stows or unstows components of a viewer.

  • viewhome

    This command allows you to home the named viewports.

  • viewinfotext

    Set info text options for a viewport.

  • viewlayout

    Rearranges viewports in a viewer pane.

  • viewlight

    Controls viewport settings.

  • viewls

    Lists all viewer panes.

  • viewmaskoverlay

    Sets various options of the view mask overlay in viewports.

  • viewname

    Renames a viewport

  • viewonionskin

    Set various onion skinning display options for a viewport.

  • viewoptadd

    Adds display options to all viewers.

  • viewoptenable

    Enable/disable user options in a particular viewport.

  • viewoptls

    Lists options available in viewers.

  • viewoptname

    Renames a display option.

  • viewoptrm

    Removes display options from all viewers.

  • viewoptset

    Gets/sets the settings for a particular display option. These settings are shared by all viewers.

  • vieworthogrid

    Controls display of the grid in an orthographic viewport.

  • viewprojection

    Sets the projection method of a perspective viewport.

  • viewrefplane

    Changes reference plane parameters.

  • viewroto

    Sets image and position options for the viewport background.

  • viewsnapshot

    Manages the view snapshot memory.

  • viewsnapshotoption

    Sets the options for the view snapshot memory.

  • viewtool

    Sets the current tool in a scene viewer (or lists available tools).

  • viewtransform

    Gets/sets projection data for a viewport.

  • viewtype

    Changes the type of a viewport.

  • viewupdate

    Controls the updating of views.

  • viewuvgrid

    Sets various options of the grid in UV texture viewports.

  • viewwrite

    Creates a flipbook from a viewport.

  • vopforcecompile

    Forces a VOP Network to compile its code.

  • vopwritevfl

    Writes code generated from a VOP network to a file.

  • while

    Loops through a block of commands while a condition is true.