Motion kit command

view.get3D

3D View State

Reports a comp's 3D view state: current view id and label, all view ids, the camera it looks through {eye, forward, zoom, ortho}, the active camera layer {id, name, twoNode} and the light layers. Read-only.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
no

Parameters

Parameters of view.get3D
NameTypeRequiredDescription
compinteger | stringno
layerinteger | stringnoread by the command beside its listed parameters
trackerinteger | stringnoread by the command beside its listed parameters

Call through motion_run

text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "view.get3D" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: comp, layer, tracker. motion_run answers the step’s result in completed[i].result.

Result

Result of view.get3D
NameTypeRequiredDescription
activeCameraLayeranyno
cameraobjectno
labelstringno
lightsany[]no
viewstringno
viewsstring[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "activeCameraLayer": {},
    "camera": {
      "additionalProperties": true,
      "properties": {
        "eye": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "forward": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "ortho": {
          "type": "boolean"
        },
        "zoom": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "label": {
      "type": "string"
    },
    "lights": {
      "items": {},
      "type": "array"
    },
    "view": {
      "type": "string"
    },
    "views": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "comp": {
      "oneOf": [
        {
          "description": "comp's item id as motion_inspect lists it",
          "type": "integer"
        },
        {
          "description": "the item id as receipts print it (\"1\"), or the comp's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "layer": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
          "type": "integer"
        },
        {
          "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "tracker": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "returns": "current 3D view, view camera, active camera layer, lights",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (motion_commands through @kition/[email protected], built from KitionAI/kition-motion@4719aa7). As data: commands.jsonl.