---
title: "graph.setInterpolation: Keyframe Interpolation — Scene kit command — Kition"
description: "Sets the interpolation of the keyframe at `frame` of an animated property."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/graph.setInterpolation"
---

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

# graph.setInterpolation

**Keyframe Interpolation.** Sets the interpolation of the keyframe at `frame` of an animated property.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `frame` | `number` | yes | The key's frame |
| `index` | `integer` | no | The component, from 0 (0) |
| `interpolation` | `"bezier" \| "linear" \| "constant"` | yes | How the curve runs to the next key |
| `path` | `string` | no | The bone or shape key, for their properties |
| `property` | `string` | yes | The channel's property (location, boneRotation, shapeKey, ...) |
| `target` | `integer` | yes | The channel's object (or material) id |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "graph.setInterpolation", "params": { "frame": <number>, "interpolation": <"bezier" | "linear" | "constant">, "property": <string>, "target": <integer> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `index`, `path`. 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": {
    "frame": {
      "description": "The key's frame",
      "type": "number"
    },
    "index": {
      "description": "The component, from 0 (0)",
      "type": "integer"
    },
    "interpolation": {
      "description": "How the curve runs to the next key",
      "enum": [
        "bezier",
        "linear",
        "constant"
      ],
      "type": "string"
    },
    "path": {
      "description": "The bone or shape key, for their properties",
      "type": "string"
    },
    "property": {
      "description": "The channel's property (location, boneRotation, shapeKey, ...)",
      "type": "string"
    },
    "target": {
      "description": "The channel's object (or material) id",
      "type": "integer",
      "x-khp-types": [
        "Object",
        "Material"
      ]
    }
  },
  "required": [
    "frame",
    "interpolation",
    "property",
    "target"
  ],
  "type": "object"
}
```

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).
