Widget Types

Depending on the user parameter defined in a shader's Args File, different Widget Types are available to choose from. The main user parameters are the Number, String, and color parameters. The widget types available for a Number shader parameter are shown below.

The widget types for a String shader parameter are shown below.

The widget types and widget hint values for the different user parameters are shown in the table below:

Widget Type

Widget Hint Values

Description and Example

Number, String, Button, Toolbar, TeleParameter, and Node Drop Proxy

Boolean boolean

Displays two values or options, such as true or false.

<param name="opacity" widget="boolean"/>

Popup popup

Displays entries specified in the Widget Options in a dropdown menu.

<param name="opacity" widget="popup">

<hintlist name="options">

     <string value="1.0"/>

 <string value="1.5"/>

 <string value="2.0"/>

</hintlist>

</param>

Mapping Popup Menu

mapper

Similar to Popup Menu, but with the option to map values. See Widget Options for more information.

<param name="opacity" widget="mapper">

<hintdict name="options">

    <float value="0.0" name="A"/>

     <float value="0.5" name="B"/>

    <float value="1.0" name="C"/>

</hintdict>

</param>

Check Box

checkBox

Similar to Boolean, but displayed as a checkbox.

<param name="opacity"

widget="checkBox"/>

String, Button, Toolbar, TeleParameter, and Node Drop Proxy

Scene Graph Location

scenegraphLocation

Widget for specifying locations in the Scene Graph tab, for example, /root/world/geo/pony1

<param name="loc"

widget="scenegraphLocation"/>

CEL Statement

cel

Specify a CEL Statement. For more information, see Collections and CEL.

<param name="loc" widget="cel"/>

Resolution

resolution

A resolution, for example: 1024x768.

<param name="loc"

widget="resolution"/>

Asset

assetIdInput

Widget to represent an asset. The fields that are displayed in the UI and the browser that is used for selection can be customized using the Asset Management System API.

<param name="EnvMap"

widget="assetIdInput"/>

File Path

fileInput

String parameter representing a file on disk. Uses the standard Katana file browser for selection.

<param name="texname"

widget="fileInput"/>

Script Button

scriptButton

A button executing a Python script when clicked.

<param scriptText="print 'Hello'"

name="btn"

buttonText="Run Script"

widget="scriptButton"/>

TeleParameter teleparam

Creates a parameter that 'teleports' parameters from another source (node, SuperTool, or similar).

<param name="EnvMap"

widget="teleparam"/>

Script Editor scriptEditor

A field for entering a script as the parameter.

<param name="EnvMap"

widget="scriptEditor"/>

Dynamic Array

dynamicArray

A number or string array of dynamic size. Not available through the UI wrench menu.

<numberarray_parameter hints="
{';widget': '

dynamicArray'}" name="testNumArray" size="3"

tupleSize="1">

<number_parameter name="i0"

value="0"/>

<number_parameter name="i1"

value="0"/>

<number_parameter name="i2"

value="0"/>

</numberarray_parameter>

Multi-line Text text

Enables a string field to support multiple lines of text. For example, you can set KatanaBlinn.args with the following line:

<param name="BumpMap" widget="text"/>

to set BumpMap to take multiple lines of text and display the expected UI.

String Only
Attribute Name attributeName

String parameter value which is the full name of an attribute, with names of ancestor group attributes separated by dots:

xform.translate

Attribute Type attributeType String parameter value which is the name of the attribute's type:

float

Group Only

Multi multi Creates a group set of parameters within a group.

Number Array Only

Color color

Creates a color widget that allows you to set the RGB, HSL, and HSV values.

String Array Only

Scene Graph Locations scenegraphLocationArray Creates three Scene Graph Locations widgets that allow you to set locations.

Note:  See Help > Developer Guide for more on setting hint strings on User Parameters.

Note:  See also Adding User Parameters.