Adds a new boolean input to the command. The input can be shown as a check box or a button. If it's a button you need to specify the resource folder to define the icon to use. Buttons don't have an up or down state but can just be clicked.
"commandInputs_var" is a variable referencing a CommandInputs object.
|
"commandInputs_var" is a variable referencing a CommandInputs object.
|
Type | Description |
BoolValueCommandInput | Returns the created BoolValueCommandInput object or null if the creation failed. |
Name | Type | Description |
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command. |
name | string | The displayed name of this command as seen in the dialog. |
isCheckBox | boolean | Specifies if this input should be displayed as a check box or a button. If true a check box is displayed, if false a button is displayed that can be clicked to toggle it's state. |
resourceFolder | string | Specifies the folder that contains the image for the input. It's optional if isCheckBox is true. If it's set for check box, the check box will be present as a button and has an up or down state. This is an optional argument whose default value is "". |
initialValue | boolean | Specifies the initial value of the check box or button where for a check box the value of True results in it being checked and for a button a value of true results in the button being pressed. This is an optional argument whose default value is False. |
Name | Description |
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is. |