Vector kit command

paint.freeform.setPoint

Edit Freeform Point

Edits a freeform gradient point: position, colour, opacity or spread.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of paint.freeform.setPoint
NameTypeRequiredDescription
atnumber[]nodocument coordinates
colorstringno
idintegernoobject ID
idsinteger[]noobject IDs
indexintegernoa position counted from 0 (the first is 0); default: the selected point
iteminteger | nullno
opacitynumberno0..1, or 0..100
spreadnumberno0..1, or 0..100 %
strokebooleannodefault: the targeted item's kind, else the active proxy
targetstringno"object" (default) or "contents": the objects themselves, or what their groups and layers hold

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "paint.freeform.setPoint" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: at, color, id, ids, index, item, opacity, spread, stroke, target. 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": {
    "at": {
      "description": "document coordinates",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "color": {
      "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"
      ]
    },
    "index": {
      "description": "a position counted from 0 (the first is 0); default: the selected point",
      "type": "integer"
    },
    "item": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "opacity": {
      "description": "0..1, or 0..100",
      "type": "number"
    },
    "spread": {
      "description": "0..1, or 0..100 %",
      "type": "number"
    },
    "stroke": {
      "description": "default: the targeted item's kind, else the active proxy",
      "type": "boolean"
    },
    "target": {
      "description": "\"object\" (default) or \"contents\": the objects themselves, or what their groups and layers hold",
      "type": "string"
    }
  },
  "returns": "{index}",
  "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.