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’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
blend | string | no | |
color | string | no | as paint.setFill; one of several alternative parameters |
gradient | object | no | |
id | integer | no | object ID |
ids | integer[] | no | object IDs |
index | integer | no | |
keepModel | boolean | no | read by the command beside its listed parameters |
none | boolean | no | |
opacity | integer | no | 0 to 100 |
paint | object | no | read by the command beside its listed parameters |
swatch | string | no | |
target | "object" | "contents" | no | |
tint | integer | no | read by the command beside its listed parameters |
visible | boolean | no | |
weight | number | no | points; 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.