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.

new DuAECompSelector()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16057
Properties:
Name Type Argument 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.

Methods

staticDuAECompSelector.getComp(){CompItem|null}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16110
Gets the selected comp
Returns:
Type Description
CompItem | null the selected comp

staticDuAECompSelector.refresh(comps)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16102
Refreshes the comp list
Name Type Description
comps Array.<CompItem> optional The list of compositions. By default, will use DuAECompSelector.filterComps() to get the comps.

staticDuAECompSelector.setCurrentId(index)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16094
Changes the selection and the current comp id of the selector
Name Type Description
index int The new comp id

Type Definitions

filterComps(){Array.<CompItem>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16084
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.
Returns:
Type Description
Array.<CompItem> The compositions to set in the selector.

onChange()

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 16076
The function to execute when the index changes.
The method is called after the index has changed.