Layers related tools.
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
|
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
|
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 |
# 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 |
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 |
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 |
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 |
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 |
# 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 |
# 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 |
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 |
# 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 |
# 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 |
# static setLocation(side, layersopt)
Sets the location of the layer
Parameters:
# 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 |
# static setSide(side, layersopt)
Sets the side of the layer
Parameters:
# 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 |
# 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 |
# 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 |
# 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 |
The type