`assets.export` now refuses `pdfs: "single"` with assets, layers and
`selection: "each"` before any file is checked or written (70fdab8445
on main), so the test's request no longer reaches the link check and
fails with that refusal. A single-file PDF is now written only for
artboards, whose items all hold the same document.
(cherry picked from commit 80cf2172f1)
Add Used Colors and New Color Group link the selected art's paints to
global swatches through Document::map_solid_paints_in, which drops each
id that sits inside another listed id. It searched the whole id list for
each ancestor of each id, so the work grew with the square of the
selection. It now looks each ancestor up in a set of the ids, as
without_inner in crates/engine/src/cmd/edit.rs does. The roots keep the
order of the list, duplicates and ids missing from the document, so the
same paints are linked in the same order.
- mapping_within_ids_matches_a_search_of_the_ids compares the count, the
paints visited and the resulting document with the search for every
list of up to three ids from a nested tree (nested ids in both orders,
duplicates, a missing id and an empty list).
- crates/engine/examples/link_colors_bench.rs times both ways in one
process. With 20,000 selected rectangles the call takes 16 ms of CPU
time instead of 128 ms; with 2,000 it takes 1.4 ms instead of 2.5 ms.
A Stroke panel edit with no item lists the selected groups and layers
that have a stroke of their own, then adds the leaves of the other
targets, and it checked each leaf against the growing list, so
collecting the targets took time that grows with the square of the
object count. The command now checks each leaf against a set seeded
with the listed groups and layers. The list is the same: its order is
kept, a group or layer named twice is still listed twice, and a leaf is
listed once.
crates/engine/examples/stroke_targets_bench.rs times both merges on the
same leaves in one process. With 20,000 paths in one group, collecting
the targets takes 0.66 ms of thread CPU time against 55 ms with the list
search, and the whole command takes 60 ms.
Art dragged off the canvas, or the Appearance panel's thumbnail, dropped
on a style in the Graphic Styles panel with Alt held runs
graphicStyle.redefine with that style's name and the object's id (the
first object of the art), in one undo step. The style keeps its name,
id and place in the list, and the art still linked to it takes the new
look. The style is outlined while one is held over it with Alt. An
object already linked to the style with its look changes nothing.
Without Alt the drop still makes a new style, and a style dropped on a
style still moves it.
Object › Transform › Rotate Bounding Box… asks for an angle and turns the
bounding box of the selected objects by it, leaving their art where it
is. Reset Bounding Box squares it again.
- object.rotateBoundingBox {angle, absolute?}: by default the box turns
by angle from the angle the selected objects share (0 when theirs
differ); absolute: true turns it to angle. Objects with different
angles get one shared angle, and the objects inside a group or a
linked opacity mask turn with it and keep their relative angle. A path
of a compound path selected on its own turns only its own box, the
same objects the transforms move. An angle within 1e-6° of 0 is
stored as 0. One undo step, none when every box is already at the
angle. A missing or non-numeric angle is an error. changed counts
every box that turned, as object.resetBoundingBox counts the boxes it
squares.
- object.resetBoundingBox squares only the box of a compound path's
path selected on its own, instead of the whole compound path.
- Menu labels in every catalog.
Docs: docs/mcp.md, docs/target-app-parity.md.
Part of #5954.