Namespace: Layer

Duik. Layer

Layers related tools.

Members

staticDuik.Layer.Typestring

The types of layers used by Duik
Properties:
Name Type Default Description
NONE string -
BONE string Bone
PIN string Pin
CONTROLLER string Ctrl
CONTROLLER_BG string CBg
ZERO string Zero
IK string IK
NULL string Null
LOCATOR string Loc
EFFECTOR string Fctr
AUDIO string Aud
MOTION_TRAIL string Trail
CEL string Cel
X_SHEET string X-Sheet
ART string Art

Methods

staticDuik.Layer.characterName(layer){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31260
Checks the character name this layer belongs to
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuColor

staticDuik.Layer.copyAttributes(to, from, type)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31378
Copies the attributes from a layer to another layer.
Name Type Description
to Layer | Array.<Layer> | LayerCollection | DuList.<Layer> The layer to set up
from Layer The source layer
type Duik.Layer.Type The type of the layer to set up

staticDuik.Layer.get(type, selectedOnly, comp, notSelectedOnly){Array.<Layer>}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31044
Gets all layers of the specified type
Name Type Default Description
type Duik.Layer.Type The type
selectedOnly Boolean true optional Whether to get only the selected layers or all of them
comp CompItem DuAEProject.getActiveComp() optional The comp
notSelectedOnly bool false optional Get only the not selected layers
Returns:
Type Description
Array.<Layer> The layers of the specified type.

staticDuik.Layer.isType(layer, layerType){Boolean}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 30939
Checks if the layer is one of the types created by duik.
Name Type Description
layer Layer The layer to check
layerType Duik.Layer.Type The type of layer
Returns:
Type Description
Boolean

staticDuik.Layer.isTypePrefix(prefix){bool}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 30926
Checks if a string is one of the prefixes used to identify layer types in their names
Name Type Description
prefix string The string to check
Returns:
Type Description
bool True if the string is one of the predefined prefixes.

staticDuik.Layer.limbName(layer){DuColor}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31303
Checks the limb name this layer belongs to
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuColor

staticDuik.Layer.location(layer){DuOCO.Location}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31190
Checks the location of the layer
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuOCO.Location

staticDuik.Layer.rename(layer, name, newPrefix){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31343
Renames a layer.
Name Type Description
layer Layer The layer to rename
name string The new name
newPrefix string optional If provided, will replace the prefix in the new name (or add it if there's no prefix yet)
Returns:
Type Description
string The actual new name (a number may be added).

staticDuik.Layer.sanitizeName(layer){string}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31427
Sets default name to a layer so it can be correctly managed by Duik, and checks the groups/tags.
Name Type Default Description
layer Layer DuAEComp.getActiveLayer optional The layer. If omitted, will check the first selected layer of the current comp
Returns:
Type Description
string The new name of the layer

staticDuik.Layer.select(type, comp)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31072
Selects all the layers of the given type (and deselects others)
Name Type Default Description
type Duik.Layer.Type The type
comp CompItem DuAEProject.getActiveComp() optional The comp

staticDuik.Layer.setAttributes(layer, type, limbName, side, location, characterName)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31402
Sets all the attributes of the layer at once; use this method to prepare a layer which doesn't have a proper Duik name yet.
Name Type Default Description
layer Layer | Array.<Layer> | LayerCollection | DuList.<Layer> The layer to set up
type Duik.Layer.Type The type
limbName string optional The name of the limb/layer
side DuOCO.Side DuOCO.Side.NONE optional The side
location DuOCO.Location DuOCO.Location.NONE optional The location
characterName string "-" optional The name of the character

staticDuik.Layer.setCharacterName(characterName, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31279
Sets the character name of the bone layer
Name Type Default Description
characterName string The character name.
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Layer.setLimbName(limbName, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31319
Sets the limb name of the bone layer
Name Type Default Description
limbName string The limb name.
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Layer.setLocation(side, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31208
Sets the location of the layer
Name Type Default Description
side DuOCO.Side The side
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Layer.setSide(side, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31152
Sets the side of the layer
Name Type Default Description
side DuOCO.Side The side
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Layer.setType(type, layers)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 30961
Sets the type of the layer
Name Type Default Description
type Duik.Layer.Type The type
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp

staticDuik.Layer.side(layer){DuOCO.Side}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31138
Checks the side of the layer
Name Type Description
layer Layer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
DuOCO.Side

staticDuik.Layer.toggleVisibility(type, comp, notSelectedOnly)

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31089
Show/hides all the layers of the given type
Name Type Default Description
type Duik.Layer.Type The type
comp CompItem DuAEProject.getActiveComp() optional The comp
notSelectedOnly bool false optional Hides only the layers which are not selected

staticDuik.Layer.type(layer){Duik.Layer.Type}

D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 30948
Gets the type of the layer
Name Type Description
layer Layer optional The layer. If omitted, will check the first selected bone of the current comp
Returns:
Type Description
Duik.Layer.Type The type
D:/RxLab/src/RxOT/DuAEF/Duik/Duik_API/DuAEF_Duik_api.jsxinc, line 31487
Toggles the edit mode on selected layers
Name Type Default Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer DuAEComp.getSelectedLayers() optional The layer. If omitted, will use all selected layers in the comp