Swatches: Add to Swatches refuses a gradient or pattern in a library color group

Color groups hold solid colors only, as swatch.new, swatch.newGroup and
swatch.move already require. swatch.library.add now refuses a library
color group that holds a gradient or pattern swatch, with the error
swatch.move gives, and leaves the document unchanged. Recolor Artwork
rewrites a group by position, so a non-solid member would shift the
colors that follow it.
This commit is contained in:
dotCooCoo
2026-11-15 17:06:48 -08:00
parent 3336c00194
commit 005cde50f4
3 changed files with 39 additions and 2 deletions
+2 -1
View File
@@ -4739,7 +4739,8 @@ them (`id`, `name`, `category`, `count`) and `swatch.library.get {library}` retu
in the `swatch.list` shape (`library` is an id or a name). `swatch.library.add {library, names?}` copies swatches
into the document as one undo step: a colour group's name brings the whole group, a swatch's name the swatch alone,
no names the whole library; swatches the document already has (same name and paint) are reported under `existing`
and not added again. `apply: "fill"|"stroke"` also applies the first one, in the same undo step (what clicking a
and not added again. Color groups hold solid colors only: an add that would bring a gradient or pattern swatch
into a color group is refused, and the document is left unchanged. `apply: "fill"|"stroke"` also applies the first one, in the same undo step (what clicking a
swatch in the library panel does). The pattern libraries Geometric Patterns (`geometric-patterns`), Grit Textures
(`grit-textures`: seamless black grain, grit, sand, speckle, stipple, scratch and fleck tiles) and Optical Effects
(`optical-effects`: VectorCraft's own black wave, ring, warped-check, pinched-stripe, chevron and lens tiles),