DuAEF.Duik.Rigging

Duik Rigging Tools
Author:
  • Nicolas Dufresne, Kevin Masson and contributors
License:
  • GPL-3.0
    DuAEF is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DuAEF is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DuAEF. If not, see http://www.gnu.org/licenses/.

Members

static, readonly chainTypes :int

Chain Rig types
Properties:
Name Type Description
IK int
FK int
BEZIER int

Methods

static addLocator(layerOrCompopt) → {AVLayer}

Adds a locator to a layer
Parameters:
Name Type Attributes Default Description
layerOrComp Layer | CompItem <optional>
DuAEF.DuAE.Project.getActiveComp() The layer or the containing comp, to add a standalone locator.
Returns:
AVLayer - The locator, a null object

static addZero(layer) → {AVLayer}

Adds a zero to a layer
Parameters:
Name Type Description
layer Layer The layer
Returns:
AVLayer - The zero, a null

static bezierIK(layers, goalopt, controllersopt) → {Array.<Controller>}

Creates a bezier ik on the layers
Parameters:
Name Type Attributes Description
layers Array.<Layer> | Structure The layers, ordered from root to end
goal Layer | null <optional>
The goal layer, at the end of the IK
controllers Layer | Controller | null <optional>
The layer to use as controller, can be automatically created.
Must be provided if goal is undefined.
Returns:
Array.<Controller> - The controllers [curve,end,root]

static connector(childProp, parentProp, parentEffectopt, minValueopt, maxValueopt, axisopt, axisopt) → {PropertyGroup}

Applies connector to the property
Parameters:
Name Type Attributes Default Description
childProp Property | PropertyInfo The child property
parentProp Property | PropertyInfo The parent property
parentEffect PropertyGroup | PropertyInfo | null <optional>
The effect of an already existing connector
minValue float <optional>
0 The minimum value
maxValue float <optional>
100 The maximum value
axis DuAEF.DuAE.Axis <optional>
DuAEF.DuAE.Axis.X The axis or channel to connect
axis DuAEF.DuAE.Types <optional>
DuAEF.DuAE.Types.VALUE The type
Returns:
PropertyGroup - The controlling effect created

static connectorCheckParent(prop) → {int}

Checks if the property can be used as parent with the connector
Parameters:
Name Type Description
prop Property | PropertyInfo The property
Returns:
int - 0 if the prop can not be used as parent, or the number of the dimensions of the property (4 = color)

static extractLocator(preCompLayeropt, locatoropt) → {AVLayer}

Extracts one locator from a precomposition
Parameters:
Name Type Attributes Description
preCompLayer AVLayer <optional>
The precomposition layer
locator AVLayer <optional>
The locator to extract
Returns:
AVLayer - The extracted locator

static extractLocators(preCompLayeropt) → {Array.<AVLayer>}

Extracts locators from a precomposition
Parameters:
Name Type Attributes Description
preCompLayer AVLayer <optional>
The precomposition layer
Returns:
Array.<AVLayer> - The extracted locators

static fkOverlap(layers, controlleropt) → {Controller}

Creates a FK with auto-overlapping and its controller on the layers/the structure.
Parameters:
Name Type Attributes Description
layers Array.<Layer> | Structure The layers, already parented or ordered from root (at index 0) to end
controller Layer | Controller | null <optional>
An already existing controller.
Returns:
Controller - The controller of the FK.

static ik(layers, controlleropt, forceBezieropt, threeAsOneAndTwoopt) → {Array.<Controller>}

Creates an IK and its controller on the layers/the structure.
Parameters:
Name Type Attributes Default Description
layers Array.<Layer> | Structure The layers, already parented or ordered from goal (at index 0) to root (including the goal)
controller Layer | Controller | null <optional>
An already existing controller.
forceBezier boolean <optional>
false force the use of a bezier IK even with two or three layers
threeAsOneAndTwo boolean <optional>
true when rigging three layers, true to rig using a one-layer IK followed by a two-layer IK instead of a three-mayer IK
Returns:
Array.<Controller> - The controller(s) of the IK.

static oneLayerIK(layer, goalopt, controlleropt) → {Controller}

Creates a one-layer-ik on the layer
Parameters:
Name Type Attributes Description
layer Layer The layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | Controller | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
Returns:
Controller - The controller created

static orientationConstraint(layer)

Adds an orientation constraint to a layer
Parameters:
Name Type Description
layer Layer The layer

static parent(children, parent)

Parents two layers even if the parent is in the parent comp or a precomp.
Parameters:
Name Type Description
children Array.<Layer> The child layer(s)
parent Layer The parent layer

static parentConstraint(layer)

Adds a parent constraint to a layer
Parameters:
Name Type Description
layer Layer The layer

static pathConstraint(layer, path)

Adds a path constraint to a layer
Parameters:
Name Type Description
layer Layer The layer
path Property | PropertyInfo The path property

static positionConstraint(layer)

Adds a position constraint to a layer
Parameters:
Name Type Description
layer Layer The layer

static threeLayerIK(layer1, layer2, layer3, goalopt, controlleropt) → {Controller}

Creates a three-layer-ik on the layer
Parameters:
Name Type Attributes Description
layer1 Layer The root layer
layer2 Layer The middle layer
layer3 Layer The end layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | Controller | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
Returns:
Controller - The controller created

static twoLayerIK(layer1, layer2, goalopt, controlleropt) → {Controller}

Creates a two-layer-ik on the layer
Parameters:
Name Type Attributes Description
layer1 Layer The root layer
layer2 Layer The end layer
goal Layer | null <optional>
The goal layer, at the end of the IK
controller Layer | Controller | null <optional>
The layer to use as a controller, can be automatically created.
Must be provided if goal is undefined
Returns:
Controller - The controller created