Design kit command

fill.copy

Copy fill

Copies one fill of a layer (default the top one) so fill.paste can apply it.

Kit
Design 0.1.0 (.kdesign)
Changes the document
no
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of fill.copy
NameTypeRequiredDescription
idinteger | stringno
ids(integer | string)[]nothe first layer
indexintegernoa position counted from 0 (the first is 0); default the top fill

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "fill.copy" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: id, ids, index. design_run answers the step’s result in completed[i].result.

Result

Result of fill.copy
NameTypeRequiredDescription
blendstringno
colorobjectno
opacitynumberno
typestringno
visiblebooleanno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "blend": {
      "type": "string"
    },
    "color": {
      "additionalProperties": true,
      "properties": {
        "a": {
          "type": "number"
        },
        "b": {
          "type": "number"
        },
        "g": {
          "type": "number"
        },
        "r": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "opacity": {
      "type": "number"
    },
    "type": {
      "type": "string"
    },
    "visible": {
      "type": "boolean"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "the first layer",
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "index": {
      "description": "a position counted from 0 (the first is 0); default the top fill",
      "type": "integer"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (design_commands through @kition/[email protected], built from KitionAI/kition-design@abc7e16). As data: commands.jsonl.