Motion kit command

shape.newPath

Pen Tool (Shape Path)

Pen tool on a shape layer: a new Shape group ("Shape n" with Path 1 and the Tools bar's Stroke and Fill unless given) on the given / selected shape layer, or on a new shape layer when none is given. Vertices are in the layer's space, or comp space (`space: "comp"`, the default for a new layer).

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 shape.newPath
NameTypeRequiredDescription
closedbooleanno
compinteger | stringnoread by the command beside its listed parameters
fillstring | number[] | booleannoa colour, "#rrggbb" or [r, g, b] (0 to 1), or false for none
fillAngleanynodeg
fillBlendstringnoa blend mode name (normal, multiply, …)
fillGradientany[]no
fillOpacitynumbernopercent, 0 to 100
fillType"none" | "solid" | "linear" | "radial"no
inTangentsnumber[][]no[[x, y], …]
layerinteger | stringno
namestringnowithout layer: a new shape layer of that name
outTangentsnumber[][]no[[x, y], …]
space"comp" | "layer"no
strokestring | number[] | booleannoa colour, "#rrggbb" or [r, g, b] (0 to 1), or false for none
strokeAngleanyno
strokeBlendstringnoa blend mode name (normal, multiply, …)
strokeGradientanyno
strokeOpacitynumbernopercent, 0 to 100
strokeType"none" | "solid" | "linear" | "radial"no
strokeWidthnumbernodefault the Tools bar's, shape.toolOptions
verticesany[]no

Call through motion_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: closed, comp, fill, fillAngle, fillBlend, fillGradient, fillOpacity, fillType, inTangents, layer, name, outTangents, space, stroke, strokeAngle, strokeBlend, strokeGradient, strokeOpacity, strokeType, strokeWidth, vertices. 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": {
    "closed": {
      "type": "boolean"
    },
    "comp": {
      "description": "read by the command beside its listed parameters",
      "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"
      ]
    },
    "fill": {
      "description": "a colour, \"#rrggbb\" or [r, g, b] (0 to 1), or false for none",
      "oneOf": [
        {
          "description": "#rrggbb",
          "type": "string"
        },
        {
          "description": "[r, g, b], 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "false for none",
          "type": "boolean"
        }
      ]
    },
    "fillAngle": {
      "description": "deg"
    },
    "fillBlend": {
      "description": "a blend mode name (normal, multiply, …)",
      "type": "string"
    },
    "fillGradient": {
      "type": "array"
    },
    "fillOpacity": {
      "description": "percent, 0 to 100",
      "type": "number"
    },
    "fillType": {
      "enum": [
        "none",
        "solid",
        "linear",
        "radial"
      ],
      "type": "string"
    },
    "inTangents": {
      "description": "[[x, y], …]",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "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"
      ]
    },
    "name": {
      "description": "without layer: a new shape layer of that name",
      "type": "string"
    },
    "outTangents": {
      "description": "[[x, y], …]",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "space": {
      "enum": [
        "comp",
        "layer"
      ],
      "type": "string"
    },
    "stroke": {
      "description": "a colour, \"#rrggbb\" or [r, g, b] (0 to 1), or false for none",
      "oneOf": [
        {
          "description": "#rrggbb",
          "type": "string"
        },
        {
          "description": "[r, g, b], 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "false for none",
          "type": "boolean"
        }
      ]
    },
    "strokeAngle": {},
    "strokeBlend": {
      "description": "a blend mode name (normal, multiply, …)",
      "type": "string"
    },
    "strokeGradient": {},
    "strokeOpacity": {
      "description": "percent, 0 to 100",
      "type": "number"
    },
    "strokeType": {
      "enum": [
        "none",
        "solid",
        "linear",
        "radial"
      ],
      "type": "string"
    },
    "strokeWidth": {
      "description": "default the Tools bar's, shape.toolOptions",
      "type": "number"
    },
    "vertices": {
      "type": "array"
    }
  },
  "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.