Scene kit command

object.wave

Wave

Keys a wave running out from `origin` at `speed` metres a second over `objects`, as one undo step: as it reaches each one (by its distance), it bumps in size by `amount` (property scale) or switches its own material's base colour to `color` and leaves it there (property color), over `duration` frames. Separate objects only, not an Array modifier's copies.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes
Acts on
objects (a list of ids), which a run step’s on fills

Parameters

Parameters of object.wave
NameTypeRequiredDescription
amountnumbernoscale: how much larger at the top of the bump, -0.9 to 100 (0.25)
colornumber[] | stringnocolor: the colour each switches to (#rrggbb or linear [r, g, b])
durationnumbernoFrames each object's bump or switch takes, 1 to 10000 (10)
objectsinteger | string | (integer | string)[]noThe objects; the selection when left out
origininteger | string | number[]yesWhere the wave starts: a point, or an object's bounding-box centre
picknumber[]noInstead 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)
property"scale" | "color"noWhat the wave does: scale, a bump in size; color, switches each one's material base colour to `color` and leaves it there (scale)
speednumbernoMetres a second the wave travels, 0.001 to 100000 (4)
startnumbernoThe frame the wave sets off from `origin` (the current frame)

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "object.wave", "params": { "origin": <integer | string | number[]> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: amount, color, duration, objects, pick, property, speed, start. 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": {
    "amount": {
      "description": "scale: how much larger at the top of the bump, -0.9 to 100 (0.25)",
      "type": "number"
    },
    "color": {
      "description": "color: the colour each switches to (#rrggbb or linear [r, g, b])",
      "oneOf": [
        {
          "description": "[r, g, b] or [r, g, b, a], linear, 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "#rrggbb (sRGB)",
          "type": "string"
        }
      ]
    },
    "duration": {
      "description": "Frames each object's bump or switch takes, 1 to 10000 (10)",
      "type": "number"
    },
    "objects": {
      "description": "The objects; the selection when left out",
      "oneOf": [
        {
          "description": "an object's id",
          "type": "integer"
        },
        {
          "description": "an object's name",
          "type": "string"
        },
        {
          "description": "ids or names",
          "items": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ]
          },
          "type": "array"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "origin": {
      "description": "Where the wave starts: a point, or an object's bounding-box centre",
      "oneOf": [
        {
          "description": "an object's id (its bounding box's centre)",
          "type": "integer"
        },
        {
          "description": "an object's name (its bounding box's centre)",
          "type": "string"
        },
        {
          "description": "a point [x, y, z] in metres",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "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"
    },
    "property": {
      "description": "What the wave does: scale, a bump in size; color, switches each one's material base colour to `color` and leaves it there (scale)",
      "enum": [
        "scale",
        "color"
      ],
      "type": "string"
    },
    "speed": {
      "description": "Metres a second the wave travels, 0.001 to 100000 (4)",
      "type": "number"
    },
    "start": {
      "description": "The frame the wave sets off from `origin` (the current frame)",
      "type": "number"
    }
  },
  "required": [
    "origin"
  ],
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.