Vector kit command

appearance.setItem

Appearance Item

Edits one fill or stroke item of the targets' appearance stacks by index: its paint, opacity, blend, visibility or weight.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of appearance.setItem
NameTypeRequiredDescription
blendstringno
colorstringnoas paint.setFill; one of several alternative parameters
gradientobjectno
idintegernoobject ID
idsinteger[]noobject IDs
indexintegerno
keepModelbooleannoread by the command beside its listed parameters
nonebooleanno
opacityintegerno0 to 100
paintobjectnoread by the command beside its listed parameters
swatchstringno
target"object" | "contents"no
tintintegernoread by the command beside its listed parameters
visiblebooleanno
weightnumbernopoints; strokes

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "appearance.setItem" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: blend, color, gradient, id, ids, index, keepModel, none, opacity, paint, swatch, target, tint, visible, weight. vector_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": {
    "blend": {
      "type": "string"
    },
    "color": {
      "description": "as paint.setFill; one of several alternative parameters",
      "type": "string"
    },
    "gradient": {
      "additionalProperties": true,
      "type": "object"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "index": {
      "type": "integer"
    },
    "keepModel": {
      "description": "read by the command beside its listed parameters",
      "type": "boolean"
    },
    "none": {
      "type": "boolean"
    },
    "opacity": {
      "description": "0 to 100",
      "type": "integer"
    },
    "paint": {
      "additionalProperties": true,
      "description": "read by the command beside its listed parameters",
      "type": "object"
    },
    "swatch": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch",
        "Pattern"
      ]
    },
    "target": {
      "enum": [
        "object",
        "contents"
      ],
      "type": "string"
    },
    "tint": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "visible": {
      "type": "boolean"
    },
    "weight": {
      "description": "points; strokes",
      "type": "number"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.