Namespace

Layer

Duik.Layer

Members

RegExp

# static NameRegExp

The regular expressions used to validate names
Properties:
Name Type Description
DUIK_NAME RegExp
SIMPLE RegExp
LOCATION RegExp
MAIN_NAME RegExp

View Source Duik_api_fordoc.jsxinc, line 37226

string

# static Type

The types of layers used by Duik
Properties:
Name Type Description
NONE string
BONE string
PIN string
CONTROLLER string
CONTROLLER_BG string
ZERO string
IK string
NULL string
LOCATOR string
EFFECTOR string
AUDIO string
MOTION_TRAIL string
CEL string
X_SHEET string
ART string
SOLID string
ADJUSTMENT string

View Source Duik_api_fordoc.jsxinc, line 37202

Methods

# static copyAttributes(to, from, type)

Copies the attributes from a layer to another layer.
Parameters:
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

View Source Duik_api_fordoc.jsxinc, line 37498

# static get(type, selectedOnlyopt, compopt, notSelectedOnlyopt) → {Array.<Layer>}

Gets all layers of the specified type
Parameters:
Name Type Attributes Default Description
type Duik.Layer.Type The type
selectedOnly Boolean <optional>
true Whether to get only the selected layers or all of them
comp CompItem <optional>
DuAEProject.getActiveComp() The comp
notSelectedOnly bool <optional>
false Get only the not selected layers

View Source Duik_api_fordoc.jsxinc, line 37293

The layers of the specified type.
Array.<Layer>

# static groupName(layeropt) → {strng}

Checks the character name this layer belongs to
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source Duik_api_fordoc.jsxinc, line 37419

strng

# static isType(layer, layerType) → {Boolean}

Checks if the layer is one of the types created by duik.
Parameters:
Name Type Description
layer Layer The layer to check
layerType Duik.Layer.Type The type of layer

View Source Duik_api_fordoc.jsxinc, line 37253

Boolean

# static isTypePrefix(prefix) → {bool}

Checks if a string is one of the prefixes used to identify layer types in their names
Parameters:
Name Type Description
prefix string The string to check

View Source Duik_api_fordoc.jsxinc, line 37238

True if the string is one of the predefined prefixes.
bool

# static location(layeropt) → {OCO.Location}

Checks the location of the layer
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source Duik_api_fordoc.jsxinc, line 37384

OCO.Location

# static name(layeropt) → {DuColor}

Checks the limb name this layer belongs to
Parameters:
Name Type Attributes Default Description
layer Layer <optional>
DuAEComp.getActiveLayer The layer. If omitted, will check the first selected bone of the current comp

View Source Duik_api_fordoc.jsxinc, line 37459

DuColor

# static sanitize(layersopt) → {Array.<string>}

Sets default name to a layer so it can be correctly managed by Duik, and sets the groups, tags & other metadata
Parameters:
Name Type Attributes Description
layers Layer | LayerCollection | Array.<Layer> | DuList.<Layer> <optional>
The layer(s). If omitted, will check the selected layers, or all layers, of the comp

View Source Duik_api_fordoc.jsxinc, line 37555

Parts used in the name: [type, group, name, location, side]
Array.<string>

# static select(type, compopt)

Selects all the layers of the given type (and deselects others)
Parameters:
Name Type Attributes Default Description
type Duik.Layer.Type The type
comp CompItem <optional>
DuAEProject.getActiveComp() The comp

View Source Duik_api_fordoc.jsxinc, line 37321

# static setAttributes(layer, type, nameopt, sideopt, locationopt, groupNameopt)

Sets all the attributes of the layer at once; this is the fastest method to set multiple attributes.
Parameters:
Name Type Attributes Default Description
layer Layer | Array.<Layer> | LayerCollection | DuList.<Layer> The layer to set up
type Duik.Layer.Type The type
name string <optional>
The name of the limb/layer
side OCO.Side <optional>
OCO.Side.NONE The side
location OCO.Location <optional>
OCO.Location.NONE The location
groupName string <optional>
"" The name of the character

View Source Duik_api_fordoc.jsxinc, line 37521

# static setGroupName(characterName, layersopt)

Sets the character name of the bone layer
Parameters:
Name Type Attributes Default Description
characterName string The character name.
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37443

# static setLocation(side, layersopt)

Sets the location of the layer
Parameters:
Name Type Attributes Default Description
side OCO.Side The side
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37402

# static setName(limbName, layersopt)

Sets the limb name of the bone layer
Parameters:
Name Type Attributes Default Description
limbName string The limb name.
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37480

# static setSide(side, layersopt)

Sets the side of the layer
Parameters:
Name Type Attributes Default Description
side OCO.Side The side
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37367

# static setType(type, layersopt)

Sets the type of the layer
Parameters:
Name Type Attributes Default Description
type Duik.Layer.Type The type
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37271

# static side(layeropt) → {OCO.Side}

Checks the side of the layer
Parameters:
Name Type Attributes Description
layer Layer <optional>
The layer. If omitted, will check the first selected bone of the current comp

View Source Duik_api_fordoc.jsxinc, line 37353

OCO.Side

# static toggleVisibility(type, compopt, notSelectedOnlyopt)

Show/hides all the layers of the given type
Parameters:
Name Type Attributes Default Description
type Duik.Layer.Type The type
comp CompItem <optional>
DuAEProject.getActiveComp() The comp
notSelectedOnly bool <optional>
false Hides only the layers which are not selected

View Source Duik_api_fordoc.jsxinc, line 37338

# static type(layeropt) → {Duik.Layer.Type}

Gets the type of the layer
Parameters:
Name Type Attributes Description
layer Layer <optional>
The layer. If omitted, will check the first selected layer of the current comp

View Source Duik_api_fordoc.jsxinc, line 37262

The type
Toggles the edit mode on selected layers
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | LayerCollection | DuList.<Layer> | Layer <optional>
DuAEComp.getSelectedLayers() The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 37584