Vector kit command

appearance.addEffect

Add Effect

Applies a live effect with its parameters to the targets or one of their appearance items (the same as effect.apply).

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.addEffect
NameTypeRequiredDescription
contentsanynocontents: the objects inside groups and layers; one of several alternative parameters
effectstringnothe effect's catalogue id (`stylize.dropShadow`)
idinteger | stringnoan object ID, or the effect's catalogue name
idsinteger[]noobject IDs
itemanynoappearance item index|null (apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object); apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object
paramsobjectnomissing keys take the dialog defaults
targetstringnolike object; one of several alternative parameters

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: contents, effect, id, ids, item, params, target. 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": {
    "contents": {
      "description": "contents: the objects inside groups and layers; one of several alternative parameters"
    },
    "effect": {
      "description": "the effect's catalogue id (`stylize.dropShadow`)",
      "type": "string"
    },
    "id": {
      "description": "an object ID, or the effect's catalogue name",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "description": "appearance item index|null (apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object); apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object"
    },
    "params": {
      "additionalProperties": true,
      "description": "missing keys take the dialog defaults",
      "type": "object"
    },
    "target": {
      "description": "like object; one of several alternative parameters",
      "type": "string"
    }
  },
  "returns": "{ids, index, item}",
  "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.