Retracing and releasing a tracing discard the objects its trace made, so
both now throw "Cannot edit page item <id>" when one of them is locked,
with nothing changed. Added artwork is still reported first. The scan
stops at the first added object and charges the objects it looked at to
the run on both the success and refusal paths.
The bounds getters (position, left, top, width, height and the bounds
arrays) read an item in a document in the back without measuring its type,
while the setters measure it after the switch to that document since
#10538. A script that read t.width and assigned it back could resize the
item, and every geometry assignment switched to the document and back even
when nothing changed.
The getters now measure type not measured yet in a document in the back
for an item that holds type, a symbol instance or a placed document, the
way the switch measures it, and the check is skipped while the document is
unchanged. An assignment equal to the current value of an object without
such content in a document in the back returns without switching
documents, and no undo step is made.
A script that set PrintColorManagementOptions.colorProfileMode to
CUSTOMPROFILE and assigned no name printed with the base settings'
profile, as though no custom profile had been asked for. The job now
throws before anything is written, as it does for an empty name.
Follows up on #9087.
- move, remove() and zOrder throw "Only Image Trace can make a tracing",
with nothing changed, when they would leave an image at the bottom of
an ordinary group named Image Trace: a path moved out of the group or
to its top, Send to Back or Send Backward on the image, and Bring to
Front or Bring Forward on the object below it.
- releaseTracing() throws "Cannot release a tracing containing added
artwork", with nothing changed, when the tracing holds an object its
trace did not make. imageTrace.release keeps only the source image, so
the added object would be deleted.
- The TracingOptions members with no setting and TracingObject.areaCount
are left out of hasOwnProperty and reflect. Reading them still throws.
Docs: docs/mcp.md.
A new IllustratorSaveOptions left compatibility unset, so a script that
read it before setting it got undefined. It now starts at
Compatibility.ILLUSTRATOR19, the documented default, which saveAs already
accepts without changing what it writes.
Setting width, height, left, top or position on an item in a document in
the back measured the item before its document was made active. Making a
document active measures its type again where it is not measured yet or
where a composite font of the same name changed, so the scale ratio or the
move distance applied to bounds that no longer held, and the item ended
at a different size or place than the one asked for.
The measurement now runs inside the edit, after the switch, through a new
edit_item_with that edit_item also uses.
- move() and duplicate() refuse to put an image at the bottom of an
ordinary group named Image Trace, before the document changes, as
renaming such a group already does. A tracing's source image moved
out keeps its own error.
- pathCount and usedColorCount no longer walk the anchor points, and
anchorCount charges each path inside a compound path it reads.
- The run keeps the reverse of its replacement map, so finding the
first object of a chain no longer scans the whole map at each step.
- docs: the source image of a traced item is left out of pageItems,
placedItems and rasterItems and is reached through
PluginItem.tracing.sourceArt; docs/mcp.md lists the new error.
File.parent gives a folder in URI notation (/c/Users/..., with %20 for a
space). $.evalFile joined that text to the script's folder as written, so
on Windows $.evalFile(File($.fileName).parent + '/more.jsx') looked under
C:\c\Users\... and reported "include file not found".
When an absolute path starting with one / names no file the script may
read, $.evalFile now also tries it with its escapes decoded and, on
Windows, with /c/... as the drive C:. The path as written is still tried
first, and the scope check, the .. refusal and the file limits apply to
every form. Share and device paths are not converted, and #include lines
are read as before.
The merge of main brought in fe89d3f8, which makes page_items return a Result so that a rebuilt list counts against the run. The image collection still used the list as a plain Vec, so the engine did not compile (E0308, E0599 in images.rs). It now propagates the error with ?, as the other collections do.
Cause: main's fe89d3f8 changed page_items to return a Result, since
building the list again now counts against the run's host-call allowance.
The image collections' list builder still used the old return type, so
vectorcraft-engine did not compile once main was merged in, and every
gate shard failed. The builder now passes the error on with `?`, as the
path and text lists do.
- move() and duplicate() resolve a page-item relative object, an add()
result included, through item_of, so a PlacedItem object made stale by
embed() throws "Stale page item" instead of acting as a target.
- Assigning matrix compares each requested coefficient exactly with the
value the getter reports. A coefficient left as reported keeps the
image's own value, so a change of 5e-10 still moves the image and an
untouched axis does not shift. A move alone is applied as an offset.
A matrix that a nearly singular image cannot reach within 1e-6 pt at
its corners, or that would leave it with no area, throws an error with
nothing changed, and a change that rounds away runs no command.
- The RasterItem.embedded test calls the getter itself on 1 and on a
live raster item.
- docs/mcp.md states when assigning matrix runs no command and when it
is refused.
PageItem.name now refuses "Image Trace" for an unclipped group whose
first object is an image and that is not already a tracing. That name
would make the group a tracing, and expanding it would delete its first
object.
The snapshot of a tracing's objects is now taken only for a tracing
saved without the record of the objects its trace made, and only the
first time a run sees it. Retrace reads it only in that case.
docs/target-app-parity.md now says that the view options only change
the view, and docs/mcp.md lists the new rename error.