Swatches: Add to Swatches brings a library color group with its gradient and pattern swatches

swatch.library.add no longer refuses a library color group that holds a
gradient or pattern swatch. main now adds a .ai library's pattern swatch
in its color group (#8081), and Recolor Artwork keeps a group's gradient
and pattern swatches at their places (#8556), so the group comes in
whole, each swatch at its place.
This commit is contained in:
dotCooCoo
2026-11-18 14:01:22 -08:00
parent f34f9e7bb8
commit fa87b41da1
3 changed files with 16 additions and 32 deletions
+1 -2
View File
@@ -5355,8 +5355,7 @@ 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. 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
and not added again. `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),