Layout kit command
style.object.edit
Object Style Options
Changes an object style's name, base style, fill, stroke, paragraph style or text frame options, or redefines it from the selected object; the objects using it follow where they do not override it.
- Kit
- Layout 0.1.0 (.klayout)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
basedOn | string | null | no | an object style name; null for none |
fill | string | null | no | a swatch name; null leaves the fill out of the style |
fillTint | number | no | 0 to 1 |
fromSelection | boolean | no | Redefine Style: the style takes the first selected object's fill, stroke and text frame options |
name | string | no | |
paragraphStyle | string | null | no | a paragraph style name; null for none |
rename | string | no | the new name (every use follows) |
stroke | string | null | no | a swatch name; null leaves the stroke out of the style |
strokeTint | number | no | 0 to 1 |
strokeWeight | number | no | points |
textFrame | object | null | no | {columns, gutter, inset: [top, left, bottom, right], verticalJustification}; null leaves them out |
Call through layout_run
layout_run {
"path": "<file>.klayout",
"steps": [{ "command": "style.object.edit" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: basedOn, fill, fillTint, fromSelection, name, paragraphStyle, rename, stroke, strokeTint, strokeWeight, textFrame. layout_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"basedOn": {
"description": "an object style name; null for none",
"type": [
"string",
"null"
],
"x-khp-name": "objectName",
"x-khp-types": [
"Style"
]
},
"fill": {
"description": "a swatch name; null leaves the fill out of the style",
"type": [
"string",
"null"
],
"x-khp-name": "name",
"x-khp-types": [
"Swatch"
]
},
"fillTint": {
"description": "0 to 1",
"type": "number"
},
"fromSelection": {
"description": "Redefine Style: the style takes the first selected object's fill, stroke and text frame options",
"type": "boolean"
},
"name": {
"type": "string",
"x-khp-name": "objectName",
"x-khp-types": [
"Style"
]
},
"paragraphStyle": {
"description": "a paragraph style name; null for none",
"type": [
"string",
"null"
],
"x-khp-name": "paragraphName",
"x-khp-types": [
"Style"
]
},
"rename": {
"description": "the new name (every use follows)",
"type": "string"
},
"stroke": {
"description": "a swatch name; null leaves the stroke out of the style",
"type": [
"string",
"null"
],
"x-khp-name": "name",
"x-khp-types": [
"Swatch"
]
},
"strokeTint": {
"description": "0 to 1",
"type": "number"
},
"strokeWeight": {
"description": "points",
"type": "number"
},
"textFrame": {
"description": "{columns, gutter, inset: [top, left, bottom, right], verticalJustification}; null leaves them out",
"type": [
"object",
"null"
]
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (layout_commands through @kition/[email protected], built from KitionAI/kition-layout@8767a18). As data: commands.jsonl.