Class

DuAECompSelector

DuAECompSelector()

For use with DuScriptUI.
A drop down selector.
This is not a real class, and cannot be instanciated.
Use DuScriptUI.compSelector to create a Selector.
The Selector inherits the Group object from ScriptUI and has all of its properties and methods.
Constructor

# new DuAECompSelector()

Properties:
Name Type Attributes Default Description
id int <optional>
0 The current compitem id, 0 if None
comps Array.<CompItem> <optional>
The compositions listed in the selector.
onChange Selector~onChange The function to execute when the index changes.
You can set your own function here, which must take no argument.
The method is called after the index has changed.
filterComps Selector~filterComps A function which gets the comps to set in the selector.
The default function will get all the comps in the project,
You can set your own function here, which must take no argument.
The function must return an array of CompItem.

View Source DuAEF_DuGR_api.jsxinc, line 16310

Methods

# static getComp() → {CompItem|null}

Gets the selected comp

View Source DuAEF_DuGR_api.jsxinc, line 16364

the selected comp
CompItem | null

# static refresh(compsopt)

Refreshes the comp list
Parameters:
Name Type Attributes Description
comps Array.<CompItem> <optional>
The list of compositions. By default, will use DuAECompSelector.filterComps() to get the comps.

View Source DuAEF_DuGR_api.jsxinc, line 16356

# static setCurrentId(index)

Changes the selection and the current comp id of the selector
Parameters:
Name Type Description
index int The new comp id

View Source DuAEF_DuGR_api.jsxinc, line 16348

Type Definitions

# filterComps() → {Array.<CompItem>}

A function which gets the comps to set in the selector.
The default function will get all the comps in the project,
assign another function to this callback if you need to filter these comps.
The function must return an array of CompItem.

View Source DuAEF_DuGR_api.jsxinc, line 16338

The compositions to set in the selector.
Array.<CompItem>

# onChange()

The function to execute when the index changes.
The method is called after the index has changed.

View Source DuAEF_DuGR_api.jsxinc, line 16330