---
title: "graph.addModifier: Add F-Curve Modifier — Scene kit command — Kition"
description: "Adds an F-curve modifier (cycles, noise, generator, …) to an animated property's curve."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/graph.addModifier"
---

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

# graph.addModifier

**Add F-Curve Modifier.** Adds an F-curve modifier (cycles, noise, generator, …) to an animated property's curve.

- 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 |
| --- | --- | --- | --- |
| `additive` | `boolean` | no | generator, function: adds to the curve instead of replacing it |
| `after` | `"none" \| "repeat" \| "repeatOffset" \| "mirror"` | no | cycles: after the last key |
| `afterCount` | `integer` | no | cycles: cycles after (0 forever) |
| `amplitude` | `number` | no | function |
| `before` | `"none" \| "repeat" \| "repeatOffset" \| "mirror"` | no | cycles: before the first key |
| `beforeCount` | `integer` | no | cycles: cycles before (0 forever) |
| `blend` | `"replace" \| "add" \| "subtract" \| "multiply"` | no | noise: how it mixes in |
| `coefficients` | `number[]` | no | generator: the coefficients |
| `depth` | `integer` | no | noise: octaves beyond the first (0 to 32) |
| `end` | `number` | no | stepped: steps only up to this frame; null for always |
| `function` | `"sin" \| "cos" \| "tan" \| "sqrt" \| "ln" \| "sinc"` | no | function: the function of amplitude · f(phaseMultiplier · frame + phaseOffset) + valueOffset |
| `index` | `integer` | no | The component, from 0 (0) |
| `influence` | `number` | no | Scales its effect, 0 to 1; null for full |
| `lacunarity` | `number` | no | noise: frequency step between octaves |
| `max` | `number` | no | envelope: the high end, above the reference |
| `maxX` | `number \| null` | no | limits: maximum evaluated frame; null disables |
| `maxY` | `number \| null` | no | limits: maximum curve value; null disables |
| `min` | `number` | no | envelope: the low end, below the reference |
| `minX` | `number \| null` | no | limits: minimum evaluated frame; null disables |
| `minY` | `number \| null` | no | limits: minimum curve value; null disables |
| `mode` | `"expanded" \| "factorized"` | no | generator: expanded (c0 + c1·x + …) or factorized ((c0·x + c1)(c2·x + c3)…) |
| `muted` | `boolean` | no | Does nothing (values of rotation channels are radians) |
| `offset` | `number` | no | noise, stepped: frame offset |
| `path` | `string` | no | The bone or shape key, for their properties |
| `phase` | `number` | no | noise |
| `phaseMultiplier` | `number` | no | function |
| `phaseOffset` | `number` | no | function |
| `points` | `object[]` | no | envelope: control points { frame, min, max } in frame order |
| `property` | `string` | yes | The channel's property (location, boneRotation, shapeKey, ...) |
| `range` | `object` | no | Limits it to { start, end, blendIn, blendOut } frames; null for everywhere |
| `reference` | `number` | no | envelope: the reference value |
| `roughness` | `number` | no | noise: amplitude step between octaves |
| `scale` | `number` | no | noise: frames per noise feature |
| `start` | `number` | no | stepped: steps only from this frame; null for always |
| `step` | `number` | no | stepped: frames each step holds |
| `strength` | `number` | no | noise |
| `target` | `integer` | yes | The channel's object (or material) id |
| `type` | `"generator" \| "function" \| "envelope" \| "cycles" \| "noise" \| "stepped" \| "limits"` | yes | The modifier |
| `valueOffset` | `number` | no | function |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "graph.addModifier", "params": { "property": <string>, "target": <integer>, "type": <"generator" | "function" | "envelope" | "cycles" | "noise" | "stepped" | "limits"> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `additive`, `after`, `afterCount`, `amplitude`, `before`, `beforeCount`, `blend`, `coefficients`, `depth`, `end`, `function`, `index`, `influence`, `lacunarity`, `max`, `maxX`, `maxY`, `min`, `minX`, `minY`, `mode`, `muted`, `offset`, `path`, `phase`, `phaseMultiplier`, `phaseOffset`, `points`, `range`, `reference`, `roughness`, `scale`, `start`, `step`, `strength`, `valueOffset`. 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": {
    "additive": {
      "description": "generator, function: adds to the curve instead of replacing it",
      "type": "boolean"
    },
    "after": {
      "description": "cycles: after the last key",
      "enum": [
        "none",
        "repeat",
        "repeatOffset",
        "mirror"
      ],
      "type": "string"
    },
    "afterCount": {
      "description": "cycles: cycles after (0 forever)",
      "type": "integer"
    },
    "amplitude": {
      "description": "function",
      "type": "number"
    },
    "before": {
      "description": "cycles: before the first key",
      "enum": [
        "none",
        "repeat",
        "repeatOffset",
        "mirror"
      ],
      "type": "string"
    },
    "beforeCount": {
      "description": "cycles: cycles before (0 forever)",
      "type": "integer"
    },
    "blend": {
      "description": "noise: how it mixes in",
      "enum": [
        "replace",
        "add",
        "subtract",
        "multiply"
      ],
      "type": "string"
    },
    "coefficients": {
      "description": "generator: the coefficients",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "depth": {
      "description": "noise: octaves beyond the first (0 to 32)",
      "type": "integer"
    },
    "end": {
      "description": "stepped: steps only up to this frame; null for always",
      "type": "number"
    },
    "function": {
      "description": "function: the function of amplitude · f(phaseMultiplier · frame + phaseOffset) + valueOffset",
      "enum": [
        "sin",
        "cos",
        "tan",
        "sqrt",
        "ln",
        "sinc"
      ],
      "type": "string"
    },
    "index": {
      "description": "The component, from 0 (0)",
      "type": "integer"
    },
    "influence": {
      "description": "Scales its effect, 0 to 1; null for full",
      "type": "number"
    },
    "lacunarity": {
      "description": "noise: frequency step between octaves",
      "type": "number"
    },
    "max": {
      "description": "envelope: the high end, above the reference",
      "type": "number"
    },
    "maxX": {
      "description": "limits: maximum evaluated frame; null disables",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "maxY": {
      "description": "limits: maximum curve value; null disables",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "min": {
      "description": "envelope: the low end, below the reference",
      "type": "number"
    },
    "minX": {
      "description": "limits: minimum evaluated frame; null disables",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "minY": {
      "description": "limits: minimum curve value; null disables",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "description": "generator: expanded (c0 + c1·x + …) or factorized ((c0·x + c1)(c2·x + c3)…)",
      "enum": [
        "expanded",
        "factorized"
      ],
      "type": "string"
    },
    "muted": {
      "description": "Does nothing (values of rotation channels are radians)",
      "type": "boolean"
    },
    "offset": {
      "description": "noise, stepped: frame offset",
      "type": "number"
    },
    "path": {
      "description": "The bone or shape key, for their properties",
      "type": "string"
    },
    "phase": {
      "description": "noise",
      "type": "number"
    },
    "phaseMultiplier": {
      "description": "function",
      "type": "number"
    },
    "phaseOffset": {
      "description": "function",
      "type": "number"
    },
    "points": {
      "description": "envelope: control points { frame, min, max } in frame order",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    },
    "property": {
      "description": "The channel's property (location, boneRotation, shapeKey, ...)",
      "type": "string"
    },
    "range": {
      "additionalProperties": true,
      "description": "Limits it to { start, end, blendIn, blendOut } frames; null for everywhere",
      "type": "object"
    },
    "reference": {
      "description": "envelope: the reference value",
      "type": "number"
    },
    "roughness": {
      "description": "noise: amplitude step between octaves",
      "type": "number"
    },
    "scale": {
      "description": "noise: frames per noise feature",
      "type": "number"
    },
    "start": {
      "description": "stepped: steps only from this frame; null for always",
      "type": "number"
    },
    "step": {
      "description": "stepped: frames each step holds",
      "type": "number"
    },
    "strength": {
      "description": "noise",
      "type": "number"
    },
    "target": {
      "description": "The channel's object (or material) id",
      "type": "integer",
      "x-khp-types": [
        "Object",
        "Material"
      ]
    },
    "type": {
      "description": "The modifier",
      "enum": [
        "generator",
        "function",
        "envelope",
        "cycles",
        "noise",
        "stepped",
        "limits"
      ],
      "type": "string"
    },
    "valueOffset": {
      "description": "function",
      "type": "number"
    }
  },
  "required": [
    "property",
    "target",
    "type"
  ],
  "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).
