The type properties window lets you set up the options and parameters of a digital asset (see how to create a digital asset ). As you develop an asset, you will use the controls in this window a great deal, mostly as you refine the interface using the Parameters tab.
| To... | Do this |
|---|---|
| Open the type properties window |
|
| Import/promote parameters from another node onto this node’s UI | See importing parameters below. |
| Save changes to the asset definition |
|
| Discard any changes since the last apply |
|
Note
This window must be open to accept or apply any changes you have made to an asset. Even if you add an operator or make a new network connection, you must open up the Operator Type Properties panel and click Accept or Apply to update the asset’s definition.
How to import parameters from another node
You can build the UI of your asset by promoting parameters from nodes inside the asset’s network.
| To... | Do this |
|---|---|
| Promote individual or small groups of parameters |
|
| To promote all the entire contents of a tab (folder) on another node |
Basic tab
Note
The Name, Label, Min inputs, Max inputs, and Install library to controls are the same as in the create digital asset dialog used to create the digital asset.
| Icon | Internal name, file path, or URL of the icon to use for the shelf item.
Click the chooser button at the right end of the field to choose a file.
Note that you can choose a file contained in a digital asset (click
If you don’t supply an absolute path or URL, Houdini will look for the
icon using the path in the You can use any an SVG file or any image format Houdini supports (such
as PNG or Houdini ships with a number of stock SVG icons. You can see bitmap representations of these icons in
| ||||||||||||||
| Representative Node | For object assets, this lets you choose a node from inside the asset that represents the general type of node you want the asset to be. For example, if you are making a camera asset, choose a camera node inside your asset to indicate that the asset acts like a camera. Similarly, if you are making a light asset, choose a light node. Houdini may use this information to filter and categorize your asset in the interface, such as in the link editor. | ||||||||||||||
| Editable Nodes | Nodes in this field can be edited even if the digital asset is locked. You can drag and drop a node into this field; however, if you want to add more than one, you must type them in and separate them by spaces or commas. | ||||||||||||||
| Message Nodes | Any messages or warnings posted on these nodes will be propagated to the top level node. | ||||||||||||||
| Shader Name | (SHOPs only) The name of the shader. | ||||||||||||||
| Render Mask | (SHOPs only) A list of render types supported by this shader. | ||||||||||||||
| VopNet Mask | (VOPs only) A list of VOP network types supported by this VOP. Leave this field empty if the operator supports all network types. | ||||||||||||||
| Parameter Options |
| ||||||||||||||
| Save Information from Node |
|
Parameters tab
To promote parameters from inside the asset up to the asset’s UI, drag the parameter into the list on the left. Drag a node from the network editor to add all its parameters.
To create a new parameter from scratch, choose a parameter type from the menu above the list on the left.
To organize the parameters into tabs, use the menu above the list on the left to create “folders”.
Drag and drop parameters into the folders to reorder them and organize them inside folders.
Parameter Description: folders
| Folder type | Controls how the folder contents are presented in the asset’s parameter editor interface for parameter folders. The default is to show the folder as a tab. The Import block setting displays the contents “inline.” This is useful when you want to import a folder from a sub-node (see Import settings below) but don’t want the imported contents to appear in their own tab. |
| Name | Internal name of the folder which cannot contain spaces. |
| Label | Readable label for the folder, displayed in the interface. This name can contain spaces. |
| Default | Default values for multi-parms. |
| Available for import | This is useful when you are importing the node’s parameters but you want this folder to not be imported. |
| Invisible | This folder and its contents are not visible in the parameter interface, they are only available for scripting. |
| End tab group | Consecutive folders of type Tabs are turned into a set of tabs. If you want to separate a set of consecutive tab folders into two or more sets of tabs, turn this option on for the last tab of a set of tabs. The next folder of type Tabs will start a new set of tabs. |
| Import settings | Turn this on have this folder import its contents from a folder on a node inside this asset. Note You still need to open the operator type properties window’s |
| Source | The source to import from. The source can be either a
sub-node, specified using |
| Token | The entity to import from the source. You can import either a group of folders, a single folder, an import block, or all the parameters from the source. To import a group of folders, use the Name of that set of
folders. To import a single folder, use the Name of the
folder, followed by a colon ( You can obtain the name of a folder by selecting the sub-node
and choosing Edit Parameter Interface from the
|
| Mask | Only import parameters matching this mask. Note that excluding a multiparm will not automatically exclude any existing instances. However, including a multiparm will exclude these individual instances as they are represented by templates of the multiparm. |
Parameter Description: ramps
| Name | The internal name of the parameter. You will use this name to refer to the parameter’s value in expressions. It must be unique within this operator type. This name cannot contain spaces or slashes. | ||||||
| Label | A readable label for the parameter. This name can contain spaces. | ||||||
| Ramp Type | The data type this ramp parameter contains. This can either be RGB for colors, or Float for scalar values. | ||||||
| Default Points | The initial number of ramp points when this paramter is created. | ||||||
| Def Interpolation | The default interpolation type for ramp points. | ||||||
| First Instance | Specifies the starting number associated with the first ramp point. This only affects scripting, which refers to the internal names of the ramp point parameters. | ||||||
| Disable when | Specifies rules for when to disable the ramp parameter. See disable when. | ||||||
| Show Parm In | The dialogs in which the parameter will appear.
| ||||||
| Show Controls By Default | If enabled, the ramp controls panel will be open by default in Parameter dialogs. | ||||||
| Available for import | Whether this parameter is imported by import folders on a parent asset. See about importing folders from a sub-node above. | ||||||
| VEX Ramp Variables | Specifies the VEX variable names when used in a shader for the basis, keys, and values parameters. |
Parameter Description: Parameter subtab
| Name | The internal name of the parameter. You will use this name to refer to the parameter’s value in expressions. It must be unique within this operator type. This name cannot contain spaces or slashes. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Label | A readable label for the parameter. This name can contain spaces. Turn off the associated checkbox to hide the label. This is especially useful when you lay out parameters side-by-side using the Horizontally join to next parameter option. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Type | The data type this parameter contains.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Op filter | When Type is Operator path or Operator list, this option lets you restrict the types of nodes shown in the picker UI. For example, if this parameter should contain a surface shader, set Op filter to SHOP: Surface only. This makes it easier for users to pick surface shader by filtering out other node types from the picker. | ||||||||||||||||||||||||||||||||||||||||||||||||
| RMan type | For RenderMan Shader assets, this lets you set the RenderMan datatype to use for this parameter in the output. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Browse Mode |
Houdini’s file chooser only recognizes the Read and Write mode and is used for opening files for all three options. The OS X only recognizes the Read Only and Write Only modes, and fakes the Read and Write mode (needed by Data File DOP, for example) by using Write Only mode. In this mode you cannot create a new file; however, using Write Only mode is still better than Read Only, since Read Only mode presents existing files as not selectable. On Linux and Windows, you are limited to Houdini’s browser. Note The environment variable | ||||||||||||||||||||||||||||||||||||||||||||||||
| Size | When Type is Integer, Float, or Angle, sets the number of components in the parameter (1 to 4). | ||||||||||||||||||||||||||||||||||||||||||||||||
| Defaults | The default value for the parameter. If Size is greater than 1, you can specify defaults for each component. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Invisible | Do not show this parameter in the asset’s user interface. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Horizontally join to next parameter | If you have two short, related parameters stacked in the interface, you can turn this option on to lay out the options side-by-side to save space and clarify their relationship. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Range | For numeric datatypes, specifies the range for the slider in the interface. Click the lock icons to lock/unlock the low and high limits. When a limit is unlocked, the slider uses the limit, but the user can enter values beyond the limit using the text entry box. When a limit is locked, the slider uses the limit, and Houdini prevents the user from entering values beyond the limit. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Callback script | HScript or Python script to run when this parameter is changed by a UI event (or when the button is clicked, if Type is Button). If your script is written in Hscript, the name of the changed parameter is
available in If your script is written in Python, the same variables are accessible via
a dictionary variable named For example, this Hscript callback command would open a small window showing the path to the operator and the name of the parameter plus the new value: message `oppwf()`/$script_parm = $script_value0 Often, you will call a script stored as a section (an embedded file) in a digital asset. For an object type named asset_name, you can run the script in the section named section_name using the following command as the callback:
See how to access the contents of an asset and the source command. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Script language | The scripting language to use to interpret the Callback script. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Suppress Quotes in VOP Code Blocks | Whether this parameter should be expanded without quotes within VOP code blocks. A common use is to allow strings from menus to be placed verbatim in a code block. Only available for string parameters in a VOP definition. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Available for import | Whether this parameter is imported by import folders on a parent asset. See about importing folders from a sub-node above. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Show parm in | The dialogs in which the parameter will appear.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Disable when | Specifies conditions where the parameter is disabled. The syntax of the conditions is...
{ parm_name operator value ...} ...
That is, one or more sets of comparisons inside curly braces. Inside the curly braces are one or more comparisons between a parameter and a value, where the operator is one of:
If all of the conditions are true inside any of the curly brace lists, the parameter is disabled. For example:
{ type == 1 count > 10 } { tolerance < 0.1 }
The parameter will be disabled if...
You can omit the operator, in which case it’s assumed to be
{ type 1 } { type 2 }
...will disable the parameter if You cannot use expressions in the disable when rules. The best you can do is to create an invisible parameter containing the expression you need, and reference it in the disable when rules. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Help | Help string for the parameter. This is displayed in the tool tip when the user hovers over this parameter in the parameter editor. |
Parameter Description: Channels subtab
This subtab lists the parameter’s channels (that is, the
animatable components of the parameter). For example, the
Translate parameter of an object (internal name t) has
three animatable components (representing X, Y, and Z).
For numeric components, you can turn on
auto-scope. Then this option is enabled for a component, that
component is automatically scoped (displayed in
the channel editor) when the parent node
is selected. Turn this option on for all commonly animated values
to make them easier to work with in the
channel list.
If you imported or promoted parameters from another node (by dragging
them into the type properties window from a parameter editor, or by
using the Create parameters From Nodes subtab), the right
hand column shows which channel each channel is linked to on the
other node. When the
Enable linking button is on,
the channel gets its value from the linked channel.
Parameter Description: Import subtab
Placeholder for information about where imported parameters came from. See information about importing folders from a sub-node above.
You should only turn on Save import information if you have some reason for wanting to save the import source of a parameter not in an imported folder.
Help tab
The contents of the text field appear in the help browser when the user clicks the help button for a node of this operator type in the parameter editor.
This help can be HTML, or you can use a simple but powerful wiki format to create documentation that looks like the native Houdini help. See how to write wiki-format help.
Handles tab
The controls on this tab let you create a user interface for the operator by creating manipulators whose handles are bound to parameters inside the asset. These handles become available in the Viewer pane when the asset is selected using the Pose or object tools.
The controls in this pane are the same as for the Persistent manipulator editor.
Code tab
This tab lets you create and edit code used to implement Python surface nodes, VEX shaders, VOP operators, and other code-based operators.
Scripts tab
This tab lets you store scripts that are triggered by asset events (such as when an instance of the asset is created or deleted), as well as arbitrary scripts and Python modules needed by the asset. The interface is very similar to the Extra files tab, but includes a pop-up menu for specifying event scripts.
Note
Do not create a script (on the Scripts tab) and an extra file (on the Extra files tab) with the same name. The two tabs share a single namespace, and unpredictable behavior may result.
Adding and loading scripts
| To... | Do this |
|---|---|
| Start a new event script |
|
| Load an existing file as an event script |
A copy of the file is saved into the digital asset. If you change the file on disk, it will not affect the version in the asset. You will have to reload the file into the Scripts tab. |
| Add a python module | The
|
| Add a custom script |
|
See how to reference embedded files for information on how to refer to the embedded scripts wherever Houdini expects a filename.
Writing event scripts
In Python, the script has a
kwargsvariable containing a dictionary of named arguments. To see the contents of the dictionary, you can use the following:hou.ui.displayMessage(repr(kwargs))
In HScript, the “On created”, “On loaded”, “On updated”, “On deleted”, “On input changed”, and “On name changed” event scripts are called with two arguments.
$arg0Contains an
opdef:style asset file specification for the event: the operator class name and operator type name separated by a slash (/) followed by a question mark (?) and the name of the event type, for example:opdef:/Object/my_asset?OnCreated$arg1The full path of the node instance that triggered the event. For example:
/obj/my_asset1You can check the contents of these arguments when you're debugging your scripts using the message command, which just pops up a message window:
message $arg0For the “Before first create” and “After last delete” events, the first argument is the same, but the second argument
$arg1returns the operator class name and the operator type name separated by a slash (/), for exampleObject/my_asset.
The following events can trigger scripts:
| Before first create | Runs when the first instance of this operator type is created in a hip file. Runs before the node is created, and runs even if the operator is created while loading a hip file. To determine if Houdini is in the process of loading a hip file, use the opisloading expression function. You can use this script to set up the external environment for your asset, such as copying texture maps to a required location or setting environment variables. The user cannot “undo” the actions performed in this script. Use the After Last Delete script to undo any actions performed by this script. |
| On created | Runs after a new instance of this operator is created. Runs after the creation script and after the default parameter values are set. This script does not run when loading a hip file, only when the user creates a new node interactively. |
| On Loaded | Runs after the node is loaded. |
| On Updated | Runs when the definition for this operator is updated. Runs once for each instance of the operator in the hip file. |
| On deleted | Runs immediately before Houdini deletes a node of this type. Runs before the node’s individual delete script. To determine if Houdini is in the process of quitting a hip file, use the opisquitting expression function. |
| After last delete | Runs after the last node of this type is deleted from the hip file. You can use this script to clean up any actions performed in the “Before First Create” event script. The user cannot “undo” actions performed in this script. To determine if Houdini is in the process of quitting a hip file, use the opisquitting expression function. |
| On input changed | Runs after an input connection to a node of this type is changed. Houdini calls this script with the full path and class/type arguments described above, plus a third argument containing the index of the input connection that changed. |
| On name changed | Runs after the name of a node of this type is changed. In addition to the full path and class/type arguments described above, this script is called with a third argument containing the old name of the node. |
“Created” is when a new instance is created using opadd or by putting down a node in a network editor. It is run right after the creation script, but was made a separate script because the creation script often contains the node contents, and is modified by the Type Properties dialog, and so should not be edited directly by the user. Also of note is that the Created script is not run if you do “opadd -n” (which also stops the running of the creation script).
“Loaded” is when the node is loaded from a hip file. This includes copy/pasting nodes or networks but not when loading the node as part of the contents of another HDA. Because of the locking of nodes inside an HDA, the functionality of Loaded scripts for nodes inside a locked HDA should be made part of the Loaded script for the HDA itself. This script is run for each node after the whole hip file is loaded.
When the Loaded script is run, the Created script will not be run, and vice versa.
Tools
This tab lets you create a shelf tool associated with this asset. When the asset is loaded, the tools you define on this tab will be available for the user to add to the shelf, and will show up in the viewer tab menu.
Note
Any tools you define on this tab will not automatically show up on the shelf whenever the asset is available. The user has to add the tools to the shelf, by right-clicking the shelf and choosing Edit shelf, then choosing the tools from a list of all available tools.
When you create an asset, Houdini automatically adds a tool to this tab, that invokes a generic script to create an instance of the asset. You can edit the script of this tool, or add additional shelf tools to provide alternate ways of instantiating the asset. Click Create new and choose Tool to start a new tool.
Selectors tab
This tab lets you set up the selection prompts shown to the user when creating the digital asset (or when the Reselect geometry button is pressed).
Changes to the selector bindings will affect all existing and future versions of this operator type. Selectors can be added, deleted or re-ordered using the list displayed on the left hand side. When a selector is selected from the list, it’s bindings and properties can be edited using the controls on the right.
The Type field is not editable and reflects the basic type of the selector. The Name field is the english name which should uniquely define this selector with respect to the operator type. The Prompt field displays the string during the selection process. The Multi-selection checkbox indicates whether or not multiple object selections are allowed for the current selector. The editable text field allows for a user-defined script to be executed when object selections are binded. The input objects are accessed by the variables $argc, and $arg0, $arg1,..., $arg($argc-1), where $argc is the number of inputs and the remaining variables represent each of the input objects.
Note
There is no variable which holds a path to your current node; however, you can retrieve the current node using the pwd hscript command.
For example, you can wire in the first selected input into your current node by doing the following:
set curNode = `run("pwd")`
opwire -n $arg0 -1 $curNode
Input/Output tab
In this tab, you can give the operator inputs and outputs user
friendly labels. The label appears when you press
on an
input.
The first table describes all inputs to the VOP. The second table describes the outputs.
To add a new input or output connection, select the data type of the new connection from the New Input or New Output menu. You can edit the name, label, or data type of an existing input or output by changing the value directly in the table. Simply click on the value you would like to change. You can also reorder or delete inputs and outputs using the buttons found down the left edge of each table.
Usually it is a good idea to provide a parameter (see the Parameters tab) with the same name as each input. When you do this, if that input does not get connected, the VEX Builder will automatically use the value of the parameter with the same name in place of the input value.
When a VOP operator appears in a VOP network, the VEX Builder will only include the code generated by that operator if it determines that its code is required. Generally, this is true for subnet type VOPs, the Output VOP, and any VOP that is connected, directly or indirectly, to the input of a VOP that has required code. However, you can force the VEX Builder to generate the code for your VOP by turning on the Force Code Generation toggle.
VOP operators are also allowed to have a variety of signatures. A signature provides an alternate set of data types for each input and output. By default, a new VOP operator has only one signature. To create a new signature, press the New Signature button. The new signature will be created with a default name and description, and with the same data types for all inputs and outputs as the previous signature. The description of the signature appears in the Signature menu in the VOP’s parameter dialog. The signature name is used to determine which VOP parameter to use as the default value if the input is not connected. To provide a default parameter to use for a particular signature, create a parameter with the same name as the input, followed by an underscore, then the name of the signature.
For example, suppose you have two inputs, color and multiplier, which have the data types vector4 and float. You would create two parameters, also called color and multiplier. The first would be a Color parameter, and the second a single float parameter. Now you want to allow multiplier to also be a vector4. Create a new signature, and name it v4. Change the data type of multiplier for that signature to vector4. The create a new parameter named multiplier_v4, which is 4 floats. Now when one of these operator is created, and the signature is set to v4, the VEX Builder will use the color and multiplier_v4 parameters to provide the default values.
| Procedural Shader | Indicates whether the VOP is implemented by a DSO or DLL file instead of code generated by the VEX Builder. |
Extra Files tab (advanced)
| To... | Do this |
|---|---|
| Add a new file to the definition |
|
| Edit the contents of a text file |
|
| Edit the contents of a binary file |
|
| Delete a file |
|
Tip
Any sections you've modified (either by changing them in the editor, or because they're newly added) will have an asterisk in the section list.
Predefined variables in callback scripts
In embedded scripts you want to use as parameter
callbacks , the name of the changed
parameter is available in $script_parm, and the value is in
$script_value. If the parameter has multiple components, you
can access them as $script_value0, $script_value1, and so
on.
See the description of the Callback field on the operator type properties window Parameters tab for more information.
Accessing embedded files
Once you have embedded files into the operator type definition, you can access these embedded files from many places within Houdini. Geometry or channel files can be accessed from File SOPs or File CHOPs. Image files can be used as texture map files specified in VEX SHOPs. Script files can be accessed from the textport or parameter callbacks using the source command.
To access one of these embedded files, wherever a file name is called for, use the following:
opdef:/Network_type/asset_name?section
For example:
opdef:/Shop/v_clay?DialogScript
To refer to the current operator, use
opdef:.?section
The opdef syntax always accesses the currently used definition
for an operator.
You can also access an embedded file from another asset in the same library (.otl file). To do so use:
oplib:/Network_type/asset_name?Network_type2/asset_name2?section
The second operator type should exist in the same library that provides the active definition for the first operator type.