Motion kit command

layer.tree

Layer Property Tree

Returns `layer`'s property tree at `time` (comp seconds): every group and property with its path (as prop.set takes, e.g. transform/position), value, keyframes and expression, `depth` levels deep. Read before setting properties.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
no
Acts on
layer (one id), which a run step’s on fills

Parameters

Parameters of layer.tree
NameTypeRequiredDescription
compinteger | stringno
depthintegerno
layerinteger | stringno
timenumbernocomp s

Call through motion_run

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

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

Result

Result of layer.tree
NameTypeRequiredDescription
blendModestringno
idintegerno
innumberno
indexintegerno
labelstringno
lightKindstringno
namestringno
outnumberno
parentanyno
propertiesobjectno
startnumberno
stretchnumberno
switchesobjectno
timenumberno
trackMatteanyno
typestringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "blendMode": {
      "type": "string"
    },
    "id": {
      "type": "integer"
    },
    "in": {
      "type": "number"
    },
    "index": {
      "type": "integer"
    },
    "label": {
      "type": "string"
    },
    "lightKind": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "out": {
      "type": "number"
    },
    "parent": {},
    "properties": {
      "additionalProperties": true,
      "properties": {
        "children": {
          "items": {
            "additionalProperties": true,
            "properties": {
              "children": {
                "items": {},
                "type": "array"
              },
              "enabled": {
                "type": "boolean"
              },
              "match": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "uid": {
                "type": "integer"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "enabled": {
          "type": "boolean"
        },
        "match": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "uid": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "start": {
      "type": "number"
    },
    "stretch": {
      "type": "number"
    },
    "switches": {
      "additionalProperties": true,
      "properties": {
        "adjustment": {
          "type": "boolean"
        },
        "audio": {
          "type": "boolean"
        },
        "collapse": {
          "type": "boolean"
        },
        "effects": {
          "type": "boolean"
        },
        "frame_blend": {
          "type": "string"
        },
        "guide": {
          "type": "boolean"
        },
        "locked": {
          "type": "boolean"
        },
        "motion_blur": {
          "type": "boolean"
        },
        "quality": {
          "type": "string"
        },
        "sampling": {
          "type": "string"
        },
        "shy": {
          "type": "boolean"
        },
        "solo": {
          "type": "boolean"
        },
        "three_d": {
          "type": "boolean"
        },
        "video": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "time": {
      "type": "number"
    },
    "trackMatte": {},
    "type": {
      "type": "string"
    }
  },
  "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"
      ]
    },
    "depth": {
      "type": "integer"
    },
    "layer": {
      "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-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "time": {
      "description": "comp s",
      "type": "number"
    }
  },
  "returns": "nodes with `path`",
  "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.