User Controls

User Controls in a plugin take the form of a global variable that can be modified by the end user. They're all exported from the plugin via ControllableParameters() which returns an array of setting objects as shown below.

Javascript
Copy

These setting objects always have a few base parameters. These are valid for all plugin User Controls.

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
typeThe type of control. Currently, the following options are valid: boolean, number, hue, color, combobox, and textfieldString
defaultThe default value for the control.Varies

Number Slider

The number control allows the user to select the value of a number using a slider.

Javascript
Copy

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"number"String
defaultThe default value for the control.String, Int
minThe minimum selectable value for the slider. This attribute supports negative values.String, Int
maxThe maximum selectable value for the slider.String, Int
stepThe step value the slider will increment and decrement byString, Int

Boolean Switch

The boolean control allows the user to select the value of a boolean variable using a toggle control.

Javascript
Copy

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"boolean"String
defaultThe default value for the toggle. Set this to 1 to make "on" the default state.String, Int

Hue Slider

The hue picker control allows the user to select the hue component of a color with a slider control

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"hue"String, Int
defaultThe default value for the hue slider.String
minThe minimum selectable hue value. This value must be between 0 and 359.String, Int
maxThe maximum selectable hue value. This value must be between 1 and 360.String, Int

Color Picker

The color control allows the user to select a color using a hue wheel, saturation slider, and luminance slider. The wrench icon will open a more advanced color palette for selection.

Javascript
Copy

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"color"String
defaultThe default value for the color picker. This must be specified as a hex value in the form #RRGGBBString
minThe minimum selectable hue value. This value must be between 0 and 359.Int
maxThe maximum selectable hue value. This value must be between 1 and 360.Int

Combo Box

The combo box control allows the user to select from a dropdown menu of preset values.

Javascript
Copy

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"combobox"String
defaultThe default value for the combo box. This value must be in the values arrayString, Int
valuesAn array of values for the dropdown menu. Valid types are strings and integers.[String, Int]

Text Field

The text field control allows the user to freely enter text with an optional RegEx filter.

Javascript
Copy

This control supports the following attributes:

ParameterValueType
propertyThe name of the variable you wish to assign to the control.String
labelThe label to display to the user.String
type"textfield"String
defaultThe default value for the textfield.String, Int
filteran optional RegEx filter to limit user inputRegEx String
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard