A group with a knockout was drawn for the knockout and, when it drew
nothing, drawn again as a layer of its own. Nested inside each other,
such groups were drawn twice over for every level, so opening a crafted
PSD file could take exponential time; layers without pixels charge
nothing against the import's memory allowance, so it did not stop it.
The import now keeps what a group gave when drawn without reading any
layer's pixels (nothing, or a canvas without pixels) and gives it again
without walking the group's layers. A pass-through group that laid
nothing onto an empty canvas without reading any pixels is not laid
there again; its layers count the same warnings each time. A merge
that can't be made forgets the groups found during it, with the notes
it gives back.
A knockout group that comes in as a layer is also listed after being
drawn, and its layers clipped to a fill that isn't drawn, or left
unclipped by a merge past the memory allowed, were counted twice in the
warnings. Each is now counted once.
The knockout of a layer that others are clipped to was applied when
the clip merge needed more memory than allowed and the layers came in
apart. It is now left unapplied and counted, as it is when the clip
merge is made.
A Dissolve knockout at part opacity cleared every pixel below it in
part. It now clears each pixel fully or not at all, at the share its
transparency times its opacity gives, as other Dissolve merges do.
main's ka.tsv already carries the PSD Import Options labels and the PSD
layer and slice messages, so the branch's 22 copies of them are removed
and main's rows are kept.
Opening a PSD or PSB file with its layers as objects now applies a
layer's Knockout setting instead of only counting it in a warning. The
import options help page says that layers using a Knockout option are
merged with the underlying layers:
https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-from-other-apps/photoshop-import-options.html
A layer or group inside a group whose `knko` value is 1 is read as a
shallow knockout and merged with the visible layers below it in that
group into one image, named after them with " + ". Where it has pixels
(shaped by its layer mask), the layers below are cleared to
transparency and it is drawn there at its fill opacity; its opacity
then fades the result back toward the layers below. In a pass-through
group the cut shows what is outside the group, and the knockout is
applied only when it and the visible layers below it are in the Normal
mode, so that no layer stops blending with what is outside the group.
The knockouts of top-level layers, clipped layers, layers that others
are clipped to, other `knko` values, and merges that would need more
memory than allowed are not applied: those layers come in as before and
the existing warning counts only them. A hidden knockout that would
need the merge is left out, like other hidden layers that need a merge.
A knockout that draws nothing, or has nothing visible below it, merges
nothing and comes in as before.
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
A third quick click on a swatch counts as a triple click, and so does
each quick click after it. Those clicks still applied the swatch, so a
triple click on a pattern swatch opened pattern editing and then
painted the tile art with the pattern itself. Only the first click of
a run of quick clicks now applies and selects the swatch.
The test now sends four quick clicks and gives the art a solid fill in
each view, so the list view's first click is checked on its own.
Running a script or a plug-in now ends the spot color base's link, as a
batch step already did, so a script that deletes the spot color and makes
another of the same name does not make the new one the base. Commands that
only list scripts or plug-ins keep the link.
While the link waits for an Undo, the color it captures before a command is
the one the guide shows, not that of a new spot color of the same name.
The second click of a double-click on a swatch also counted as a plain
click. After the double-click opened pattern editing, which selects the
tile art, that click applied the pattern swatch to the tile, so the
pattern held a copy of itself. The second click now only opens the
editor; the first click still applies and selects the swatch.
Reported by erolkarino. #7164 by mockydevs makes the engine refuse
painting the tile with its own pattern; this change stops the swatch
panel from sending that paint on a double-click.
The Enclosing Lasso Tool joins the Lasso group in both shipped
toolbars, right after the Lasso, and stays in Object › Plug-ins ›
Enclosing Lasso. The All Tools drawer lists it once, under Select, and
Edit › Keyboard Shortcuts › Tools lists it once. It has no default
shortcut, and the Lasso keeps Q. A toolbar the user already edited
keeps its saved layout; Reset Toolbar adds the tool.
Fixes#6117