Namespace

Layer

Duik.Layer

Layers related tools.

View Source api3.jsxinc, line 208

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 api3.jsxinc, line 247

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 api3.jsxinc, line 223

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 api3.jsxinc, line 519

# 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 api3.jsxinc, line 314

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 api3.jsxinc, line 440

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 api3.jsxinc, line 274

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 api3.jsxinc, line 259

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 api3.jsxinc, line 405

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 api3.jsxinc, line 480

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 api3.jsxinc, line 576

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 api3.jsxinc, line 342

# 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 api3.jsxinc, line 542

# 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 api3.jsxinc, line 464

# 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 api3.jsxinc, line 423

# 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 api3.jsxinc, line 501

# 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 api3.jsxinc, line 388

# 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 api3.jsxinc, line 292

# 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 api3.jsxinc, line 374

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 api3.jsxinc, line 359

# 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 api3.jsxinc, line 283

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 api3.jsxinc, line 605