## Duik.Rig

(Auto)Rigging tools.

View Source DuAEF_Duik_api.jsxinc, line 43889

# Methods

#### # static arm(layersopt, parentSpineopt, customControllersopt) → {Array.<Layer>}

Rigs an arm/front leg.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`parentSpine` | `Object` | <optional> | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 44998

Returns:
The controllers of the tail
Type: `Array.<Layer>`

#### # static auto(bakeBonesopt, bakeEnvelopsopt, bakeNoodlesopt, tailModeopt, longChainModeopt, layersopt) → {Array.<Layer>}

The auto-rig for everything

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`bakeBones` | `Boolean` | <optional> | true | Whether to bake bones
`bakeEnvelops` | `Boolean` | <optional> | true | Whether to bake envelops
`bakeNoodles` | `Boolean` | <optional> | true | Whether to remove deactivated noodles
`tailMode` | `Boolean` | <optional> | Duik.Constraint.IKType.FK | Set to true if you prefer using Bézier IK than FK with overlap for tails and other chains consisting of more than 3 layers.
`longChainMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.ONE_TWO | The type of IK to use with custom 3-layer chains.
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | The layers to rig

View Source DuAEF_Duik_api.jsxinc, line 43908

Returns:
The controllers which are used in the rig
Type: `Array.<Layer>`

#### # static fin(layersopt, parentSpineopt, customControllersopt) → {Array.<Layer>}

Rigs a fin.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`parentSpine` | `Object` | <optional> | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 45491

Returns:
The controllers of the tail
Type: `Array.<Layer>`

#### # static fishSpine(layersopt, fishIKopt, customControllersopt) → {Object}

Rigs the spine of a fish (head + tail).

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | The layers to rig
`fishIK` | `Boolean` | <optional> | false | Set to true if you prefer using Bézier IK than FK with overlap for tails and other chains consisting of more than 3 layers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 45684

Returns:
An object with two Arrays: bones and controllers.
Type: `Object`

#### # static getSpineAttach(location, spineBones) → {Layer|null}

Returns the bone from the spine bones the closest to the location, where child bones at that location can be attached

##### Parameters:

Name | Type | Description
--- | --- | ---
`location` | `Array.<float>` | The location where to attach bones, in comp coordinates
`spineBones` | `Array.<Layer>` | The bones of the spine, sorted from root (hips) to tip

View Source DuAEF_Duik_api.jsxinc, line 44957

Returns:
The corresponding spine bone or null if the list of spine bones is empty
Type: `Layer` | `null`

#### # static hair(layersopt, parentSpineopt, customControllersopt)

Rigs hair strands

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`parentSpine` | `Object` | <optional> | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 46366

#### # static leg(layersopt, parentSpineopt, customControllersopt) → {Array.<Layer>}

Rigs a leg.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`parentSpine` | `Object` | <optional> | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 44522

Returns:
The controllers of the tail
Type: `Array.<Layer>`

#### # static shoulder(shoulder, ctrl)

Rigs a shoulder (an FK and an auto-position effect)

##### Parameters:

Name | Type | Description
--- | --- | ---
`shoulder` | `Layer` | The shoulder bone
`ctrl` | `Layer` | The controller

View Source DuAEF_Duik_api.jsxinc, line 44909

#### # static spine(layersopt, customControllersopt) → {Object}

Rigs a spine.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 44054

Returns:
An object with two Arrays: bones and controllers.
Type: `Object`

#### # static tail(layersopt, tailModeopt, parentSpineopt, customControllersopt) → {Array.<Layer>}

Rigs a tail.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | The layers to rig
`tailMode` | `Boolean` | <optional> | Duik.Constraint.IKType.FK | Set to true if you prefer using Bézier IK than FK with overlap for tails and other chains consisting of more than 3 layers.
`parentSpine` | `Object` | <optional> |  | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 44366

Returns:
The controller(s) of the tail
Type: `Array.<Layer>`

#### # static wing(layersopt, parentSpineopt, customControllersopt)

Rigs a wing with feathers

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | The layers to rig
`parentSpine` | `Object` | <optional> | An object with two Arrays: bones and controllers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> | Existing custom controllers to use

View Source DuAEF_Duik_api.jsxinc, line 45872