## Duik.Camera

Camera toolkit

View Source Duik_api_fordoc.jsxinc, line 57293

# Members

Type: `File`

#### # static readonly Presets

Some Camera presets

##### Properties:

Name | Type | Description
--- | --- | ---
`FRAME` | `File` |

View Source Duik_api_fordoc.jsxinc, line 57300

# Methods

#### # static frame(compopt) → {ShapeLayer}

Adds framing guides to the composition

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`comp` | `CompItem` | <optional> | The composition. The active composition if omitted.

View Source Duik_api_fordoc.jsxinc, line 57316

Returns:
The frame layer
Type: `ShapeLayer`

#### # static rig(cameraopt) → {Array.<ShapeLayer>}

Rigs a camera to make it easier to animate

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`camera` | `CameraLayer` | <optional> | The camera to rig. If omitted, will try to find it in selected layers or the active comp.

View Source Duik_api_fordoc.jsxinc, line 57422

Returns:
An array of controllers: [target, cam, main], which may be empty if no camera was found or if it was a one-node camera.
Type: `Array.<ShapeLayer>`

#### # static scaleZLink(layersopt) → {int}

Adds an inverse constraint of the scale to the depth (Z position) of the 3D layers, so that their visual size doesn't change with their depth.
Works as a toggle: first run activates the effect, next run removes it from the selected layers.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `Layer` | `DuList.<Layer>` | <optional> | The layers to constrain. The selected layers if omitted.$

View Source Duik_api_fordoc.jsxinc, line 57340

Returns:
Error code. 1: OK; 0: No camera in the comp, -1: No (selected) layers.
Type: `int`

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

Creates a 2D Multiplane Camera

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`layers` | `Array.<Layer>` | `Layer` | `DuList.<Layer>` | <optional> | Some layers to parent to the new camera.

View Source Duik_api_fordoc.jsxinc, line 58056

Returns:
The camera layer and its levels (camera is the first layer in the Array).
Type: `Array.<ShapeLayer>`