Photo kit command
slice.list
List Slices
Answers every slice (auto, layer-based and user): number, id, origin, name, rect, kind, layer, URL, alt, and whether slices are locked.
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "slice.list" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: coalesce. photo_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
locked | boolean | no | |
slices | object[] | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"locked": {
"type": "boolean"
},
"slices": {
"items": {
"additionalProperties": true,
"properties": {
"alt": {
"type": "string"
},
"background": {},
"cellText": {
"type": "string"
},
"id": {},
"kind": {
"type": "string"
},
"layer": {},
"message": {
"type": "string"
},
"name": {
"type": "string"
},
"number": {
"type": "integer"
},
"origin": {
"type": "string"
},
"rect": {},
"target": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"coalesce": {
"description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
"type": "string"
}
},
"returns": "{slices:[{number,id,origin:auto|layer|user,name,rect:[x,y,w,h],kind,layer,url,alt,…}], locked}",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (photo_commands through @kition/[email protected], built from KitionAI/kition-photo@abe3f30). As data: commands.jsonl.