Save: read the images and placed documents in stored brush art

A native save now sets the stored brushes' art on the document while it
tells linked images from embedded ones and while it converts placed
documents for older versions, then writes the changed brushes back.

- A linked image shown only in a brush's art is saved as its preview, or
  with Include Linked Files as its file's bytes; an image key that the
  layers or a brush's art shows embedded keeps its full bytes.
- Saving for an older version replaces placed documents in a brush's art
  with groups of their art and its resources, before a precision rounds
  it, and the precision preview and PDF use the same conversion.
- Data Recovery copies count the images in brush art the same way.

Docs: docs/target-app-parity.md, docs/mcp.md.
This commit is contained in:
dotCooCoo
2026-11-14 17:26:17 -08:00
parent 895e9493d2
commit 9906fe2f62
11 changed files with 274 additions and 21 deletions
+4 -1
View File
@@ -7894,7 +7894,10 @@ or in `options` (`file.formatOptions {format}` lists them with their values):
- `separateArtboards: true` also writes each artboard of `range` (`"1-3, 5"`, default `"all"`) to
`<name>-<artboard>.<ext>` beside the file: that artboard and the art touching it. The result's `files` lists every
file written, the master file first (without a path: `files: [{name, dataBase64}]`). 3 artboards give 4 files.
- `includeLinked: true` keeps linked images' own pixels in the file (they stay linked), not just the previews.
- `includeLinked: true` keeps linked images' own pixels in the file (they stay linked), not just the previews. Linked
images in the art of the stored brushes count as those in the layers do, and an image key that the layers or a
brush's art shows embedded keeps its pixels either way. A `version` older than the current one saves the placed
documents in a brush's art as groups of the art they show.
- `embedProfiles` (default true) carries the ICC profiles the document is tagged with that were loaded from files;
opening the file installs them where they are missing (a warning names one that can't be used).
- `pdfCompatible`: native files (default true) also carry a PDF of every artboard (`pdf` in the file). This makes saves
+1
View File
@@ -1886,6 +1886,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- On the web, when a document opens with linked files that can't be read and linked files that changed on disk (Update Links: Manually), the status bar shows the line about the unreadable files, and the line about the changed files is the first of the notes its hover lists, ahead of the open's notes. With Ask When Modified the update question opens and the line about the unreadable files stays (`a_web_open_with_unreadable_and_modified_links_keeps_both_lines`).
- Linked images and placed documents kept only in symbols, graph designs, patterns or opacity masks are listed in the Links panel after the layers' own, one row per stored object, with their status in its Missing and Modified filters, in Check Links, in the missing and modified files reported when a document opens, in the link watch and in Find in Folder; Relink, Update, Embed, Placement Options and Link Info act on them, and Go To says they have no place on the canvas. Opening a document gives such an object whose id is 0 or repeats another object's a new id.
- Linked images and placed documents in the art of the stored brushes (a scatter or art brush's art, a pattern brush's tiles) get Links panel rows of their own the same way, one per linked or placed object in each brush tile, naming the brush; Relink, Update, Embed, Placement Options, Link Info and Go To act on that art and write it back into the brush library, and the ids they are listed by are kept there. Evidence: `links_in_stored_brush_art_are_listed_and_checked_with_ids`, `links_commands_act_on_images_in_stored_brush_art_by_id`, `links_in_stored_brush_art_open_by_id_and_unreadable_entries_stay`.
- Saving a `.vectorcraft` file reads the images and placed documents in the art of the stored brushes as it reads those in the layers. A linked image shown only in a brush's art is saved as its preview, or with Include Linked Files as its file's bytes, and an image key that the layers or a brush's art shows embedded keeps its full bytes. Saving for an older version replaces the placed documents in a brush's art with groups of the art they show, with that art's resources, before a precision rounds it, so the preview and PDF match the file. Data Recovery copies keep the same images. These are VectorCraft's own rules for its native format; the [help page](https://helpx.adobe.com/illustrator/using/saving-artwork.html) describes Include Linked Files as embedding the files linked to the artwork. Evidence: `brush_only_link_saves_preview_unless_included`, `shared_brush_image_key_keeps_full_bytes_for_embedded_use` (vectorcraft-format), `saved_for_older_apps_placed_documents_in_brush_art_become_their_art`, `recovery_brush_links_keep_proxy_and_embedded_full_bytes` (vectorcraft-engine).
- Linked files another app changes while their document is open follow Preferences › File Handling › Update Links, as they do when it opens: Automatically reads them again (an Update Links undo step), Ask When Modified offers to, Manually leaves them modified in the Links panel. The desktop app compares the active document’s linked files by size and modification time every two seconds and when its window comes back to the front, on a worker thread; a file still being written is tried again (`links.updateChanged`).
- A look at the linked files whose worker thread ends without a result, such as after a panic, no longer stops later looks: the app clears it, stops asking for a frame every 100 ms, and the next look starts on schedule (`crates/engine/src/tests/linkwatch.rs`, `crates/ui-egui/src/tests/place.rs`).
- Import and paste, 2026-10-13: a multi-artboard `.ai` with notes beside its artboards opens from its editing data, a page's art past its artboard no longer lying over the page before it (#1528); a `.ai` gradient whose stops are listed upwards keeps each midpoint on the stop that starts its part of the ramp (#1530); SVG text on a path follows basic shapes (circle, ellipse, rect, line, polyline, polygon) as their SVG 2 equivalent paths (#1531, fixes #1527); PDFs whose alpha soft masks are drawn as images import with the mask instead of empty art (#1551); EPS and PostScript type set in Type 42 (TrueType) fonts imports at its size instead of 1000 times too large (#1553); PDF and EPS import keep a clipping path whose bounding box covers the page but whose shape doesn't (#1544, fixes #1542). Opening or placing a file with an image too large to decode says so, and the Links panel shows it on the row (#1540, part of #1479). Paste takes a PDF or EPS another app copied as editable vector art: from the macOS pasteboard (with SVG), EPS on Windows beside PDF, and `.eps` files copied in a file manager, with the new command `clipboard.importEps` (#1538, fixes #1499).