Repository navigation
Part of #372: PDF/.ai import keeps strokes live and hidden and nested layers - #401
Merged
Merged
Conversation
… layers An object Illustrator writes as a fill of its outline left open and then a stroke of it closed imported as two objects: a filled path and a separate stroke-only path. A fill and a stroke of the same outline (equal once every subpath is closed) now become one path with the fill and a live stroke (width, cap, join, miter limit, dash, paint), taking the stroke's outline. Layers: a group whose view state is off (/Usage /View /ViewState /OFF, with or without an /AS view event) comes in as a hidden layer with its art, as groups off in the default configuration already did. The configuration's /Order nesting (inline or as its own object, labels skipped) makes sublayers, which take their top-level layer's colour; nesting depth, entries and groups are capped. Splitting a page's art by group is no longer quadratic, so thousands of layers import quickly. The 6D art pen (rotation-aware brushes) is a separate feature, now on the ROADMAP gap list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bflatastic
force-pushed
the
fix/issue-372
branch
from
October 8, 2026 00:11
b8605e4 to
3585ef6
Compare
Member
Author
|
Full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening a PDF-compatible
.ai(or any PDF) now keeps each stroked object one path with a live stroke, and brings hidden and nested layers in as hidden layers and sublayers with their art./Usage /View /ViewStateis/OFFis hidden too (an/ASview event lets the view state override/D). The interpreter-skip check (skips_any) is kept apart from layer visibility./Ordernesting (inline or its own object, as Illustrator writes it; labels skipped) makes sublayers in first-paint order, taking their top-level layer's colour. Depth (32), entries and groups are capped; a group listed twice stays where first listed, so the nesting has no cycles.docs/mcp.mdimport notes.Not here: hidden sublayers or objects inside a visible top-level layer aren't in an
.ai's PDF part at all (only top-level layers become PDF layers), and brushes/width profiles arrive expanded; both live only in the native private data (out of scope in the ROADMAP).Checks
24bea909(origin/main).cargo fmt --all --check,cargo clippy -p vectorcraft-pdf --all-targets -D warnings,cargo test -p vectorcraft-pdf(197 + 1 passed; 5 of the 8 new tests fail without the fix, the other 3 guard behaviour that already held),cargo test -p vectorcraft-engine --test import_fuzz(37),cargo test -p vectorcraft-engine -- pdf(81),cargo xtask layers,cargo xtask brands,cargo xtask wasm,cargo check -p vectorcraft-pdffor x86_64-unknown-linux-gnu and aarch64-apple-darwin.vectorcraft-cli run --in <real Illustrator 29 .ai> --cmd document.inspect: the filled-and-stroked object is now one path (fill #343334, stroke #ffffff 1.5) instead of two; the same file with its layer switched off imports as a hidden layer with all its art. Survey of 19 real.aifiles: all open, remaining stroke-only paths are genuine open lines.open_fileof a nested-layer.aitheninspect_document: layer "Artwork" holds the hidden sublayer "Hidden sublayer" with its art and a fill+stroke path.🤖 Generated with Claude Code