Merge main into feat/recolor-edit-base-color-menus

This commit is contained in:
dotCooCoo
2026-11-15 10:53:54 -08:00
166 changed files with 8416 additions and 447 deletions
+119 -13
View File
@@ -3957,8 +3957,9 @@ already walks Image Trace. Short agent entry points:
group that draws with that stroke paint; the stroke's weight is not compared. An edge draws with the paint of its
topmost stroke that is shown, with paint, above 0 pt and not fully transparent, and with none when the edge is fully
transparent or has no such stroke. Each click of a double-click or triple-click runs as it
arrives and is its own undo step. `match` is the paint the face or edge had before the first of the double-click's
two clicks or the triple-click's three that painted it, or before the double-click when the triple-click's double-click
arrives and is its own undo step when it changes a paint. `match` is the paint the face or edge had before the first of
the double-click's two clicks or the triple-click's three that painted it (including a click whose drag or release crossed it), or
before the double-click when the triple-click's double-click
reached it, so the clicks before the last do not change what it matches;
a first click that made the Live Paint group counts when the face it filled is the clicked face. Hidden faces and edges are not painted. A face that
the Bucket fills has all its fills replaced by one fill with the paint, shown, fully opaque and blending normally, in the
@@ -3972,8 +3973,10 @@ already walks Image Trace. Short agent entry points:
`livePaint.fill {scope}` and `livePaint.strokeEdge {scope}` take `scope` as `"one"` (the default), `"connected"` or
`"samePaint"`; any other value is an error and changes nothing. `match` is a paint in the model JSON that
`document.node {id}` writes for an appearance's paints (`{"type": "none"}` for none), taken only with a scope that compares paints, and
defaults to the face's fill or the stroke paint the edge draws with. `livePaint.fill` refuses a `scope` other than `"one"` with
`points`. Both replies add `count`, the number of faces or edges the click reaches, including those that already had the
defaults to the face's fill or the stroke paint the edge draws with. `livePaint.strokeEdge {scope: "connected", through}`
takes `through`, at most 4096 edge ids that the join counts as drawing with `match` whatever they draw with now; the tool
passes the edge the double-click's first click painted when that edge drew with `match` before the click. `through` with another scope, or one that is not an array of ids, is an error. `livePaint.fill` refuses
a `scope` other than `"one"` with `points`. Both replies add `count`, the number of faces or edges the click reaches, including those that already had the
paint.
With the Live Paint Bucket selected and no drag in progress, Left and Right without Shift, Alt or Cmd/Ctrl (which
keep their shortcuts) run `paint.setFill {swatch, ids: []}` (or
@@ -4585,6 +4588,18 @@ of the rows that are not excluded, in row order, and Save Prominent Colors saves
{"name":"run_command","arguments":{"command":"recolor.weigh","params":{"map":[{"from":["rgb 255 0 0","rgb 128 0 204"],"to":"#00ff00"},{"from":["rgb 0 0 255"],"to":"#ffff00"}],"weights":[1,1]}}}
```
The Assign tab's Find button (the dialog field `findColors`) finds the colors of the selected rows in the art
([Advanced recolor options overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/learn-color-basics/edit-colors-dialog-overview.html)).
While it is on and rows are selected, the art of those rows shows as the preview shows it (its current colors with
Preview off), and the rest of the selected art shows dimmed; a second click shows the art as before
([archived help, Recolor Artwork](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=149)).
As VectorCraft's own rules, a dimmed color is a 25% tint of its current color, or the nearest lighter tint (in steps
of 1%) when that tint is a color a selected row lists (`recolor.apply` gives each current color of the other rows
and the preserved colors that tint, then recolors the selected rows), a color that a selected row also lists is not
dimmed, so art that mixes colors dims only its other colors, and nothing is dimmed on the Edit tab or with no row
selected. Find changes only what the canvas shows: it records no undo step, Cancel leaves the art as it was, and OK
applies every row to the art as it does with Find off.
The `recolor.*` commands refuse parameters of the wrong form. A `limitTo` or `method` that is not a string gets the
error for an unknown library or method. Other wrong-form parameters get an error that names them.
`includeImages`, `includePatterns`, a row's `exclude`, `order`, `saturationBrightness` and the `white`, `black` and
@@ -5920,7 +5935,11 @@ for its colour mode). `profiles` (`all`, `destination`, or `taggedSource` for a
the document's CMYK profile, RGB as sRGB, grey with the sRGB tone curve (PDF/A, PDF/X-3 and PDF/X-4 files are
always tagged, whatever `profiles` says). A CMYK image that keeps its numbers carries the CMYK profile it embeds
with `all` and `taggedSource`, and in PDF/A, PDF/X-3 and PDF/X-4 unless `profiles` is `destination`; PDF/X-1a
images are always untagged CMYK. `outputIntent` embeds a profile as the file's
images are always untagged CMYK. Left unset (the default; `"default"` unsets it over a preset, while `null` keeps the
preset's value), `profiles` writes device colours and gray and RGB images keep the profiles they carry (not in
PDF/X-1a). Set to `none`, it also writes every image without the profile it carries, and a JPEG kept as it is without
its `ICC_PROFILE` segments, its other segments and compressed samples unchanged; PDF/A, PDF/X-3 and PDF/X-4 files keep
the profiles they tag images with. The Save PDF dialog lists the unset value as Default. `outputIntent` embeds a profile as the file's
`/GTS_PDFX` output intent with `outputCondition`, `outputConditionId` and `registry`, and `trapped` sets `/Trapped`
(PDF/A files keep their own output intent). Type is written as selectable, searchable text in embedded subset fonts
with a ToUnicode map (fonts whose licence forbids embedding stay outlines, with a warning); `advanced: {outlineText:
@@ -7231,7 +7250,9 @@ to}]}`.
`edit.pasteWithoutFormatting` sets the labels of a pasted graph in a new graph's label character style and
paragraph attributes, keeping each label's alignment and where it starts. The pasted graph no longer keeps its labels' character and
paragraph formats, so a later `graph.setData` or `graph.setType` sets the labels the same way. The rest of the
graph's art is pasted as it was copied.
graph's art is pasted as it was copied. A pie's legend labels in its wedges are white on a dark wedge and black on a
light one, by the wedge colors as pasted: a wedge linked to a swatch merged with the document's takes that swatch's
color first.
A global or spot swatch whose name the document gives another colour is a conflict: `clipboard.conflicts` lists
them, and `swatchConflict` answers: `"merge"` (the default: the objects take the document's swatch), `"add"` (the
@@ -8551,7 +8572,9 @@ becomes an asset (or one asset with `multiple: false`).
### 3D assets
Asset Export's menu item Export 3D Object (`assets.add3D {ids?, format?}`) collects each selected object (or `ids`)
Asset Export's menu item Export 3D Object and the 3D and Materials panel's Export 3D Object button
(`assets.add3D {ids?, format?}`; the button passes the ids of the selected objects that have a 3D effect and then shows
the Asset Export panel, [three-d.md](three-d.md#3d-and-materials-panel)) collect each selected object (or `ids`)
that carries Extrude & Bevel, Revolve, Inflate or Rotate as a 3D asset, named after the object; an object already
collected as a 3D asset keeps it, and an object without such an effect is refused. A 3D asset's Format is `usda` (the
default), `usdz`, `gltf` or `obj`; the panel shows a Format row for the 3D assets it would export, and
@@ -8675,8 +8698,9 @@ is offered only for a file with slices and applies to either choice. File › Pl
file placed without Link, and so does a file dropped on the canvas with Shift held. The dialog starts from the
choices made last, at first Convert Layers to Objects without hidden layers, with Import Slices. A file with fewer
than two layers and no slices, a file placed with Link, and `document.open` and `file.place` run as commands don't
show it. Several files placed together without Link load the place cursor without asking, and each PSD or PSB file
among them comes in with the choices made last.
show it. Several files placed together without Link load the place cursor without asking. With Show Import Options
on, each PSD or PSB file among them that would show the dialog shows it when it is clicked or dragged; with it off,
each one comes in with the choices made last.
```json
{"name":"run_command","arguments":{"command":"file.place","params":{"path":"/tmp/poster.psd","layers":true,"hiddenLayers":true}}}
@@ -9169,7 +9193,11 @@ indent and bullet or number again.
```
`type.createOutlines` (Type › Create Outlines) makes a group with a path per glyph, ruby glyph and underline or
strikethrough bar, each painted as its characters are. The type object's own fills and strokes (the items around the
strikethrough bar, each painted as its characters are. When the type is scaled unevenly, sheared or flattened, each of
these paths takes only its characters' fill, and a path filled with the stroke's paint follows it: the area the
characters' stroke paints around the glyphs before the type's transform (dashes, caps, joins and alignment), transformed
with them as the canvas draws it. Under a move, rotation, reflection or uniform scale the paths keep a live stroke, its
weight and dashes scaled with the type. The type object's own fills and strokes (the items around the
Appearance panel's Characters row, not the characters' formatting) go on paths of the type's whole outline: the items
below the Characters row on one path under the glyph paths, the others on one path over them, in their order and with
their opacity, blend mode, effects and stroke settings. Their gradients that are not placed are fixed to the type's
@@ -9447,7 +9475,7 @@ a pair. The setting works only with a Kinsoku Set: with Kinsoku Set None the par
and the menu item is unavailable. Off by default, for new type and for paragraphs saved before the option. It is saved
with the paragraph (`bunri_kinshi` in `para`) only when on, paragraph styles carry it (Paragraph Style Options › East
Asian Composition Settings), and Reset Panel turns it off. A value that is not true or false is refused. One undo
step. `.ai` editing data does not hold it, and a save reports a paragraph with it on and a pair in it as left out. The help page:
step. An `.ai` save writes it with each paragraph, under Kinsoku Set None too, and it reopens as set. The help page:
https://helpx.adobe.com/illustrator/using/formatting-asian-characters.html
```json
@@ -10062,6 +10090,30 @@ A digit the font lacks comes from a fallback font. Default and saved only when s
{"name":"run_command","arguments":{"command":"text.setFormat","params":{"digits":"hindi"}}}
```
## Adjust Diacritic Position
`text.setFormat {diacriticHorizontal?, diacriticVertical?}` (the selected type, or `ids`) and
`text.setRangeStyle {id, start, end, diacriticHorizontal?, diacriticVertical?}` (a range) move the characters' diacritical
marks relative to their letters, as the Character panel's Adjust Horizontal and Adjust Vertical Diacritic Position do
([the reference, page 549](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=549)).
The units, range and direction are VectorCraft's own rules: each value is in thousandths of an em of the characters' size,
from -1000 to 1000; a positive horizontal value moves the marks right and a positive vertical value moves them up. Only
glyphs the font classes as marks (GDEF class 3) move; the letters keep their places and advances, and a font without
mark classes moves nothing. An Arabic harakat or a Hebrew point styled apart from its letter takes its own values;
other marks take the values of their letter. Setting one value leaves the other as it is. Both are 0 by default and
saved only when not 0, and character styles carry them (`charStyle.new`, `charStyle.setAttrs` and `charStyle.edit`
refuse a value outside the range). A value that is not a number is refused with `` `diacriticHorizontal` must be a
number ``, and one outside the range with `` `diacriticHorizontal` must be from -1000 to 1000 ``, naming the key. One
undo step, and a `text.setFormat` call that gives the values the characters already have records none. With Show Middle Eastern
Options on, the Character panel shows both fields, blank where the selected characters differ, with -200, -100, -50,
0, 50, 100 and 200 in their menus, and a value typed past either end sets that end; Reset Panel sets both to 0.
Character Style Options shows both fields in Advanced Character Formats. The canvas, PDF export and outlines draw the
moved marks; SVG export writes type with a moved mark as outlines.
```json
{"name":"run_command","arguments":{"command":"text.setRangeStyle","params":{"id":12,"start":2,"end":4,"diacriticVertical":150}}}
```
## Font height reference
`text.setFormat {fontHeightReference: "emBox"|"capHeight"|"xHeight"|"icfBox"}` (the selected type, or `ids`) and
@@ -10383,7 +10435,7 @@ attribute map in one undo step. `to` is trimmed and must be unique. The command
while preserving local overrides; Undo/Redo restores the definition and its users. The `charStyleOptions`
dialog exposes `name`, `font_family`, `font_style`, `size`, `leading`, `kerning`, `tracking`, `case`,
`position`, `underline`, `strikethrough`, `charAlign`, `h_scale`, `v_scale`, `baseline_shift`, `tcyUpDown`,
`tcyLeftRight`, `rotation`, `akiLeft`, `akiRight`, `tsume`, `language`, `fill`, `fill_tint`, `stroke`, `stroke_tint`, `stroke_width`, `overprint_fill`, `overprint_stroke`,
`tcyLeftRight`, `rotation`, `akiLeft`, `akiRight`, `tsume`, `diacriticHorizontal`, `diacriticVertical`, `language`, `fill`, `fill_tint`, `stroke`, `stroke_tint`, `stroke_width`, `overprint_fill`, `overprint_stroke`,
`ot_figure`, `ot_position`, `ot_liga`, `ot_calt`, `ot_dlig`, `ot_swsh`, `ot_salt`, `ot_titl`, `ot_ordn`, `ot_frac`,
`ot_sets`, `section` (`general`, `basic`, `advanced`, `color` or `opentype`), and `preview`. An empty field leaves its
attribute unset. `leading` and `kerning` also accept `Auto` to store an explicit automatic value.
@@ -10392,7 +10444,9 @@ Advanced Character Formats holds `h_scale` and `v_scale` (percent, 1 to 10000),
-1296 to 1296, as `text.setRangeStyle` takes them; an explicit 0 stays distinct from unset), `rotation` (degrees, stored from -180 to 180), Insert Aki Left and Right `akiLeft` and `akiRight` (thousandths of
an em, with the Character panel's 0, 250, 500 and 1000 in their menus; a value typed below 0 or past 1000 sets 0 or
1000), Tsume `tsume` (percent, with the Character panel's 0, 25, 50, 75 and 100 in its menu; a value typed below 0 or
past 100 sets 0 or 100; an explicit 0 stays distinct from unset) and `language` (a name or tag from Document
past 100 sets 0 or 100; an explicit 0 stays distinct from unset), Adjust Horizontal and Vertical Diacritic Position
`diacriticHorizontal` and `diacriticVertical` (thousandths of an em, with the Character panel's -200, -100, -50, 0, 50,
100 and 200 in their menus; a value typed below -1000 or past 1000 sets -1000 or 1000) and `language` (a name or tag from Document
Setup's languages; English: USA stores the explicit default `null`, and a tag not in the list that the style
already has is kept). Language sets the language the characters are shaped in; it does not change hyphenation
or spelling.
@@ -12511,6 +12565,58 @@ there is no step. → `{symbols: [name…], ids: [instance id…], skipped: [{la
{"name":"run_command","arguments":{"command":"addon.document.symbolsFromLayers","params":{"replace":true}}}
```
## Packaging Tools add-on
Packaging Tools is a built-in add-on for the dielines of boxes and other folded packaging. Its commands are
`addon.packaging.setRole`, `addon.packaging.roles` and `addon.packaging.setRoleSwatch`. In the desktop app, Object ›
Plug-ins › Packaging Tools › Fold Lines opens the Fold Lines panel, and Make Cut Line, Make Crease Line, Make Partial Cut
Line and Make Perforation Line run `addon.packaging.setRole` on the selection.
### Fold line roles
A fold line has one of four roles: Cut (`cut`), Crease (`crease`), Partial Cut (`partialCut`) and Perforation
(`perforation`). A path, compound path or live shape has a role when its top stroke is painted with the role's swatch, at
any tint. Each document has a role table that names the swatch of each role, stored in the document under
`packagingRoles` as `{"cut": "Cut", "crease": "Crease", "partialCut": "Partial Cut", "perforation": "Perforation"}`. A
role the table leaves out, or names with something other than a string, uses the swatch named after the role. When
`swatch.edit` renames a role's swatch, the table names the swatch by its new name and the role stays with it; another
role whose swatch did not exist yet and had that name moves to a new name ("Crease 2"). When `swatch.edit` turns Global
off for a role's swatch, which unlinks its strokes, the role moves to a new name, and the next `addon.packaging.setRole`
makes that swatch. When `swatch.merge` merges a role's swatch into a global swatch that carries no role, the kept swatch
takes the role. Native files keep the table and the strokes. PDF prints a role line on the separation of its swatch when
the swatch is a spot color, as the default role swatches are; a role carried by a global process color is written as an
ordinary color with no separation of its own. SVG, DXF and HP-GL keep the stroke's color, so the default role swatches
come out as four colors, and as four pens in HP-GL without a pen table.
`addon.packaging.setRole` (`{role: cut|crease|partialCut|perforation|none, ids?, overprint?: true}`) gives the role to
each path, compound path and live shape among the objects (the selection by default), through groups and clip groups.
Objects that are locked or hidden, in a locked or hidden group or layer, or on a locked artboard are left out and
counted as skipped, also when `ids` names them. The top stroke is painted with the role's swatch at 100% and shown if
it was hidden, a path without a stroke gets a 1 pt stroke, and the stroke overprints unless `overprint` is false. When
the document lacks the role's swatch, the command makes it as a global spot swatch in the document's color mode: Cut 100%
magenta, Crease 100% cyan, Partial Cut 100% yellow and Perforation 50% magenta and 50% cyan (VectorCraft's own defaults).
When a color group, or a swatch that can't carry a role such as a process color that is not global, has the swatch's
name, the swatch is named "Cut 2" (and so on) and the role table names it. `none` takes the role away: the stroke keeps
the color it shows, no longer linked to the swatch, and stops overprinting. Text, images, symbol instances and other
objects are skipped and counted. The command fails with an unknown role and when the objects hold no path it can change. One undo
step, none when nothing changes. Result: `{ids, changed, skipped}`.
`addon.packaging.roles` (`{ids?}`) returns `{roles: [{role, name, swatch, exists, count}], scope, selected}`: each role's
swatch, whether the document has it, and how many of the objects have the role. It counts the selection, or every object
of the document while nothing is selected and `ids` is left out (`scope` says which). Locked and hidden objects are
counted in every scope, and an object is counted once when both it and its group are given. The Fold Lines panel shows
these counts; clicking a role gives the selected paths that role. With nothing selected the panel says so.
`addon.packaging.setRoleSwatch` (`{role, swatch}`) makes another global or spot color swatch carry the role. Objects
stroked with the old swatch keep their color and no longer have the role. It fails with a missing swatch, a gradient or
pattern swatch, a process color that is not global, a tint swatch, `[None]`, `[Registration]` and a swatch another role
has. One undo step, none when the role already has that swatch. Result: `{role, swatch, changed}`. The Fold Lines
panel's menu opens it as Role Swatches….
```json
{"name":"run_command","arguments":{"command":"addon.packaging.setRole","params":{"role":"crease"}}}
```
## Image Tools add-on
Image Tools is a built-in add-on for placed images: its commands are `addon.image.removeBackground`,