A pass-through group's adjustment layers count as kept to change what is
below the outer pass-through group only when nothing below that group in
the outer one draws, as for adjustment layers directly in the outer group.
Before, a layer merged above them for its blend mode merged them applied
but the import counted them as not applied.
docs/mcp.md now says when a layer's mask hides all of it.
A layer or group whose layer mask, switched on, hides all of it now counts
as drawing nothing when the import decides what an adjustment layer
changes. A layer with stored pixels is hidden when its mask is 0 over all
of them. A group, an adjustment layer and a layer that stores no pixels
are hidden only when the mask is 0 everywhere, the value outside it
included.
- An adjustment layer above such a layer or group in a pass-through group
is kept to change what is below the group, instead of merging with
pixels that never show.
- A shallow knockout hidden by its mask merges nothing, so the adjustment
layers kept below it in a pass-through group stay in the group's kept
set: an adjustment layer above that group in an outer pass-through group
is kept after them, and both change what is below.
- A clipping base hidden by its mask draws nothing, its clipped layers
included.
Each mask is read once for this, only when it can hide all of the layer,
and the read is not counted against the import's memory allowance, since
the mask is read and counted again where it is drawn.
Docs: docs/mcp.md, docs/target-app-parity.md.
- An adjustment layer's mask is checked against the memory allowed beside
the canvases held while it is read (the merged canvas, the base's shape
and the copies kept for pass-through groups).
- A clipped adjustment layer whose mask is too large to read is left out
without unclipping the layers clipped above it to the same base.
- An adjustment layer in a pass-through group whose mask is too large to
read is left out without stopping the merge of the layer above the
group; its own merge with the layers below it still isn't made.
- A layer whose stored pixels are all transparent draws nothing, so an
adjustment layer above it in a pass-through group stays kept to change
what is below the group.
- A layer merged in a pass-through group for its blend mode or its
knockout takes the adjustment layers kept below it with it, so an
adjustment layer above that group in an outer pass-through group merges
with it instead of being dropped.
- A hidden pass-through group, kept with the hidden layers, and an
adjustment layer at 0 opacity or 0 fill no longer hold back the
adjustment layers above them in a pass-through group.
- Layers that draw nothing (no pixels stored, 0 opacity, or 0 fill with
nothing clipped to them) and groups of only such layers don't count as
content below an adjustment layer, so in a pass-through group it still
changes what is below the group. Layers clipped to a layer at 0 fill
or to an adjustment layer count as content.
- An adjustment layer whose layer mask is too large for the memory
allowed is counted as not applied, merged or clipped, instead of
stopping the layered import.
File › Open with a PSD or PSB file's layers as objects now reads the
nvrt, thrs and post blocks of the PSD file format specification and
merges each such adjustment layer with the visible layers below it in
its group, changing their colors. Clipped to a layer, it changes only
that layer and the layers clipped to it. In a pass-through group with
nothing below it in the group, it changes what is below the group when
the group is merged.
Each channel is taken as an 8-bit sRGB value: Invert turns v into
255 - v, Threshold compares the Rec. 709 luminance with its level, and
Posterize maps each channel to the nearest of its evenly spaced levels.
The adjusted color is composited in the layer's blend mode at its
opacity and fill opacity, through its layer mask.
A hidden one is left out. One that layers are clipped to, one clipped
to another adjustment layer, one whose data can't be read and one
whose merge needs more memory than allowed are not applied and are
counted in the existing adjustment-layer warning. Other adjustment
kinds are still not applied.
Docs: docs/mcp.md, docs/target-app-parity.md.
A live edit changes the document without an undo step, so the tool was
not told about it. Circles found while a preview moved the second
segment stayed cached under the same segment key, and a click after the
preview was canceled drew the cached circle instead of one touching the
segment where it is again. A first segment picked during a preview kept
its old shape the same way.
The cache key now holds the shapes of the first segment and of the
segments a circle may touch, so moving along an unchanged segment still
reuses the search. The first segment is forgotten when its shape no
longer matches the document, and a press on the second segment follows
the segments as they are at the release; a pressed segment that is gone
leaves nothing to touch.
docs/target-app-parity.md gets a line for the file.write report on a
File object's length, hidden and readonly and for the test that lists
every name the script host adds, with the tests that cover them. The
test's comment on vc no longer names another app.
Setting a File object's length truncates or pads the file, and setting
readonly or hidden changes it, but script.check reported no outside
category for those assignments. It now reports file.write and
filesWritten for them: plain and compound assignment, ++ and -- before
or after, and the property name as a string literal in brackets.
A new integration test lists every global and member the script host
adds to the JavaScript engine (the own properties of the global object,
of each object or function it holds and of each function's prototype,
compared with a plain engine) and fails when one has no row. Each name
that reaches outside the document has a probe script, and the test
checks that script.check gives it the expected outside id. vc is listed
as not checked: script.check reads scripts written for the reference
app's scripting, and what vc.run does depends on the command. The test
also checks that the checker lists every preprocessor directive the
host reads, through the new DirectiveName::ALL.
File object properties:
https://extendscript.docsforadobe.dev/file-system-access/file-object/
A folder load checked each .wasm path and then opened it with a blocking
open. When a named pipe replaced the file between the two, the open held
the load until something wrote to the pipe, and with it startup or a
prefs.set of the folder. On Unix the file is now opened
without waiting and without making a terminal the controlling terminal,
and the opened file is checked again: anything that is not a regular file,
or is over the module limit, is refused and listed in the folder report.
A folder load still reads at most 1,000 .wasm files, the first by file
name, and now holds only those paths while it lists the folder. The
files past the first 1,000 were dropped and not reported; plugin.reload
and plugin.list now return their count as leftOut. An error while the
folder is listed fails the load, as an error opening the folder does,
instead of dropping the entries after it.
* refactor(cdr): depend on shared craft-cdr from craft-libs (#1665)
Replaces the local crates/cdr (vectorcraft-cdr) crate with craft-cdr
from storytold/craft-libs#2697 (storytold/craft-libs#778), keeping
VectorCraft's document/artboard/layer/shape mapping in crates/engine.
Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
* build(cdr): pin craft-cdr to craft-libs main (75d179f8df)
* build(cdr): pin craft-cdr to craft-libs main (9b28b56bc7)
* docs(cdr): point CDR/CMX provenance and test paths to craft-cdr
---------
Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
The first point followed its moved art by overwriting the stored point, so
when that art was then deleted the point stayed at the moved position
instead of where it was picked. The tool now keeps the pick separately and
falls back to it for the marker, the rubber band, Shift and the dimension.
A first anchor whose path is deleted is dropped from the point, so the
second click still places the dimension.
Plugin::load now validates each module with wasmparser and a fixed list
of WebAssembly features before wasmi reads it: mutable globals, sign
extension, saturating conversions, multi-value, bulk memory, reference
types, tail calls, extended constant expressions and floats. A module
that uses any other feature is refused, so a wasmi upgrade, a change to
its defaults or one of its crate features turned on elsewhere in the
build does not change what a plug-in may use. wasmi's Config is set to
the same list for every setter it has in this build.
The list is the set wasmi accepted before, without multi-memory. A
second memory was already refused by the one-memory limit; its error
now says "multiple memories". No module that loaded before is refused.
wasmparser 0.228.0 is the version wasmi 2.0.0 already uses.
A new test loads a plug-in that uses each listed feature and checks
that modules using SIMD, relaxed SIMD, memory64, a second memory,
custom page sizes, wide arithmetic, threads, exceptions, legacy
exceptions, function references or garbage collection are refused with
an error that names the feature.
docs/plugins.md lists the whole set; it named only four of the allowed
features before.
The mesh sentence in docs/mcp.md no longer lists the .ai writers among
the exports that draw a mesh. Both docs now say the fallback applies to
an image nested 8 deep, name the containers each writer counts (ordinary
groups and layers do not count), and say an image nested deeper is not
written. The Perspective Distort line cites the two nesting tests.
The mesh paragraph in docs/mcp.md named DXF, WMF and HP-GL as the only
exports that do not draw a distorted image as a mesh. The editing data
of a .ai file writes an image inside 8 or more nested opacity masks,
symbols, live objects and pattern tiles as the parallelogram nearest its
corners, and a legacy .ai (version 7) does so inside 8 or more nested
symbols and live objects, each with a warning. The paragraph and the
Perspective Distort line in docs/target-app-parity.md now say so.
Part of #1210.
- `cargo xtask corpus --scripts` fetches 397 scripts and 1 included file
from 19 MIT and Apache-2.0 repositories at pinned commits into
corpus/scripts, each repository's license file beside its scripts.
xtask/script-corpus.txt lists every file with its size and SHA-256; a
download replaces the previous copy only when both match. One more
candidate is listed as excluded because it is over the 1 MiB limit for
one script. The fetch caps 64 MiB of scripts and 128 MiB of transfer,
refuses `..`, absolute paths, reserved names, case-fold collisions and
links, and holds a lock file while it runs.
- `cargo xtask corpus` takes at most one of --download, --affinity and
--scripts, and refuses other arguments with the usage text.
- `cargo xtask scripts --pass-rate [--report <path>]` runs each script in
a process of its own (the ignored `row` test in
crates/engine/tests/script_corpus.rs): a new document, 5,000,000
instructions, no dialog answers, file reads only in the script's
repository folder and a new folder of its own, file writes only in that
folder, stopped after 10 seconds. It writes a JSON report with the pass
rate overall, per repository and for scripts without dialogs or
windows, how many parse, and each script's outcome, with local folders
removed from messages. Script failures never fail the command, and
without the corpus it prints a skip line and exits 0.
Since #8289 a saved .ai's editing copy keeps live the blends the .ai
reader opens with their settings and as they are drawn. The three File
formats rows in docs/target-app-parity.md still listed every live
object other than four graph types as read back as art. They now name
those blends as kept live too. Blends written as their steps stay in
the gap, and file-format-parity.md lists them.
A plain symbol instance does not expand on its own, so the Safe Mode
plug-in check skipped its symbol's art. When a group or layer around the
instance has a raster effect (its own, or on one of its fills or
strokes), the group's image draws that art, plug-in effect included, and
Expand Appearance committed pixels without the plug-in effect instead of
returning the Safe Mode error. The check now looks into every object of
such a group or layer, symbol art included.
A first point picked on a corner of a path's preview bounds was linked to
the path only at the second click, by fitting the coordinate from the first
click to the path's anchors as they were then. When the path moved in
between, the dimension measured from where the corner had been: picking the
upper-left corner of a stroked rectangle, moving the rectangle 20 points
right and picking its upper-right corner measured 121 points instead of 101.
The tool now records the first point's link at its click (held against the
corner's path, or on the segment under it) and keeps that link for the
dimension while it still resolves. The first point, the rubber band, Shift
and the dimension start from where the art puts the point now, and a first
point on an anchor follows its anchor the same way. A link that no longer
resolves falls back to the point as picked.
The paint source for a compound shape's area held every painting item of
the shape, strokes included. When the shape had no fill, Outline fell
back to that stroke and gave the edges a 1 pt stroke in its paint, while
the shape's own appearance stroked the result again. The area now takes
only the shape's top painting fill, so an unfilled compound shape's
Outline edges carry no paint of their own.
A circle tangent to two segments near the canvas edge could show in the
preview and then fail on release, because `shape.circleThroughPoints`
refuses a circle that reaches more than 4,000,000 pt from the origin.
The tool's check of the three points now goes through
`circle::circle_of`, which applies the same bounds, so such a circle
counts as no circle: the note shows, a click draws nothing and the first
segment stays picked.
A plain Lasso click away from the art deselects everything but kept the
mesh points the tool held, so the Mesh tool chosen next showed the
deselected points as picked, nudged them with the arrow keys and
recolored them with a fill color. The click now unpicks them. Shift and
Alt clicks still change nothing.
docs/target-app-parity.md also lists the Eyedropper among the tools that
keep the picks, and docs/mcp.md describes the Lasso click.
Test: a_lasso_click_that_deselects_unpicks_the_mesh_points in
crates/engine/src/tests/mesh_picks.rs.
The 3D shadows section of docs/mcp.md said Expand Appearance keeps the
shadow as a path. Since #7761 a shadow blurred by the first light's
Softness expands to an image; only a hard shadow stays a path, as
docs/three-d.md already says.
With more than one query word matched through a typo, a result whose
label holds every such word comes first, and then the other words'
grades and how many such words the menu path holds decide. Two results
that hold the two words in label and menu path the other way round tie
on these grades.
A clipping path counts as changed in the document when an anchor or handle moves by a thousandth of a point or more, and links.update leaves a distorted image's clipping as it is.
symbol.place, symbol.placeFromDocument and symbol.addFromLibrary with
`place` now read the drawing mode: in Draw Behind the new instance goes
directly below the selected object, or at the bottom of the current
layer when nothing is selected, as the help page describes for placing
symbols
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
Place Symbol Instance in the Symbols panel and a symbol dragged onto
the canvas from the Symbols panel or a symbol library all go through
these commands.
VectorCraft's own rules: with several objects selected the instance
goes below the bottommost one, a selected path in a compound path puts
it beside the compound path, and a clipping path stays at the bottom of
its clip group or clipping layer. Draw Normal and Draw Inside keep the
instance on top of the current layer, and a locked or hidden layer
still refuses it with no edit.
The type, pie, side count and corner widgets, the Objects on Path, Mirror,
Grid and Radial Repeat controls, the Image Trace Split divider and the
center point now check that a selected object is of a kind that has the
widget before asking whether it is editable. With an artboard locked, the
editability check measures the art of the layer object holding the object,
so a large selected group of another kind was measured on every repaint and
pointer move. The widgets shown are the same.
A test-only counter (vectorcraft-doc feature locked-artboard-count) counts
those measurements; widget_order_tests checks that objects of other kinds
are not measured, compares every widget with the editability-first result
on a mixed document, and holds an ignored timing test, widget_order_perf.