Scene kit command

modal.begin

Begin Transform

Starts an interactive move, rotation or scale of the selection that follows the pointer (`modal.pointer`) without a button held; no undo step until `modal.confirm`.

Kit
Scene 0.1.0 (.kscene)
Changes the document
no

Parameters

Parameters of modal.begin
NameTypeRequiredDescription
atnumber[]noWhere the pointer is, [x, y] in viewport pixels; its last place when left out
axis"x" | "y" | "z"noAn axis to keep to from the start (a handle, a normal); free when left out
duplicatebooleannoCopy the selection first and move the copies (Shift+D; false)
kind"move" | "rotate" | "scale" | "extrude" | "inset" | "bevel" | "loopCut"yesWhat the modal does: a transform, or (in a mesh's edit mode) an extrusion that moves, an inset or bevel the pointer sizes, a loop cut
orientation"global" | "local" | "normal" | "view"noWhose axes `axis` is (the person's transform orientation)
planebooleannoKeep to the plane across `axis` instead (false)
pressbooleannoA press started it: the release confirms it, and a release where it began is a click (false)

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "modal.begin", "params": { "kind": <"move" | "rotate" | "scale" | "extrude" | "inset" | "bevel" | "loopCut"> } }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: at, axis, duplicate, orientation, plane, press. scene_run answers the step’s result in completed[i].result.

Result

Result of modal.begin
NameTypeRequiredDescription
activebooleanno
changedbooleanno
headerstringno
kind"move" | "rotate" | "scale" | "inset" | "bevel" | "loopCut" | "slide"no
takenbooleanno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "active": {
      "type": "boolean"
    },
    "changed": {
      "type": "boolean"
    },
    "header": {
      "type": "string"
    },
    "kind": {
      "enum": [
        "move",
        "rotate",
        "scale",
        "inset",
        "bevel",
        "loopCut",
        "slide"
      ],
      "type": "string"
    },
    "taken": {
      "type": "boolean"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "at": {
      "description": "Where the pointer is, [x, y] in viewport pixels; its last place when left out",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "axis": {
      "description": "An axis to keep to from the start (a handle, a normal); free when left out",
      "enum": [
        "x",
        "y",
        "z"
      ],
      "type": "string"
    },
    "duplicate": {
      "description": "Copy the selection first and move the copies (Shift+D; false)",
      "type": "boolean"
    },
    "kind": {
      "description": "What the modal does: a transform, or (in a mesh's edit mode) an extrusion that moves, an inset or bevel the pointer sizes, a loop cut",
      "enum": [
        "move",
        "rotate",
        "scale",
        "extrude",
        "inset",
        "bevel",
        "loopCut"
      ],
      "type": "string"
    },
    "orientation": {
      "description": "Whose axes `axis` is (the person's transform orientation)",
      "enum": [
        "global",
        "local",
        "normal",
        "view"
      ],
      "type": "string"
    },
    "plane": {
      "description": "Keep to the plane across `axis` instead (false)",
      "type": "boolean"
    },
    "press": {
      "description": "A press started it: the release confirms it, and a release where it began is a click (false)",
      "type": "boolean"
    }
  },
  "required": [
    "kind"
  ],
  "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.