Digital assets Create a user interface for an asset

Introduction

To build a user interface for an asset, you can take controls from nodes inside the asset and put them on the asset.

To begin promoting controls, open the type properties for the asset and click the Parameters tab (see the help for the Parameters tab for more information).

Tip

As you edit type properties, keep a parameter editor open showing an instance of the digital asset. Then you can click Apply in the type properties window and see the changes appear in the parameter editor.

Creating and promoting parameters

To... Do this

Promote a parameter

  • Drag the parameter from a parameter editor into the parameter list of the type properties window.

  • Press on a parameter and choose Export Parameter to Type Properties.

  • Alt + click a parameter.

Promote all parameters of a node

  • Drag the node into the parameter list of the type properties window.

    If you drag a nested digital asset into the list, Houdini will promote the parameters from the nested asset with their organization intact.

Promote hidden or un-draggable parameters

  1. Click the + icon at the top of the parameter list in the type properties window to open a tree view of all parameters in the scene.

  2. Drag parameters from the tree view into the parameter list.

Create a new parameter from scratch

  1. Open the Create New pop-up menu at the top of the parameter list in the type properties window.

  2. Choose the type of parameter to create.

Organize parameters into tabs

  • Open the Create New pop-up menu at the top of the parameter list and choose Folder to create a folder. Drag parameters into the folder to organize them.

    Folders of parameters will appear as tabs in the node’s parameter editor interface.

  • Open the Create New pop-up menu at the top of the parameter list and choose Divider to create divider between parameters. Use this to break up groups of parameters within the same tab.

Make a parameter auto-scope in the channel list

  1. Select the parameter in the list on the left.

  2. In the options on the right, turn on the Auto scope checkbox.

    Make parameters as “Auto scope” that you usually want to animate. When you select the asset, the auto-scope parameters become scoped in the channel list along with any parameters that already have keys. See auto scope parameters .

Make a menu parameter

  1. In the Menu subtab of the Parameters, turn on Use menu.

  2. Choose the menu type from the pop-up menu next to Use menu.

  3. Each menu item consists of a token (what the parameter gets set to when you choose the menu item) and a label (the human-readable name for the menu item that shows up in the interface).

    To enter a list of static tokens and labels, choose Menu items. To write a script that generates a space-separated list of tokens and labels dynamically, choose Menu script.

  4. See the help for the Menu subtab for more information.

Put consecutive parameters side-by-side to save space

  1. Select the first parameter and turn on Horizontally join to next parameter.

  2. If you want to hide the label on a “side” parameter, turn off the checkbox next to the Label option for that parameter.

Run a script whenever a parameter changes

  • Use the Callback script option to enter a script that Houdini runs whenever the parameter changes. See the help for the Parameters tab for more information.

    You can also create a menu whose contents are created by a script. See the help for the Menu subtab for more information.

Remove a parameter

  • Click the red X to the right of a parameter name in the parameter list to remove it.

Tip

For parameters with multiple components (such as an X,Y,Z position parameter or an R,G,B color parameter), you can promote all components by dragging the parameter label, or a single component by dragging the component’s text box.

Promoting manipulators up to the asset

To give a digital asset an interactive interface, you can set up manipulators (such as manipulators handles) or HUD sliders. You can quickly set up a custom manipulator by promoting an existing manipulator on a node inside the asset as a starting point.

To begin promoting controls, open the type properties window for the asset, then use the procedures below.

To... Do this

Promote transform manipulators

  1. Select an object with the Pose tool (this does not work with the Transform tool).

  2. Press on a handle and choose Export Handle to Type Properties.

    This will promote all the associated parameters to the Type Properties' parameter list and the xform handle to the Type Properties' handle list.

Promote HUD sliders

  1. Press on a slider and choose Export Handle to Type Properties.

    The key advantage of promoting a HUD slider this way is that the handle parameters set prior to promotion will become part of the HUD slider’s definition in the Type Properties window.

  2. Make the slider inside the asset non-persistent so you don’t have two copies of the slider visible.

Promote all persistent handles

  1. Press in the viewer and choose Export All Handles to Type Properties.

  2. Make the handles/sliders inside the asset non-persistent so you don’t have two copies of all handles visible.

HUD slider setup properties

Below is a list of some of the properties used to define the position and look of a HUD slider. You can type these in yourself in the handle’s Default field in the type properties window, but it’s much easier to set up the slider the way you want it before promoting it.

hudx(105) hudy(130)

The HUD slider’s position in the viewer pane.

hudw(120) hudh(16)

The HUD slider’s size.

hudnameside(3) hudvalueside(2)

Control where the labels are positioned.

hudharbourname('name') hudharbourx(105) hudharboury(130)

Put your HUD slider in a group that will dock with other HUD sliders in the same group that are positioned correctly.

hudlocklow(1) hudlockhigh(1)

The high and low limits on the value.

hudrangehigh(10) hudrangelow(1)

The slider’s range.

ownerop('geo/tube1')

The original owner of the parameter being controlled.