Motion kit command

shape.toolOptions

Shape Tool Options

The Tools bar's options for the shape tools and the Pen: Tool Creates Shape / Tool Creates Mask (`createsMask`) and the Fill and Stroke new shapes get (the keys of [`paint_p`]); `reset` restores the defaults first. Reports the options.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
yes

Parameters

Parameters of shape.toolOptions
NameTypeRequiredDescription
createsMaskbooleannoTool Creates Mask with a shape layer selected
fillstring | number[] | booleannoa colour, "#rrggbb" or [r, g, b] (0 to 1), or false for none
fillAngleanynodeg
fillBlendstringnoblend mode
fillGradientany[]no
fillOpacitynumbernopercent
fillType"none" | "solid" | "linear" | "radial"no
resetbooleanno
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
strokeWidthnumbernopixels

Call through motion_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: createsMask, fill, fillAngle, fillBlend, fillGradient, fillOpacity, fillType, reset, stroke, strokeAngle, strokeBlend, strokeGradient, strokeOpacity, strokeType, strokeWidth. 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": {
    "createsMask": {
      "description": "Tool Creates Mask with a shape layer selected",
      "type": "boolean"
    },
    "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": "blend mode",
      "type": "string"
    },
    "fillGradient": {
      "type": "array"
    },
    "fillOpacity": {
      "description": "percent",
      "type": "number"
    },
    "fillType": {
      "enum": [
        "none",
        "solid",
        "linear",
        "radial"
      ],
      "type": "string"
    },
    "reset": {
      "type": "boolean"
    },
    "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": "pixels",
      "type": "number"
    }
  },
  "returns": "the options",
  "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.