Motion kit command

templateProps.addProperty

Add Property to Graphics Templates

Add Property to Graphics Templates: `{layer, path|prop}` or the selected properties.

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

Parameters

Parameters of templateProps.addProperty
NameTypeRequiredDescription
asstringnofont (Source Text font family/style/size) | scale (uniform Scale); Source Text font family/style/size; uniform Scale
compinteger | stringno
controlintegernoread by the command beside its listed parameters
groupintegernocontrol id
indexintegernoa position counted from 0 (the first is 0)
layerinteger | stringno
mirrorbooleannoa property already present is added as a mirror; default true
namestringno
pathstringnouid (default: the selected properties); default: the selected properties; one of several alternative parameters
propintegernouid (default: the selected properties); default: the selected properties; one of several alternative parameters
textstringnoread by the command beside its listed parameters

Call through motion_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: as, comp, control, group, index, layer, mirror, name, path, prop, text. motion_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": {
    "as": {
      "description": "font (Source Text font family/style/size) | scale (uniform Scale); Source Text font family/style/size; uniform Scale",
      "type": "string"
    },
    "comp": {
      "oneOf": [
        {
          "description": "item id",
          "type": "integer"
        },
        {
          "description": "comp name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "control": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "group": {
      "description": "control id",
      "type": "integer"
    },
    "index": {
      "description": "a position counted from 0 (the first is 0)",
      "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"
      ]
    },
    "mirror": {
      "description": "a property already present is added as a mirror; default true",
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "path": {
      "description": "uid (default: the selected properties); default: the selected properties; one of several alternative parameters",
      "type": "string"
    },
    "prop": {
      "description": "uid (default: the selected properties); default: the selected properties; one of several alternative parameters",
      "type": "integer"
    },
    "text": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "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.