Vector kit command
object.setProps
Object Properties
Sets object properties on ids or the selection: name, visibility, lock, opacity, blend mode, isolation, knockout and custom data attributes.
- 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 | |
data | object | no | {key: "value" | null (removes it)} (the object's own data, SVG data-* attributes: {pivot: "100,180"} is data-pivot; file.node → attrs.data); removes it; the object's own data, SVG data-* attributes: {pivot: "100,180"} is data-pivot; file.node → attrs.data |
dataBase64 | string | no | read by the command beside its listed parameters |
id | integer | no | object ID |
ids | integer[] | no | object IDs |
isolate | boolean | no | |
item | string | no | read by the command beside its listed parameters |
knockout | "on" | "off" | "neutral" | boolean | no | |
knockoutShape | boolean | no | |
locked | boolean | no | |
name | string | no | |
opacity | integer | no | 0 to 100 |
target | string | no | "object" (default) or "contents": the objects themselves, or what their groups and layers hold |
visible | boolean | no |
Call through vector_run
text
vector_run {
"path": "<file>.kvector",
"steps": [{ "command": "object.setProps" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: blend, data, dataBase64, id, ids, isolate, item, knockout, knockoutShape, locked, name, opacity, target, visible. 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"
},
"data": {
"additionalProperties": true,
"description": "{key: \"value\" | null (removes it)} (the object's own data, SVG data-* attributes: {pivot: \"100,180\"} is data-pivot; file.node → attrs.data); removes it; the object's own data, SVG data-* attributes: {pivot: \"100,180\"} is data-pivot; file.node → attrs.data",
"properties": {
"key": {
"description": "\"value\" | null"
}
},
"type": "object"
},
"dataBase64": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"id": {
"description": "object ID",
"type": "integer",
"x-khp-types": [
"Node"
]
},
"ids": {
"description": "object IDs",
"items": {
"type": "integer"
},
"type": "array",
"x-khp-types": [
"Node"
]
},
"isolate": {
"type": "boolean"
},
"item": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"knockout": {
"oneOf": [
{
"enum": [
"on",
"off",
"neutral"
],
"type": "string"
},
{
"type": "boolean"
}
]
},
"knockoutShape": {
"type": "boolean"
},
"locked": {
"type": "boolean"
},
"name": {
"type": "string"
},
"opacity": {
"description": "0 to 100",
"type": "integer"
},
"target": {
"description": "\"object\" (default) or \"contents\": the objects themselves, or what their groups and layers hold",
"type": "string"
},
"visible": {
"type": "boolean"
}
},
"returns": "attrs.data)}",
"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.