## Duik.Pin

Pin related tools.

View Source DuAEF_Duik_api.jsxinc, line 34550

# Members

Type: `int`

#### # static readonly Type

The shapes/type/icon of the pins

##### Properties:

Name | Type | Description
--- | --- | ---
`PIN` | `int` |
`VERTEX` | `int` |
`TANGENT` | `int` |
`BEND_PIN` | `int` |
`ADVANCED_PIN` | `int` |
`STANDARD` | `int` |

View Source DuAEF_Duik_api.jsxinc, line 34557

# Methods

#### # static add(prop, tangentsopt) → {Array.<ShapeLayer>}

Links the property to a pin. This will automatically detect the type of the property to create the corresponding pins.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`prop` | `Property` | `DuAEProperty` |  |  | The property
`tangents` | `Boolean` | <optional> | true | True to create pins for the tangents if prop is a Shape

View Source DuAEF_Duik_api.jsxinc, line 34720

Returns:
The pins created.
Type: `Array.<ShapeLayer>`

#### # static addPins(prop, tangentsopt) → {Array.<ShapeLayer>}

Links the spatial child properties to pins

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`prop` | `PropertyGroup` | `DuAEProperty` |  |  | The property
`tangents` | `Boolean` | <optional> | true | True to create pins for the tangents if prop is a Shape

View Source DuAEF_Duik_api.jsxinc, line 34778

Returns:
The pins created.
Type: `Array.<ShapeLayer>`

#### # static addPuppetPin(prop) → {ShapeLayer}

Adds a pin on a puppet pin

##### Parameters:

Name | Type | Description
--- | --- | ---
`prop` | `PropertyGroup` | The puppet pin

View Source DuAEF_Duik_api.jsxinc, line 34815

Returns:
The new pin.
Type: `ShapeLayer`

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

Checks the color of the pin layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layer` | `Layer` | <optional> | DuAEComp.getActiveLayer | The layer. If omitted, will check the first selected pin of the current comp

View Source DuAEF_Duik_api.jsxinc, line 35452

Returns:
Type: `DuColor`

#### # static create(compopt, typeopt) → {ShapeLayer}

Creates a stand alone pin in the comp

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` | <optional> | DuAEProject.getActiveComp() | The containing composition
`type` | `Duik.Pin.Type` | <optional> | Duik.Pin.Type.PIN | The type

View Source DuAEF_Duik_api.jsxinc, line 34572

Returns:
The pin
Type: `ShapeLayer`

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

Gets the pins 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 DuAEF_Duik_api.jsxinc, line 35441

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

#### # static getByName(comp, name, selectedOnlyopt) → {Layer|null}

Gets a Pin layer in the comp or the selection.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`comp` | `CompItem` |  |  | The composition where to get the bones
`name` | `string` |  |  | A name filter
`selectedOnly` | `Boolean` | <optional> | false | Selected layers only

View Source DuAEF_Duik_api.jsxinc, line 35090

Returns:
The pin layer.
Type: `Layer` | `null`

#### # static linkPathToLayers(pathProp, layers)

Links the path to the given layers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathProp` | `PropertyGroup` | `DuAEProperty` | The path property (either an "ADBE Vector Shape - Group" or an "ADBE Mask Atom")
`layers` | `Array.<Layer>` | The layers to link

View Source DuAEF_Duik_api.jsxinc, line 35315

#### # static linkPositionToPin(prop, boneLayer, keepOffsetopt) → {PropertyGroup}

Links a spatial property to a layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`prop` | `Property` | `DuAEProperty` |  |  | The property to link
`boneLayer` | `Layer` |  |  | The parent layer
`keepOffset` | `bool` | <optional> | true | True to not move the parent layer to the position of the property

View Source DuAEF_Duik_api.jsxinc, line 35368

Returns:
The effect created to link the bone.
Type: `PropertyGroup`

#### # static linkPuppetPinsToLayers(pins, layers)

Links the puppet pins to the given layers.

##### Parameters:

Name | Type | Description
--- | --- | ---
`pins` | `Array.<Property>` | `Array.<DuAEProperty>` | The path property (either an "ADBE FreePin3 PosPin Atom" or an "ADBE FreePin3 PosPin Position")
`layers` | `Array.<Layer>` | The layers to link

View Source DuAEF_Duik_api.jsxinc, line 35342

#### # static rigPath(prop, tangentsopt, createPinLayersopt) → {Array.<DuAEProperty>}

Links the path to bones
Works with After Effects CC2018 (15.0) and newer only

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`prop` | `Property` | `DuAEProperty` |  |  | The path property
`tangents` | `bool` | <optional> | true | True to create bones for the tangents
`createPinLayers` | `bool` | <optional> | true | True to create layers, false to only create a controller effect

View Source DuAEF_Duik_api.jsxinc, line 35121

Returns:
The pin effects created.
Type: `Array.<DuAEProperty>`

#### # 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 DuAEF_Duik_api.jsxinc, line 35564

#### # static setColor(color, layersopt) → {DuColor}

Sets the color of the pin layers

##### 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 DuAEF_Duik_api.jsxinc, line 35473

Returns:
Type: `DuColor`

#### # 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 DuAEF_Duik_api.jsxinc, line 35575

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

Sets the location of the layer

##### Parameters:

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

View Source DuAEF_Duik_api.jsxinc, line 35553

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

Sets the side of the layer

##### Parameters:

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

View Source DuAEF_Duik_api.jsxinc, line 35542

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

Sets the size of the pin 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 DuAEF_Duik_api.jsxinc, line 35518

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

Checks the size of the pin layer

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`layer` | `Layer` | <optional> | DuAEComp.getActiveLayer | The layer. If omitted, will check the first selected pin of the current comp

View Source DuAEF_Duik_api.jsxinc, line 35498

Returns:
Type: `float`