Merge pull request #8456 from dotCooCoo/feat/swatches-color-group-options

Swatches: Color Group Options renames the selected color group
This commit is contained in:
BFlat
2026-11-19 14:58:45 +07:00
committed by GitHub
46 changed files with 662 additions and 8 deletions
+5 -1
View File
@@ -150,7 +150,11 @@ those rows with `layer.delete` in the document the question was asked in. `layer
New swatches and colour groups: `ui.newSwatch {spot?, global?, group?}` opens the `newSwatch` dialog prefilled from the active
fill or stroke (fields as in `swatchOptions` plus `group`; a gradient or pattern only takes `name`) and
`ui.newColorGroup {swatches?}` opens `newColorGroup` (fields `name`, `fromArtwork`, `toGlobal`, `includeTints`,
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`.
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`. `ui.colorGroupOptions {group?}` opens
`colorGroupOptions` (fields `name`, `__group`, `__swatches`, `__index` and `__doc`) for `group`, or without it for the
color group selected alone in the Swatches panel; its `ui.dialog.confirm` runs `swatch.renameGroup`. A refused name keeps
the dialog open; when another document is active, or the color group at the group's place in the list no longer has the
name and swatches it opened with, the confirm closes the dialog and renames nothing.
The Color Picker is a dialog too: `engine.execute {command: "ui.colorPicker", params: {stroke?, color?}}` opens it for the fill (or stroke) proxy; `ui.dialog.set {field: "hex", value: "00FF00"}` (or `color`, `channel`, `webOnly`, `swatches`) then `ui.dialog.confirm` applies the colour through `paint.setFill` / `paint.setStroke`.