## Duik.Rig

(Auto)Rigging tools.

View Source Duik_api_fordoc.jsxinc, line 48882

# Methods

#### # static arm(layersopt, customControllersopt) → {Layer}

Rigs an arm/front leg.

##### 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 Duik_api_fordoc.jsxinc, line 50136

Returns:
The controller of the arm
Type: `Layer`

#### # static auto(bakeBonesopt, bakeEnvelopsopt, bakeNoodlesopt, longChainModeopt, threeLayerModeopt, layersopt, createMasteropt) → {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
`longChainMode` | `Duik.Constraint.IKType` | <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.
`threeLayerMode` | `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. All selected layers by default.
`createMaster` | `Boolean` | <optional> | false | Set to true to add a master/root controller which controls all other controllers

View Source Duik_api_fordoc.jsxinc, line 48902

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

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

Rigs custom chains

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | The layers to rig
`tailMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.FK | How to rig tails and other chains consisting of more than 3 layers.
`threeLayerMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.ONE_TWO | How to rig tails and other chains consisting of more than 3 layers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use

View Source Duik_api_fordoc.jsxinc, line 51540

Returns:
The controllers
Type: `Array.<Layer>`

#### # static fin(layersopt, customControllersopt) → {Layer}

Rigs a fin.

##### 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 Duik_api_fordoc.jsxinc, line 50648

Returns:
The controller of the fin
Type: `Layer`

#### # static fishSpine(layersopt, rigModeopt, 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
`rigMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.FK | How to rig tails and other chains consisting of more than 3 layers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use

View Source Duik_api_fordoc.jsxinc, line 50838

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 Duik_api_fordoc.jsxinc, line 50092

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

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

Rigs hair strands

##### 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 Duik_api_fordoc.jsxinc, line 51517

Returns:
The controllers for the hair
Type: `Array.<Layer>`

#### # static leg(layersopt, customControllersopt) → {Layer}

Rigs a leg.

##### 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 Duik_api_fordoc.jsxinc, line 49637

Returns:
The controller leg
Type: `Layer`

#### # static limb(limb, customControllersopt, longChainModeopt, threeLayerModeopt)

Auto-rigs an OCOLimb if it exists in the comp

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`limb` | `OCOLimb` |  |  | The limb to rig
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use
`longChainMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.FK | How to rig tails and other chains consisting of more than 3 layers.
`threeLayerMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.ONE_TWO | How to rig 3-layer chains.

View Source Duik_api_fordoc.jsxinc, line 49117

#### # static parentLimb(limb, bone)

Parents a rigged limb (i.e. the bones and controllers) to a bone.
The limb must have been rigged with `Duik.Rig.limb`, or must have a `.ctrls` attribute, which is an array of Layer containing the controllers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`limb` | `OCOLimb` | The limb to parent
`bone` | `OCOBone` | The parent bone

View Source Duik_api_fordoc.jsxinc, line 49058

#### # 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 Duik_api_fordoc.jsxinc, line 50042

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

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 Duik_api_fordoc.jsxinc, line 49194

Returns:
The controllers for the spine.
Type: `Array.<Layer>`

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

Rigs a tail.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | The layers to rig
`tailMode` | `Duik.Constraint.IKType` | <optional> | Duik.Constraint.IKType.FK | How to rig tails and other chains consisting of more than 3 layers.
`customControllers` | `Array.<Layer>` | `DuList.<Layer>` | <optional> |  | Existing custom controllers to use

View Source Duik_api_fordoc.jsxinc, line 49519

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

#### # static wing(layersopt, customControllersopt) → {Layer}

Rigs a wing with feathers

##### 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 Duik_api_fordoc.jsxinc, line 51026

Returns:
The controller of the wing
Type: `Layer`