Scene kit command

nla.setStrip

Action Strip Settings

Changes NLA strip `strip` of track `track`: action range, blending, repeats, scale; a meta uses `start` and `end` to move or stretch its children. Transitions follow their neighbors.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes
Acts on
object (one id), which a run step’s on fills

Parameters

Parameters of nla.setStrip
NameTypeRequiredDescription
actionEndnumbernoThe last action frame it plays
actionStartnumbernoThe first action frame it plays
autoBlendbooleannoBlends in and out over the strips of the tracks below and above it that overlap it (switching it off clears the blends)
blend"replace" | "combine" | "add" | "subtract" | "multiply"noHow it mixes onto the tracks below
blendInnumbernoFrames its influence rises over at its start
blendOutnumbernoFrames its influence falls over at its end
endnumbernoMeta strips: move or stretch the children together to this end frame
extrapolation"hold" | "holdForward" | "nothing"noOutside its frames: hold (both ways; only the first strip of a track holds backwards), holdForward, or nothing
influencenumbernoA fixed influence from 0 to 1 in place of the blends; null for the blends
mutedbooleannoDoes nothing
namestringnoThe strip's name
objectinteger | stringnoThe object; the active one 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)
repeatnumbernoHow many times it plays (0.01 or more)
reversedbooleannoPlays backwards
scalenumbernoHow many times slower it plays (0.0001 or more)
startnumbernoThe scene frame it starts at
stripintegeryesThe strip on the track, from 0 (frame order)
toTrackintegernoMoves it to this track
trackintegeryesThe track, from 0 at the bottom

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "nla.setStrip", "params": { "strip": <integer>, "track": <integer> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: actionEnd, actionStart, autoBlend, blend, blendIn, blendOut, end, extrapolation, influence, muted, name, object, pick, repeat, reversed, scale, start, toTrack. 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": {
    "actionEnd": {
      "description": "The last action frame it plays",
      "type": "number"
    },
    "actionStart": {
      "description": "The first action frame it plays",
      "type": "number"
    },
    "autoBlend": {
      "description": "Blends in and out over the strips of the tracks below and above it that overlap it (switching it off clears the blends)",
      "type": "boolean"
    },
    "blend": {
      "description": "How it mixes onto the tracks below",
      "enum": [
        "replace",
        "combine",
        "add",
        "subtract",
        "multiply"
      ],
      "type": "string"
    },
    "blendIn": {
      "description": "Frames its influence rises over at its start",
      "type": "number"
    },
    "blendOut": {
      "description": "Frames its influence falls over at its end",
      "type": "number"
    },
    "end": {
      "description": "Meta strips: move or stretch the children together to this end frame",
      "type": "number"
    },
    "extrapolation": {
      "description": "Outside its frames: hold (both ways; only the first strip of a track holds backwards), holdForward, or nothing",
      "enum": [
        "hold",
        "holdForward",
        "nothing"
      ],
      "type": "string"
    },
    "influence": {
      "description": "A fixed influence from 0 to 1 in place of the blends; null for the blends",
      "type": "number"
    },
    "muted": {
      "description": "Does nothing",
      "type": "boolean"
    },
    "name": {
      "description": "The strip's name",
      "type": "string"
    },
    "object": {
      "description": "The object; the active one 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"
      ]
    },
    "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"
    },
    "repeat": {
      "description": "How many times it plays (0.01 or more)",
      "type": "number"
    },
    "reversed": {
      "description": "Plays backwards",
      "type": "boolean"
    },
    "scale": {
      "description": "How many times slower it plays (0.0001 or more)",
      "type": "number"
    },
    "start": {
      "description": "The scene frame it starts at",
      "type": "number"
    },
    "strip": {
      "description": "The strip on the track, from 0 (frame order)",
      "type": "integer"
    },
    "toTrack": {
      "description": "Moves it to this track",
      "type": "integer"
    },
    "track": {
      "description": "The track, from 0 at the bottom",
      "type": "integer"
    }
  },
  "required": [
    "strip",
    "track"
  ],
  "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.