Skip to content

#1025: .ai editing data keeps sublayers with global colours and pattern fills - #1069

Merged
bflatastic merged 1 commit into
mainfrom
fix/1025-ai-global-colour-pattern
Oct 10, 2026
Merged

bflatastic merged 1 commit into
mainfrom
fix/1025-ai-global-colour-pattern

Conversation

@bflatastic

Copy link
Copy Markdown
Member

Fixes #1025.

The editing-data reader stopped on Xk/XK (global process colours) and
on p/P (pattern fills), so the file fell back to its PDF part, which has
only the top-level layers.

  • Xk/XK read like Xx: a global swatch (not a spot ink), linked at its tint.
  • %AI3_BeginPattern sections are read by a reader of their own into
    pattern swatches (tile from (name) llx lly urx ury, art in pattern space);
    p/P fill or stroke with them, placed by the operator's matrix. A pattern
    it can't read whole still makes a fill with it unreadable, as before.
  • Tests on synthetic editing data; fuzz tokens and fixture extended.

Checks

🤖 Generated with Claude Code

…rn fills

The editing-data reader stopped on `Xk`/`XK` (global process colours) and
on `p`/`P` (pattern fills), so the file fell back to its PDF part, which has
only the top-level layers.

- `Xk`/`XK` read like `Xx`: a global swatch (not a spot ink), linked at its tint.
- `%AI3_BeginPattern` sections are read by a reader of their own into
  pattern swatches (tile from `(name) llx lly urx ury`, art in pattern space);
  `p`/`P` fill or stroke with them, placed by the operator's matrix. A pattern
  it can't read whole still makes a fill with it unreadable, as before.
- Tests on synthetic editing data; fuzz tokens and fixture extended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bflatastic
bflatastic merged commit 51e24f2 into main Oct 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: .ai import: a global colour (Xk/XK) or a pattern fill in the editing data drops every sublayer

1 participant