Photo kit command
filter.vanishingPoint
Vanishing Point…
Clones or pastes in perspective along defined `planes` (corners in px) (active pixel layer, inside the selection if any); `newLayer` keeps the result on its own layer.
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- yes
- Acts on
layer(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
clone | object[] | no | |
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
focalLength | number | no | pixels |
layer | integer | string | no | The layer: its id as inspect lists it, "#n" (the n-th layer of the image's top level as inspect lists it, counted from the top: "#1" is the top one), or its whole name when no other layer has it; the active layer by default. |
newLayer | boolean | no | |
paste | object[] | no | else the clipboard |
planes | any[] | no | [{"corners":[[x,y]×4]} | {"from":plane,"edge":"top|right|bottom|left","angle":deg=90,"depth":1}] |
target | string | object | no | Where the pixels go: "pixels" (the layer, by default), "mask", "quickMask", or {"channel": i}. |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "filter.vanishingPoint" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: clone, coalesce, focalLength, layer, newLayer, paste, planes, target. photo_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": {
"clone": {
"items": {
"additionalProperties": true,
"properties": {
"hardness": {
"default": 50,
"description": "0 to 100",
"type": "integer"
},
"opacity": {
"default": 100,
"description": "0 to 100",
"type": "integer"
},
"points": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"size": {
"default": 40,
"description": "pixels",
"type": "number"
},
"source": {
"items": {
"type": "number"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"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"
},
"focalLength": {
"default": 0,
"description": "pixels",
"type": "number"
},
"layer": {
"description": "The layer: its id as inspect lists it, \"#n\" (the n-th layer of the image's top level as inspect lists it, counted from the top: \"#1\" is the top one), or its whole name when no other layer has it; the active layer by default.",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-index": "#",
"x-khp-index-order": "reversed",
"x-khp-name": "name",
"x-khp-types": [
"Layer"
]
},
"newLayer": {
"default": false,
"type": "boolean"
},
"paste": {
"description": "else the clipboard",
"items": {
"additionalProperties": true,
"properties": {
"at": {
"description": "[u, v]; default [0.25,0.25]",
"items": {
"type": "number"
},
"type": "array"
},
"layer": {
"description": "an id",
"type": "integer"
},
"plane": {
"default": 0,
"type": "integer"
},
"width": {
"default": 0.5,
"description": "0 to 1",
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"planes": {
"description": "[{\"corners\":[[x,y]×4]} | {\"from\":plane,\"edge\":\"top|right|bottom|left\",\"angle\":deg=90,\"depth\":1}]",
"items": {},
"type": "array"
},
"target": {
"description": "Where the pixels go: \"pixels\" (the layer, by default), \"mask\", \"quickMask\", or {\"channel\": i}.",
"oneOf": [
{
"type": "string"
},
{
"additionalProperties": true,
"type": "object"
}
]
}
},
"type": "object",
"x-khp-position": "independent"
}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.