Commit Graph
2090 Commits
Author SHA1 Message Date
dotCooCoo a176ffae46 PDF/.ai import: the file is read and checked once when it opens
Opening a .ai or a PDF read and checked the whole file up to five
times: for the document it carries, for whether it holds the editor's
private data, for the import, for the editor's copy and for its File
Info. Each pass parses the file and walks every object, about 190 ms on
a 15 MB .ai.

- vectorcraft_pdf::open_pdf reads and checks the file once, on the
  import's deep-stack thread, and import_opened imports pages from that
  reading. document.open takes the carried document, the page count,
  the editor's copy and the File Info from it. The editor's copy is read
  after the page import and only when the file is not restored from a
  carried document; so is the File Info.
- A .ai saved without PDF compatibility opened with pages that name
  every page reads its editor's copy from the same reading.
- document.pdfInfo reads the file once for its pages and the thumbnail.
- The Open and Place dialogs read the file once to decide whether to
  ask for pages, instead of twice.

A file whose PDF part fails the check still reads its editing data
separately, as before.
2026-11-04 15:41:11 +07:00
dotCooCoo a8c6d078e5 .ai import: blends keep their Specified Distance and Smooth Color spacing
A blend's record in the editing data holds its Blend Options spacing.
Word 1 is the spacing: 0 is Smooth Color, 1 is Specified Steps and 2 is
Specified Distance. For Specified Distance, word 2 is the distance in
points as a 32-bit float. The reader took only records whose word 1 is
1, so every Smooth Color and Specified Distance blend came in as its
drawn steps.

A Smooth Color or Specified Distance blend now opens live with that
spacing where VectorCraft lays out as many steps between each pair of
keys as the file draws, in the same places and colors. Otherwise it
keeps its drawn steps with the existing note. The distance is read as
the shortest decimal that reads back as the stored float. The steps are
counted before anything is laid out, and a blend takes from the
import's budget only when its count matches. Specified Steps blends
are read as before, with the steps counted from the drawn ones.

Tests: import::ai::tests::a_blend_keeps_its_spacing,
a_blend_of_three_keys_keeps_its_distance_between_each_pair,
a_blend_whose_spacing_doesnt_lay_out_its_steps_keeps_them,
import::ai::blend::tests::records_say_their_spacing,
a_blend_takes_from_the_budget_only_when_it_is_laid_out,
a_distance_past_the_keys_lays_out_no_steps, and the fuzz case
ai_blend_spacing_never_panics.
2026-11-04 15:41:08 +07:00
dotCooCoo 146d30502a Expand: selected symbol instances become their art, as Break Link places it
Object > Expand with Object on now turns each symbol instance in the
selection, including one in a selected group or in a placed document's
art, into its art, as Break Link to Symbol places it. It goes one level
deep: the instances in that art stay instances. The art keeps the
instance's id and place in the stacking order, and Expand stays one
undo step.

- Instances with effects stay instances, and Expand Appearance bakes
  them as before. Instances with an effect on a fill or stroke,
  instances in perspective, and those in blends, repeats and Intertwine
  groups stay instances.
- The art keeps the instance's opacity mask, as Break Link gives it.
- A hidden or locked instance's art stays hidden or locked.
- A placed document in an instance's art is expanded too.
- When the instances' art would make more than 1,000,000 objects, they
  stay instances, the limit Break Link uses.
- The Fill and Stroke options (object.expand.info, and the Expand
  dialog) count the fills, strokes and gradients in the art of those
  instances, with a dynamic instance's own changes applied. The info
  reports under symbolArt which of them only that art holds, and the
  dialog enables those options only while Object is on.
2026-11-04 15:14:02 +07:00
dotCooCoo a79ab62712 Select: Same Symbol Instance takes its reference from an object that can be selected
Squashed from #5511 onto main.
2026-11-04 15:13:32 +07:00
dotCooCoo 92640179e5 Type: Select All in a threaded frame selects the whole story
While the Type tool edits a frame of threaded text, Select All selects
the text of every frame of the story, highlighted in each frame. The
tool edits the first frame that holds text.

- Typing, Delete and Cut replace the whole story as one undo step
  (`text.editRange` takes `clear`, the other frames whose text goes).
- Copy and Cut take the whole story (`text.getRange {id, story: true}`).
- Fills and strokes, `type.step`, `appearance.copyFrom`, the Character,
  Paragraph, OpenType and text style panels, the Tabs panel's tab
  stops, the font menus and the Justification dialog act on every
  frame's text (`text.setRangeStyle {id, story: true}` styles them in
  one edit).
- A caret move, a click or a word or paragraph selection ends it.

Select All in unthreaded type is unchanged.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-04 15:13:20 +07:00
dotCooCoo 40318753db Blends: Convert on a replaced spine changes only its handles
Convert to Smooth or Corner on a blend whose spine came from Replace
Spine stored key anchors with the converted spine, so the spine's
points then moved onto the key centers. It now changes only the
spine's handles: the points stay where they are and the keys stay
spread along the spine. Direct Selection's spine conversion and the
other spine edits are unchanged.
2026-11-04 15:13:18 +07:00
dotCooCoo f7bebdeaf0 Live Paint: preserve face colors at shared curved boundaries
Capture sweep-piece source attribution before endpoint pinning can move its
midpoint off the original outlines. Keep the existing lookup after pinning
when the original piece has no source.

Add planar coverage and native compound Make/Expand/undo regressions, and
document the existing front-most source-fill rule.
2026-11-04 14:08:23 +07:00
dotCooCoo a9a2c4dee8 Select: the font Same commands look through a selected group that holds the isolated group
With a group isolated, a selected layer or group that holds the isolated
group is not selectable itself, so the type inside the isolated group was
never reached and the font Same commands returned "select a text object".
The walk now goes through such a layer or group to the type inside the
isolated group that can be selected.
2026-11-04 13:42:03 +07:00
dotCooCoo d18499613c .ai save: an artboard the document does not have is refused, as an export refuses it
A save as .ai or .ait (file.saveCopy, file.saveAs, document.save and
file.saveAsTemplate) set range to "all" before the file was written.
The one exception was a legacy .ai of version 7 given a range, which
its encoder checks. Every other save accepted an artboard, artboards or
range that names an artboard the document does not have (artboards: [5]
on a document of three artboards) and wrote every artboard.
document.export refuses the same value.

The save now refuses such a value with the export's error, under the
name of the command that was run, and writes no file. A range that is
not text, such as range: 42, was also replaced by "all". The save now
leaves it for the encoder, which refuses it as an export does. An
artboard the document has, or an empty artboards list, is still saved
with every artboard, and a legacy .ai still writes the artboards of its
range.
2026-11-04 13:16:24 +07:00
dotCooCoo 6cbfb83c65 Select: Same commands take their reference from an object that can be selected
Select > Same > Fill Color, Stroke Color, Fill & Stroke, Stroke Weight,
Opacity, Blending Mode, Appearance, Shape, Graphic Style and Appearance
Attribute compared the other objects with the first selected object,
even when select.set had put a hidden or locked object, one on a
template layer or one outside the isolated group first. They now take
the first selected object that the Select commands could select, in
selection order, and keep the compound path and isolation rules for it.
A selection that holds no such object returns "nothing selected".
2026-11-04 12:50:38 +07:00
dotCooCoo f581aa8a56 Select: the font Same commands take their reference from the type on a selected layer
A layer that was selected (for example with select.set) gave no reference to
Select > Same > Font Family, Font Family & Style, Font Family, Style & Size,
Font Size and the text fill and stroke color commands: the layer itself is
not selectable, so the type on it was never reached and the command returned
"select a text object". A selected layer or sublayer now gives the type on it
that can be selected. A hidden, locked or template layer gives none.
2026-11-04 12:44:48 +07:00
dotCooCoo 5c224a0d08 Symbols: Break Link keeps the instance's opacity mask
Break Link to Symbol dropped the instance's opacity mask. The art now
keeps it, or a group around the art holds it when the symbol's art has
a mask of its own. The objects in the instance's mask art count against
Break Link's limit of 1,000,000 objects.
2026-11-04 12:44:46 +07:00
ruchirguitarandClaude Opus 5.5 bf58f605fe Text Tweaker: refuse ranges that aren't whole bytes, make no step when nothing changes (#4924)
A `start` or `end` such as -1 or 1.5 was read as absent and changed text
before the range; it is now refused. Characters that already have the value
are left out, so a run that changes nothing returns count 0 and makes no
undo step. docs/mcp.md cites the public formatting-type page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 12:44:44 +07:00
dotCooCoo 79102f6104 Tests: range stroke weight test joins the character stroke tests
The test moves from an inline module in cmd/textedit.rs to
tests/charstroke.rs and uses that file's helpers. docs/mcp.md says that
text.setRangeStyle gives a range's stroke a 1 pt weight as text.setStyle
does, and that its strokeWidth and strokeOptions lengths are in document
points.
2026-11-04 12:44:42 +07:00
dotCooCoo b5301ca74d Fix range text stroke weight defaults and scaling 2026-11-04 12:44:42 +07:00
dotCooCoo c8128ee65b Graphs: series marks keep a fill or stroke opacity when the graph is drawn again
A graph keeps the paint and stroke weight given to a series' marks, but not
the opacity of their fill or stroke row. An opacity set with
`transparency.set {item}` or `appearance.setItem {opacity}` on a column,
bar, line or other series path was lost the next time the graph was drawn
(a data, type or option change).

- `SeriesPaint` gains `fillOpacity` and `strokeOpacity`. A setItem opacity
  on the topmost fill or stroke of a series path stores it, in the same
  undo step, and the generator puts it on the topmost fill and stroke of
  every path directly in that series' group. Graph designs keep their own
  opacity. A value read from a file is held to 0..1.
- The Appearance commands that change the opacity of a series path's
  topmost fill or stroke (add, remove, duplicate and move a row, Clear
  Appearance, Reduce to Basic Appearance, `appearance.transfer` and the
  Eyedropper) update the stored opacity. They do not change the stored
  paint, which only `paint.setFill` and `paint.setStroke` set.
- An edit that leaves a series path fully opaque stores nothing for a
  series the graph keeps nothing for.
2026-11-04 11:45:16 +07:00
Dylan M. Taylor 0cdcf3039b engine, plugins: cap radar dimensions, resume slice-name suffixes, weigh cache keys 2026-11-04 11:45:15 +07:00
BFlat 15670ca9f3 Merge pull request #4968 from dotCooCoo/feat/ai-editing-data 2026-11-04 11:41:38 +07:00
dotCooCoo 46bb91275d Merge main into feat/ai-editing-data 2026-11-03 19:47:02 -08:00
dotCooCoo a0a4633c26 Restore Type editing after a dropped press 2026-11-04 10:25:57 +07:00
Don Omondi 4f60ee47e8 Fix #2920: an open path in a PDF-compatible .ai opens as drawn
Squashed from #4616 onto main.
2026-11-04 10:25:55 +07:00
dotCooCoo 5e495cf900 .ai import: objects that draw differently from the page come in as its art, and the layers stay
When the layers fail the comparison with the file's own page because some objects draw
differently (an object in another color, or one that only one side draws), the import finds
each top-level object whose bounds hold a patch of such pixels (the smallest one that holds it)
and replaces it with the page's art in its bounds, in the same way as an unread object. It then
compares the layers with the page again. When that comparison passes, the layers stay, and a
warning names the layer or sublayer of each replaced object (`<Layer>` for one without a name)
and how many were replaced on it. Like the warning for unread objects, this warning counts as
a loss, so an export or Save As to the file's own path needs `acknowledgeLoss: true`. A
replaced wrap object keeps its wrap options, and area type is wrapped again around the page's
art. Placed files at their other placement are tried too when the first placement can't be
kept.

The file still comes in as its PDF part, with the same reason, when only edges or type differ,
when a difference lies outside every top-level object, when more than half of the top-level
objects (or more than 64) hold one, when such an object is or holds type or holds a wrap object
inside a group, when the page's type of a text object that stays would be copied into a
replacement, when the page's art can't replace an object for the reasons it can't replace an
unread one, when matching the differences to the objects would take too much work, or when the
second comparison still fails. Trusting the editing data keeps the objects as read.
2026-11-04 09:43:28 +07:00
dotCooCoo 7fe42986c2 Select: the font Same commands take their reference from type that can be selected
Select > Same > Font Family, Font Family & Style, Font Family, Style & Size,
Font Size and the text fill and stroke color commands took the type to match
from the first type found among the selected objects. Type that is hidden or
locked inside a selected group, type on a template layer and type outside the
isolated group could set the reference. They now take it from the type that
Link Block Series starts from, in the same selection order. A selection whose
only type cannot be selected returns "select a text object".
2026-11-04 09:43:21 +07:00
dotCooCoo e03665a215 Window: New Window opens a second view of the current document
Window > New Window was grayed out. It now opens another view of the
current document, with its own zoom, center, rotation, artboard and
Outline or Preview, as a tab of its own. While a document has more than
one view, each tab shows the view's number after the name
("Untitled-1:2"). An edit in one view shows in every view of the
document.

Tile, Cascade, Float in Window, Float All in Windows and Consolidate All
Windows arrange each view as they arrange a document, and Tile and
Cascade are enabled with two views of one document. A new view of a view
in a floating window opens in a floating window too. File > Close and a
tab's close button close the view; the document's last view closes the
document, asking to save it first. Next Document and Previous Document
step through the views in tab order.

Each Tile pane and floating window draws its view in its own Outline or
Preview, and switching views with the Artboard tool targets the artboard
the view shows. A switch to another view of the current document resets
the tool, as a switch to another document does (Session::reset_tool).
Artwork held over another view's tab during a drag switches to that
view, and a drop there moves it.

Fixes #4116
2026-11-04 08:13:58 +07:00
Franco Jacquet c16c833c58 Check stroke.set params: a misnamed key is refused (#1442)
Squashed from #5453 onto main.
2026-11-04 08:13:52 +07:00
Dylan M. Taylor 13b0bbe639 Linear-time scans: Add Anchor Points, swatch library adds, placed-document export, width profiles, symbolism previews
Add Anchor Points builds the new anchor list in one pass, Swatch Library add looks names up in sets, full_documents dedups placed keys with a set, width profile lookups and mark insertion use binary search, and the symbolism tools cap and thin the previews of a long drag as Liquify does.
2026-11-04 08:13:18 +07:00
vangel76andClaude Sonnet 5.5 0a2935cf8f Booleans: limit of one unit, crop outside shortcut, tests (#5465)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 08:13:12 +07:00
vangel76andClaude Sonnet 5.5 e951095617 Path booleans: refuse out-of-range input, guard the contour pass, cuts report refusals (#5465)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 08:13:12 +07:00
dotCooCoo 65f55d65ea .ai save: errors and notes name the legacy or non-PDF-compatible .ai
Option errors and notes for a .ai save called the file a
"PDF-compatible .ai" even when the save wrote a version 7 file
(aiVersion: "7") or a file without PDF content (pdfCompatible: false).

- Option errors: a version 7 .ai is now called a "legacy .ai
  (version 7)" in the errors for its artboard, artboards and range
  options. A .ai saved without PDF content is called a
  "non-PDF-compatible .ai" in every .ai option error (includeLinked and
  embedProfiles included), and a "non-PDF-compatible .ait template"
  when Save as Template writes it. aiVersion: "7" takes precedence over
  pdfCompatible: false, as it does when the file is written.
- The error for encoding a version 7 .ai of several artboards as one
  file names the legacy .ai.
- The note for a native option the file does not read (version,
  preview, precision) names the same kind of file.
- The error for aiVersion: "7" on a .ait template no longer says that a
  .ait template is always PDF-compatible, since Save as Template writes
  one without PDF content. It now reads "aiVersion 7 writes legacy .ai
  files, not .ait templates", with its rows in the message catalogs
  updated.

A PDF-compatible file keeps its name.
2026-11-04 08:12:56 +07:00
dotCooCoo dc8808fe5e Read compound effects when opening effect dialogs 2026-11-04 08:12:44 +07:00
dotCooCoo 1ad74d1ddf Type: reject doubly signed OpenType feature tags 2026-11-04 08:12:12 +07:00
dotCooCoo d2c5ea127a Merge commit 'refs/check/4968-main' into feat/ai-editing-data 2026-11-03 13:05:54 -08:00
dotCooCoo cdae392fe0 Type: guard Touch Type movement at direction boundaries 2026-11-03 23:57:53 +07:00
dotCooCoo dfc25c85e4 Type: move right-to-left characters with Touch Type 2026-11-03 23:57:53 +07:00
dotCooCoo 63ac1395fd Type: control Kashidas for selected characters 2026-11-03 23:29:52 +07:00
Dylan M. Taylor ce5d99c363 Copy: a PNG too large to make is not offered, and the status bar says why
Follow-up to #5301. flavour_types (and clipboard.flavours) still listed PNG for art too large to render at the smallest scale, and the omission was only logged. PNG eligibility is now shared, and flavours_with_warnings returns a warning the status bar shows.
2026-11-03 22:52:31 +07:00
Dylan M. Taylor 1ce015de86 Export for Screens: settings saved without their PDF passwords don't export unprotected
Follow-up to #5305. Stripping passwords from remembered settings made the next export of a password-protected PDF row write an unencrypted file without a word. The stripped settings now keep a non-secret passwordRequired flag, and an export refuses them until a password is given again (or security without the flag is given).
2026-11-03 22:52:30 +07:00
Dylan M. Taylor 30ce0e3a42 Threads: a frame left alone by a dropped repeat is flowed again
Follow-up to #5303. When deduplication shortens a thread ([[a, b], [b, c]] -> [[a, b], [c]]) and no frame changed, the fast path dropped [c] without clearing its threaded continuation. A thread that lost a listing now counts as changed and is flowed again.
2026-11-03 22:52:27 +07:00
Dylan M. Taylor 61d9a1c3e4 fix(engine): recovery writes and reads an image entry shared by several keys once 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 43e391918f fix(engine): Create from Guides stops at one past the slice limit 2026-11-03 22:17:45 +07:00
Dylan M. Taylor dabb9ae380 fix(engine): Delete Design handles each listed name once 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 824310e611 fix: brush and library names number repeats without rescanning 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 891e90bfee fix(engine): preset imports number duplicate names in linear time 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 706c8f850e fix(engine): refuse network paths outside the roots before resolving them 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 9b10a40709 fix: Templates folder needs write access; portal saves keep exact file names 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 1c4162b2c9 fix(doc): a refused placed-document read shows the preview, not a cached full read 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 4d0ecb264c fix(engine): link watch and Link Info read within the asking caller's roots 2026-11-03 22:17:45 +07:00
Dylan M. Taylor 40b9fa4717 fix(engine): recovery reads only plain files in its own areas 2026-11-03 22:17:45 +07:00
NetterSilverandClaude Opus 5.5 2264edd0c9 Lasso picks gradient mesh points instead of dropping the mesh
Fixes #5351

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 22:16:53 +07:00
bflatastic 96330fb54e SVG import: a style sheet too large to match opens with a warning; fuzz reaches the pass 2026-11-03 21:12:41 +07:00