Merge pull request #8289 from dotCooCoo/feat/ai-blends-in-editing-copy

.ai save: the editing copy keeps live blends
This commit is contained in:
BFlat authored and GitHub committed 2026-11-17 14:32:25 +07:00
commit 6a2fa16cd1
13 files changed
+1633 -44

No files matched your search

+17 -1
View File
@@ -127,7 +127,23 @@ private editing data. VectorCraft:
on its stroke; other brushed strokes are
written as their brush's art. A document that uses a new document's brushes writes none until a path keeps one on
its stroke; then the brushes are written, and the file opens without the new document's Pattern and Bristle
brushes.
brushes. Blends are written live: their key objects, their spine when they have one of their own, their steps
drawn, and their spacing (Smooth Color, Specified Steps, Specified Distance) and orientation (Align to Page, Align to
Path); a replaced spine is written with an anchor where each key object sits, so it opens with those anchors and
lays out the same steps. Blends with easing, a color shift or start points, with effects, an appearance or an
opacity mask of their own, of objects other than paths, compound paths and groups, of clipping groups, of more than
62 key objects, with a hidden key object, holding another blend, of key objects with geometry or Pathfinder effects
or a group's own fills and strokes, of key objects the editing copy would change (empty paths or subpaths, paths and
compound path members of several subpaths, several fills or strokes, strokes a plain line can't draw, dashes of
more than 64 lengths, hidden fills or strokes, fills or strokes other than a color, in a Lab color or with
transparency or effects of their own, effects, opacity masks), where one key object has a fill or stroke of no paint
or a stroke of no width and another has one that draws, whose spine has more than one part, whose step count is
close to where rounding changes it, or that VectorCraft's reader wouldn't open with their settings or as they
are drawn, are written as their steps with a warning, as are blends inside objects with geometry or Pathfinder
effects or a group's own fills and strokes, blends in opacity masks, pattern tiles, symbols and art cut to a
clipping object or nested eight levels deep in art written in place of other objects (symbol instances, live
objects, brushed strokes), blends whose art would pass the most objects VectorCraft's reader reads, and every blend
on a large canvas.
Point type, area type (with its rows, columns,
gutters and first baseline, threaded frames included) and type on a path are written as text: a text object for
each, naming its story in the text document, with the characters, fonts, sizes, leading, tracking, baseline shift,
+1
View File
@@ -1924,6 +1924,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps envelopes made with a warp, a mesh or a top object editable: its editing copy holds each envelope's contents, shape, Fidelity, Envelope Options and Edit Contents state in the form VectorCraft's `.ai` envelope reader reads, beside its distorted art, so the file opens with the same live envelope, Edit Contents still switching between the contents and the envelope ([Edit the contents of envelopes](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/edit-the-contents-of-envelopes.html)). Envelopes whose type is threaded, has text wrap options or is written as its outlines, envelopes in opacity masks, pattern tiles or another envelope's contents, and envelopes the reader would open with another shape or other settings (a Fidelity that isn't a whole number, bounds margins kept with Distort Appearance off), and envelopes after the first 256 envelopes and images with a Warp in a file are written as their distorted art, with a warning (`envelopes_are_read_back_live` and `envelopes_the_reader_cannot_open_live_are_written_as_their_art` in `crates/eps/src/ai_editing/tests.rs`).
On a large canvas ([the help page](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/start-a-new-file/large-canvas-faq.html); VectorCraft writes one when the artboards together are wider or taller than 16,381 points, its own limit), that `.ai` keeps warp, mesh and top object envelopes editable too: the editing copy writes them live at 1/10 of their size with the rest of the art, and VectorCraft's `.ai` reader opens them at their size, from the editing data alone or beside the PDF part. Read from the editing data alone, an envelope's saved box size is compared with its contents at the same scale, so a bounds margin kept with Distort Appearance comes back, and every path's stroke weight, dashes and dash offset come back at their size, not at 1/10 (`large_canvas_envelope_kinds_round_trip_on_both_ai_routes`, `large_canvas_envelope_stroke_margin_round_trips_on_both_ai_routes` and `a_large_canvas_path_keeps_its_stroke_weight_and_dashes_read_alone` in `crates/eps/src/ai_editing/tests.rs`).
An envelope whose contents hold type keeps the type editable in that `.ai`: the editing copy writes the type as type in the envelope's contents, in the form the `.ai` reader opens as a live envelope of type (`TypedEnvelope` in `crates/eps/src/import/ai/envelope.rs`), so the file opens with the type shown and editable in the envelope's contents, with Edit Contents off or on. An envelope of type in a symbol's art, and one whose type is threaded, has text wrap options or is written as its outlines (mirrored type, for example), is written as its distorted art, as before (`an_envelope_of_type_is_read_back_live_with_its_type`, `an_envelope_of_type_written_as_its_art_leaves_no_story` and `an_envelope_of_type_in_a_symbol_or_a_thread_is_written_as_its_art` in `crates/eps/src/ai_editing/tests.rs`).
A PDF-compatible `.ai` saved with Include Editing Data for Other Apps keeps blends live: its editing copy holds each blend's key objects, its spine when it has one of its own, its drawn steps, and its spacing (Smooth Color, Specified Steps, Specified Distance) and orientation (Align to Page, Align to Path) ([Blend Options](https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-options-overview.html), [blends and their spine](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=260)), in the form VectorCraft's `.ai` blend reader reads (`crates/eps/src/import/ai/blend.rs`), so the file opens with the same live blend laying out the same steps. Each blend is checked with that reader before it is written; blends it wouldn't open with their settings or as they are drawn are written as their steps with a warning ([file-format-parity.md](file-format-parity.md) lists them) (`blends_are_read_back_live`, `blends_of_compound_paths_groups_and_62_keys_are_read_back_live` and `blends_the_reader_cant_read_are_written_as_their_steps` in `crates/eps/src/ai_editing/tests.rs`).
A top object whose top and bottom sides, or left and right sides, have different numbers of segments is also saved live: the side with fewer segments is split into as many as the side across from it has (each segment into equal spans of its curve, a straight one at even steps), up to the 50 a side the grid holds, so the file opens with the same corners and the same mapping of the contents, its outline holding the added anchors. Where the split side would share out the contents another way, as a side of two curves that aren't one curve can, or a side has more than 50 segments, the envelope is written as its distorted art, with the warning (`a_top_object_with_uneven_sides_is_read_back_live`, `a_top_object_split_to_the_grids_limit_is_read_back_live` and `a_top_object_whose_split_side_would_map_another_way_is_written_as_its_art` in `crates/eps/src/ai_editing/tests.rs`).
A PDF-compatible `.ai` saved with Include Editing Data for Other Apps writes eligible paths, compound paths and groups with live effects with an art style when the writer supports their appearance and effects (not a filled path that uses the even-odd rule, and none on a large canvas), which VectorCraft's `.ai` reader opens as the same appearance with its effects live (`objects_with_live_effects_are_read_back` and `every_effect_setting_written_on_an_object_is_read_back` in `crates/eps/src/ai_editing/tests.rs`; [file-format-parity.md](file-format-parity.md) lists the objects written without one and the effects they lose).
The same holds for the objects of an opacity mask's art, a mask inside another mask's art and a hidden art root included, so a mask whose art has Offset Path opens drawing the image it masks as it did, with the effect live; geometry effects that no art style holds on a mask's art, such as Roughen, are written applied to the art, which opens drawing what it drew (`a_masked_image_with_live_offset_path_round_trips`, `hidden_and_nested_mask_art_keep_live_offset_path` and `a_masks_art_with_an_effect_no_style_holds_is_written_as_it_draws` in `crates/eps/src/ai_editing/tests.rs`).