Photo kit command

gradient.presets.edit

Edit Gradient Presets

Edits the preset library (`action`: rename, delete, move, newGroup, renameGroup, deleteGroup on `preset`/`group`); app-wide, not the document.

Kit
Photo 0.1.0 (PSD, PSB, or .kphoto)
Changes the document
yes

Parameters

Parameters of gradient.presets.edit
NameTypeRequiredDescription
action"rename" | "delete" | "move" | "newGroup" | "renameGroup" | "deleteGroup"no
coalescestringnoMerges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.
groupstringnonarrows the lookup; the group for renameGroup/deleteGroup
indexintegernomove
namestringnorename: new name; newGroup/renameGroup: group name
presetstring | string[]noname|[names] (rename/delete/move); rename/delete/move
tostringnogroup (move); move

Call through photo_run

text
photo_run {
  "path": "<file>.psd",
  "steps": [{ "command": "gradient.presets.edit" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: action, coalesce, group, index, name, preset, to. 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": {
    "action": {
      "enum": [
        "rename",
        "delete",
        "move",
        "newGroup",
        "renameGroup",
        "deleteGroup"
      ],
      "type": "string"
    },
    "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"
    },
    "group": {
      "description": "narrows the lookup; the group for renameGroup/deleteGroup",
      "type": "string"
    },
    "index": {
      "description": "move",
      "type": "integer"
    },
    "name": {
      "description": "rename: new name; newGroup/renameGroup: group name",
      "type": "string"
    },
    "preset": {
      "description": "name|[names] (rename/delete/move); rename/delete/move",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      ]
    },
    "to": {
      "description": "group (move); move",
      "type": "string"
    }
  },
  "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.