Settings

Global Functions

getName

var name = testSetting.getName()

Returns the name of the setting as a String

addParent

var showColors = script.booleanSetting("Show Colors", false)

var color1 = script.colorSetting("Color1", color({red: 255, green: 90, blue: 0}))
var color2 = script.colorSetting("Color2", color({red: 30, green: 190, blue: 90}))

color1.addParent(showColors, function (setting) {
    return setting.isEnabled()
})

color2.addParent(showColors, function (setting) {
    return setting.isEnabled()
})

Allows you to add a condition for the setting to show in the clickgui

Number Setting

var testSetting = script.numberSetting(name, defaultValue, min, max, increment)

script.numberSetting(... will return a number setting that allows for the following functions:

The getValue() function returns a Double. The Double object allows for all sorts of different data types pertaining to numbers. You will be able to do the following functions:

  • getValue().floatValue()

  • getValue().intValue()

  • getValue().doubleValue()

  • getValue().longValue()

Boolean Setting

var testSetting = script.booleanSetting(name, value)

script.booleanSetting(... will return a boolean setting that allows for the following functions:

Mode Setting

var testSetting = script.modeSetting(name, startMode, modes...)

Modes Input

var modes = ["One", "Two"]
var testSetting1 = script.modeSetting("Mode", "One", modes)

// OR

var testSetting2 = script.modeSetting("Mode", "One", "One", "Two")

script.modeSetting(... will return a mode setting that allows for the following functions:

Color Setting

var testSetting = script.colorSetting(name, color)

How to create a Color object

var color = color({ 
    red: 1, 
    green: 1, 
    blue: 1 
})

var testSetting = script.colorSetting("Color one", color)

// OR

var testSetting = script.colorSetting("Color 2", 
color({ red: 1, green: 1, blue: 1, alpha: 210}))

script.colorSetting(... will return a color setting that allows for the following functions:

String Setting

var testSetting = script.stringSetting(name, containerString)

script.stringSetting(... will return a number setting that allows for the following functions:

Multi-Boolean Setting

var testSetting = script.multiBoolSetting(name, booleanOptions...)

Boolean Inputs
var bools = ["One", "Two"]
var testSetting1 = script.multiBoolSetting("Options", bools)

// OR

var testSetting2 = script.multiBoolSetting("Options", "One", "Two")

script.multiBoolSetting(... will return a number setting that allows for the following functions:

Last updated