## Duik.Bone

Bone and armatures related tools.

View Source Duik_api_fordoc.jsxinc, line 40116

# Methods

#### # static align(bones) → {Array.<float>}

Rotates the chain so that the bones form a straight line.
The bones must be parented together.

##### Parameters:

Name | Type | Description
--- | --- | ---
`bones` | `Array.<ShapeLayer>` | `DuList.<ShapeLayer>` | The bones to align

View Source Duik_api_fordoc.jsxinc, line 41401

Returns:
The list of the original rotations (before alignment)
Type: `Array.<float>`

#### # static arm(characterNameopt, typeopt, sideopt, shoulderopt, armopt, forearmopt, handopt, clawsopt, locationopt, forceLinkopt)

Creates a new arm.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`type` | `OCO.LimbType` | <optional> | OCO.LimbType.HOMINOID | The type of limb
`side` | `OCO.Side` | <optional> | OCO.Side.LEFT | The side
`shoulder` | `Boolean` | <optional> | false | Whether to create a shoulder
`arm` | `Boolean` | <optional> | true | Whether to create an arm / humerus
`forearm` | `Boolean` | <optional> | true | Whether to create a forearm
`hand` | `Boolean` | <optional> | true | Whether to create a hand
`claws` | `Boolean` | <optional> | false | Whether to add claws
`location` | `Boolean` | <optional> | OCO.Location.FRONT | The location of the arm
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40137

#### # static autoParent(layersopt, bonesopt, useNamesopt)

Automatically (tries to) links the artwork layers to their corresponding bones.
Finds the bones using the anchor point coordinates of the artworks, or their names

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | `LayerCollection` | <optional> |  | The artwork layers. If bones is omitted, it may also contain the bones.
`bones` | `Array.<Layer>` | `DuList.<Layer>` | `LayerCollection` | <optional> |  | The bones to parent to. If omitted, will try to find them in layers, or in the comp if there's no bone in layers.
`useNames` | `bool` | <optional> | false | If true, will use layer names instead of locations to find the corresponding bone.

View Source Duik_api_fordoc.jsxinc, line 41095

#### # static bake(bakeBonesopt, bakeEnvelopopt, bakeNoodlesopt, layersopt, reselectLayersopt)

Bakes the appearance of the selected bones to improve performance by removing appearance-only expressions and effects.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`bakeBones` | `Boolean` | <optional> | true | Set to false to keep the bone display
`bakeEnvelop` | `Boolean` | <optional> | true | Set to false to keep the envelop settings
`bakeNoodles` | `Boolean` | <optional> | true | Set to false to keep all noodles even if they're hidden
`layers` | `Array.<Layer>` | `DuList.<Layer>` | `Layer` | <optional> |  | The layers to bake; will use selected layers from the current comp if omitted.
`reselectLayers` | `Boolean` | <optional> | true | Set to false to not reselect the bones after the baking process

View Source Duik_api_fordoc.jsxinc, line 40917

#### # static bakeArmatureData(layersopt)

Bakes the "Armature" part of the Bone Data effect

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | `Layer` | <optional> | The layers to bake; will use selected layers from the current comp if omitted.

View Source Duik_api_fordoc.jsxinc, line 40869

#### # static color(layeropt) → {DuColor}

Checks the color of the bone 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 41556

Returns:
Type: `DuColor`

#### # static customLimb(numopt, nameopt, characterNameopt, sideopt, locationopt, forceLinkopt)

Creates a custom limb.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`num` | `int` | <optional> | 2 | The number of bones in case nothing is selected in the comp. Otherwize, a bone is created for each selected path vertex/puppet pin/layer.
`name` | `string` | <optional> | 'Limb' | The name of the limb
`characterName` | `string` | <optional> |  | The name of the character
`side` | `OCO.Side` | <optional> | OCO.Side.NONE | The side of the limb
`location` | `OCO.Location` | <optional> | OCO.Location.NONE | The location of the limb
`forceLink` | `boolean` | <optional> | false | whether to link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40328

#### # static duplicate(compopt) → {Array.<Layer>}

Duplicates the selected bones, updates the hierarchy and display

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The comp

View Source Duik_api_fordoc.jsxinc, line 40713

Returns:
The new bones
Type: `Array.<Layer>`

#### # static envelopColor(layeropt) → {DuColor}

Checks the color of the envelop of the bone 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 41900

Returns:
Type: `DuColor`

#### # static envelopOffset(layeropt) → {float}

Checks the offset of the envelop of the bone 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 41774

Returns:
Type: `float`

#### # static envelopOpacity(layeropt) → {float}

Checks the opacity of the envelop of the bone 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 41837

Returns:
Type: `float`

#### # static envelopSize(layeropt) → {float}

Checks the size of the envelop of the bone 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 41709

Returns:
Type: `float`

#### # static envelopStrokeColor(layeropt) → {DuColor}

Checks the stroke color of the envelop of the bone 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 42030

Returns:
Type: `DuColor`

#### # static envelopStrokeSize(layeropt) → {float}

Checks the stroke size of the envelop of the bone 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 41966

Returns:
Type: `float`

#### # static fin(characterNameopt, sideopt, fishbonesopt, forceLinkopt)

Creates a new fin.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`side` | `OCO.Side` | <optional> | OCO.Side.LEFT | The side
`fishbones` | `int` | <optional> | true | Number of fishbones to create
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40600

#### # static fishSpine(characterNameopt, headopt, spineopt, forceLinkopt)

Creates a new fish spine.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`head` | `Boolean` | <optional> | true | Whether to create a head
`spine` | `int` | <optional> | 3 | Number of spine bones
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40636

#### # static get(selectedOnlyopt, compopt) → {Array.<ShapeLayer>}

Gets the bones in the comp

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`selectedOnly` | `Boolean` | <optional> | true | Whether to get only the selected layers or all of them
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The comp

View Source Duik_api_fordoc.jsxinc, line 41445

Returns:
The bones
Type: `Array.<ShapeLayer>`

#### # static getLimbs(layersopt) → {Array.<Array.<ShapeLayer>>}

Returns the bones sorted by limbs they belong to

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | <optional> | Duik.Bone.get(false) | The layers to include as bones in the doc

View Source Duik_api_fordoc.jsxinc, line 41455

Returns:
the limbs
Type: `Array.<Array.<ShapeLayer>>`

#### # static getOrientation(bone) → {float}

Gets the bone orientation value

##### Parameters:

Name | Type | Description
--- | --- | ---
`bone` | `ShapeLayer` | The bone

View Source Duik_api_fordoc.jsxinc, line 41431

Returns:
The orientation
Type: `float`

#### # static hair(characterNameopt, numopt, forceLinkopt)

Creates a new hair strand.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`num` | `int` | <optional> | 3 | Number of hair bones
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40489

#### # static hasEnvelop(layeropt) → {bool}

Checks if the bone layer has a visible envelop

##### 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 41654

Returns:
Type: `bool`

#### # static isRigged(bone) → {bool}

Checks if the bone has already been rigged

##### Parameters:

Name | Type | Description
--- | --- | ---
`bone` | `Layer` | The bone to check

View Source Duik_api_fordoc.jsxinc, line 41391

Returns:
true if it's been rigged
Type: `bool`

#### # static leg(characterNameopt, typeopt, sideopt, thighopt, calfopt, footopt, clawsopt, locationopt, forceLinkopt)

Creates a new arm.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`type` | `OCO.LimbType` | <optional> | OCO.LimbType.HOMINOID | The type of limb
`side` | `OCO.Side` | <optional> | OCO.Side.LEFT | The side
`thigh` | `Boolean` | <optional> | true | Whether to create a thigh
`calf` | `Boolean` | <optional> | true | Whether to create a calf
`foot` | `Boolean` | <optional> | true | Whether to create a foot
`claws` | `Boolean` | <optional> | false | Whether to add claws
`location` | `Boolean` | <optional> | OCO.Location.BACK | The location of the leg
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40375

#### # static linkLayers(layers, boneLayers)

Parents the given layers to the given bones.
The two lists do not need to have the same number of layers, additionnal/missing layers will be ignored.

##### Parameters:

Name | Type | Description
--- | --- | ---
`layers` | `Array.<Layer>` | `LayerCollection` | `DuList` |
`boneLayers` | `Array.<Layer>` | `LayerCollection` | `DuList` |

View Source Duik_api_fordoc.jsxinc, line 40671

#### # static noodleColor(layeropt) → {DuColor}

Checks the color of the noodle of the bone 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 42114

Returns:
Type: `DuColor`

#### # static opacity(layeropt) → {DuColor}

Checks the opacity of the bone 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 42234

Returns:
Type: `DuColor`

#### # static resetTransform(layer)

Resets the transformations (rotation and scale) of the bone to 0 and 100%

##### Parameters:

Name | Type | Description
--- | --- | ---
`layer` | `Layer` |

View Source Duik_api_fordoc.jsxinc, line 42302

#### # static select(compopt)

Selects all the bones in the comp (and deselects any other layer)

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The comp

View Source Duik_api_fordoc.jsxinc, line 40690

#### # static setCharacterName(characterName, layeropt)

Sets the character name of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` |  |  | The character name.
`layer` | `Layer` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42281

#### # static setColor(coloropt, layersopt)

Sets the color of the bone layers

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | `DuColor` | `null` | <optional> |  | The color. If omitted or null, will assign a random color for each bone.
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41583

#### # static setEnvelopColor(color, layersopt)

Sets the color of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | `DuColor` |  |  | The color.
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41930

#### # static setEnvelopEnabled(enabledopt, layersopt)

Toggles the envelop

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`enabled` | `bool` | <optional> | true |
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41678

#### # static setEnvelopOffset(offset, layersopt)

Sets the offset of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`offset` | `float` |  |  | The offset
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41804

#### # static setEnvelopOpacity(opacity, layersopt)

Sets the opacity of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`opacity` | `float` |  |  | The opacity
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41866

#### # static setEnvelopSize(size, layersopt)

Sets the size of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`size` | `float` |  |  | The new size
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41741

#### # static setEnvelopStrokeColor(color, layersopt)

Sets the stroke color of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | `DuColor` |  |  | The color.
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42060

#### # static setEnvelopStrokeSize(color, layersopt)

Sets the stroke size of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | `float` |  |  | The color
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41995

#### # static setLimbName(limbName, layeropt)

Sets the limb name of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`limbName` | `string` |  |  | The limb name.
`layer` | `Layer` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42292

#### # static setLocation(side, layersopt)

Sets the location of the layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`side` | `OCO.Side` |  |  | The side
`layers` | `Array.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41545

#### # static setNoodleColor(color, layersopt)

Sets the stroke color of the envelop of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`color` | `DuColor` |  |  | The color.
`layers` | `Layer` | `LayerCollection` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42144

#### # static setNoodleEnabled(enabledopt, layersopt)

Toggles the noodle

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`enabled` | `bool` | <optional> | true |
`layers` | `Layer` | <optional> |  | The layers. If omitted, will use all selected bones

View Source Duik_api_fordoc.jsxinc, line 42179

#### # static setOpacity(opacity, layeropt)

Sets the opacity of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`opacity` | `float` |  |  | The opacity in %.
`layer` | `Layer` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42256

#### # static setRigged(bones, riggedopt)

Tags the layers as rigged

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`bones` | `Array.<Layer>` | `DuList.<Layer>` | `Layer` |  |  | The bones to set
`rigged` | `bool` | <optional> | true | The value

View Source Duik_api_fordoc.jsxinc, line 41377

#### # static setSide(side, layersopt)

Sets the side of the layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`side` | `OCO.Side` |  |  | The side
`layers` | `Array.<Layer>` | <optional> | Duik.Bone.get() | The layer. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 41534

#### # static setSize(size, layeropt)

Sets the size of the bone layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`size` | `float` |  |  | The size in %.
`layer` | `Layer` | <optional> | DuAEComp.getSelectedLayers() | The layers. If omitted, will use all selected layers in the comp

View Source Duik_api_fordoc.jsxinc, line 42211

#### # static size(layeropt) → {float}

Checks the size of the bone 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 41619

Returns:
Type: `float`

#### # static snakeSpine(characterNameopt, headopt, spineopt, forceLinkopt)

Creates a new snake / worm spine.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`head` | `Boolean` | <optional> | true | Whether to create a head
`spine` | `int` | <optional> | 5 | Number of spine bones
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40566

#### # static spine(characterNameopt, headopt, neckopt, spineopt, hipsopt, forceLinkopt)

Creates a new spine.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`head` | `Boolean` | <optional> | true | Whether to create a head
`neck` | `int` | <optional> | 1 | Number of neck bones
`spine` | `int` | <optional> | 2 | Number of spine bones
`hips` | `Boolean` | <optional> | true | Whether to create hips
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40418

#### # static tail(characterNameopt, numopt, forceLinkopt)

Creates a new tail.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`num` | `int` | <optional> | 3 | Number of tail bones
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40455

#### # static toggleVisibility(compopt, notSelectedOnlyopt)

Show/hides all the bones

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The comp
`notSelectedOnly` | `bool` | <optional> | false | Hides only the bones which are not selected

View Source Duik_api_fordoc.jsxinc, line 40701

#### # static type(layeropt) → {OCO.Bone}

Gets the type of bone

##### 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 41639

Returns:
The type
Type: `OCO.Bone`

#### # static unlink(compopt)

Toggles the edit mode on selected bones

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The comp

View Source Duik_api_fordoc.jsxinc, line 40844

#### # static wing(characterNameopt, sideopt, armopt, forearmopt, handopt, feathersopt, forceLinkopt)

Creates a new wing.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`characterName` | `string` | <optional> |  | The name of the character
`side` | `OCO.Side` | <optional> | OCO.Side.LEFT | The side
`arm` | `Boolean` | <optional> | true | Whether to create an arm / humerus
`forearm` | `Boolean` | <optional> | true | Whether to create a forearm
`hand` | `Boolean` | <optional> | true | Whether to create a hand
`feathers` | `int` | <optional> | 5 | Number of feathers
`forceLink` | `boolean` | <optional> | false | whether link the selected layers/properties to the new armature

View Source Duik_api_fordoc.jsxinc, line 40527