---
title: "camera.set: Camera Settings — Scene kit command — Kition"
description: "Changes camera `object`: lens, clipping, sensor width (`sensor`), `sensorHeight` (1–200 mm), `sensorFit` (auto, horizontal, vertical), depth of field and aperture blades. Auto fits sensor width to the longer render dimension; Horizontal holds width; Vertical holds sensor height. Orthographic scale follows the same fitted dimension. Square render pixels only."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/camera.set"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/scene/commands/camera.set](https://developer.kition.ai/docs/kits/scene/commands/camera.set)

# camera.set

**Camera Settings.** Changes camera `object`: lens, clipping, sensor width (`sensor`), `sensorHeight` (1–200 mm), `sensorFit` (auto, horizontal, vertical), depth of field and aperture blades. Auto fits sensor width to the longer render dimension; Horizontal holds width; Vertical holds sensor height. Orthographic scale follows the same fitted dimension. Square render pixels only.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: yes
- Acts on: `object` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `bladeRotation` | `number` | no | The blades' turn in degrees (0) |
| `blades` | `integer` | no | The opening's blades: 0 for round (the default), 3 to 64 for a polygon |
| `clipEnd` | `number` | no | Farthest distance drawn, metres |
| `clipStart` | `number` | no | Nearest distance drawn, metres |
| `depthOfField` | `boolean` | no | Blur what is out of focus in path-traced renders |
| `fStop` | `number` | no | Aperture as an f-number (2.8); smaller blurs more |
| `focusDistance` | `number` | no | Metres in front of the camera that are sharp (10) |
| `focusObject` | `integer \| string \| null` | no | An object to keep in focus (an id or a name), or null for the distance |
| `lens` | `number` | no | Focal length in millimetres |
| `object` | `integer \| string` | no | The camera; the active object when left out |
| `orthoScale` | `number` | no | Span along the fitted frame dimension, metres |
| `orthographic` | `boolean` | no | Orthographic instead of perspective |
| `pick` | `number[]` | no | Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved) |
| `ratio` | `number` | no | The opening's height over its width for anamorphic bokeh (1); above 1 narrows it |
| `sensor` | `number` | no | Sensor width in millimetres, used by Auto and Horizontal |
| `sensorFit` | `"auto" \| "horizontal" \| "vertical"` | no | Frame dimension held by the sensor or orthographic scale; Auto holds the longer dimension |
| `sensorHeight` | `number` | no | Sensor height in millimetres, 1 to 200; used by Vertical |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "camera.set" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `bladeRotation`, `blades`, `clipEnd`, `clipStart`, `depthOfField`, `fStop`, `focusDistance`, `focusObject`, `lens`, `object`, `orthoScale`, `orthographic`, `pick`, `ratio`, `sensor`, `sensorFit`, `sensorHeight`. scene_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "bladeRotation": {
      "description": "The blades' turn in degrees (0)",
      "type": "number"
    },
    "blades": {
      "description": "The opening's blades: 0 for round (the default), 3 to 64 for a polygon",
      "type": "integer"
    },
    "clipEnd": {
      "description": "Farthest distance drawn, metres",
      "type": "number"
    },
    "clipStart": {
      "description": "Nearest distance drawn, metres",
      "type": "number"
    },
    "depthOfField": {
      "description": "Blur what is out of focus in path-traced renders",
      "type": "boolean"
    },
    "fStop": {
      "description": "Aperture as an f-number (2.8); smaller blurs more",
      "type": "number"
    },
    "focusDistance": {
      "description": "Metres in front of the camera that are sharp (10)",
      "type": "number"
    },
    "focusObject": {
      "description": "An object to keep in focus (an id or a name), or null for the distance",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "lens": {
      "description": "Focal length in millimetres",
      "type": "number"
    },
    "object": {
      "description": "The camera; the active object when left out",
      "oneOf": [
        {
          "description": "the object's id",
          "type": "integer"
        },
        {
          "description": "the object's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "orthoScale": {
      "description": "Span along the fitted frame dimension, metres",
      "type": "number"
    },
    "orthographic": {
      "description": "Orthographic instead of perspective",
      "type": "boolean"
    },
    "pick": {
      "description": "Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "ratio": {
      "description": "The opening's height over its width for anamorphic bokeh (1); above 1 narrows it",
      "type": "number"
    },
    "sensor": {
      "description": "Sensor width in millimetres, used by Auto and Horizontal",
      "type": "number"
    },
    "sensorFit": {
      "description": "Frame dimension held by the sensor or orthographic scale; Auto holds the longer dimension",
      "enum": [
        "auto",
        "horizontal",
        "vertical"
      ],
      "type": "string"
    },
    "sensorHeight": {
      "description": "Sensor height in millimetres, 1 to 200; used by Vertical",
      "type": "number"
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
