Scene kit command

object.gather

Gather

Keys `objects` swirling in from where they are at `start` to an evenly spaced ring of `radius` round `center` (0: a cluster just touching), each on a spiral that turns `arc` degrees on the way, `stagger` frames apart (shrinking gaps with `accelerate`), each over `duration` frames, as one undo step.

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.gather
NameTypeRequiredDescription
acceleratebooleannoThe gaps shrink from `stagger` to `minStagger`, so they come faster and faster (false)
arcnumbernoDegrees each swirls round the centre on the way, counter-clockwise seen from above; negative turns clockwise (90)
centerinteger | string | number[]yesWhat they gather round: a point, or an object's bounding-box centre
durationnumbernoFrames each takes, 1 to 10000 (30)
levelnumbernoHeight in metres of the ring (each keeps its own height)
minStaggernumbernoaccelerate: the last gap in frames (0.2)
objectsinteger | string | (integer | string)[]noThe objects, in the order they set off; the selection when left out
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)
radiusnumbernoMetres from the centre to the ring they end on, 0 to 10000; 0 packs them into a cluster just touching (half their mean distance from the centre)
spinnumber[]noDegrees each turns about X, Y and Z on the way [x, y, z]
staggernumbernoFrames between one setting off and the next (2; 4 with accelerate)
startnumbernoThe frame the first sets off (the current frame)

Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: accelerate, arc, duration, level, minStagger, objects, pick, radius, spin, stagger, 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": {
    "accelerate": {
      "description": "The gaps shrink from `stagger` to `minStagger`, so they come faster and faster (false)",
      "type": "boolean"
    },
    "arc": {
      "description": "Degrees each swirls round the centre on the way, counter-clockwise seen from above; negative turns clockwise (90)",
      "type": "number"
    },
    "center": {
      "description": "What they gather round: 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"
      ]
    },
    "duration": {
      "description": "Frames each takes, 1 to 10000 (30)",
      "type": "number"
    },
    "level": {
      "description": "Height in metres of the ring (each keeps its own height)",
      "type": "number"
    },
    "minStagger": {
      "description": "accelerate: the last gap in frames (0.2)",
      "type": "number"
    },
    "objects": {
      "description": "The objects, in the order they set off; 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"
      ]
    },
    "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"
    },
    "radius": {
      "description": "Metres from the centre to the ring they end on, 0 to 10000; 0 packs them into a cluster just touching (half their mean distance from the centre)",
      "type": "number"
    },
    "spin": {
      "description": "Degrees each turns about X, Y and Z on the way [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "stagger": {
      "description": "Frames between one setting off and the next (2; 4 with accelerate)",
      "type": "number"
    },
    "start": {
      "description": "The frame the first sets off (the current frame)",
      "type": "number"
    }
  },
  "required": [
    "center"
  ],
  "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.