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.
app.invertMatrix divided the rounded numerator by the determinant and
rounded again, so an x-translation whose exact quotient is just past
half the smallest number (numerator 2^-1021 + 2^-1075, determinant
2^54) came back as 0 instead of Number.MIN_VALUE. When the rounded
quotient is below 2^-1023, the result is now found from the exact
numerator and determinant: the multiple of the smallest number whose
halfway points hold the exact quotient, ties to the even one. A
quotient exactly at the halfway point still rounds to 0.
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.
- app.reflect now reports the defaults of the matrix functions' number
arguments: 0 for deltaX, deltaY and angle, and 100 for scaleX, in the
get and concatenate variants. scaleY has no fixed default, since a
left-out vertical scale is the horizontal one; its description says so.
- When a script's commands take a recording past its limit and the script
also copied, the notes of the Copy's formats no longer replace the
limit message in the status bar. The limit is named only once, so the
message is kept while it shows. The same applies to a script run that
automation takes to its end at once.
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.
The determinant and the translation numerators are rounded before the
division, so a value whose exact quotient is below the overflow midpoint
could round to infinity and throw a RangeError, and one at or past it could
come out finite. When the rounded quotient overflows or lies within eight
steps of Number.MAX_VALUE, the exact quotient is now compared with the
midpoint between Number.MAX_VALUE and 2^1024 from exact product parts. An
infinite rounded quotient below it is replaced by the number the exact
quotient rounds to.
- 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.
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.
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.
A native save keeps every artboard in its main file and reads `range` only
for the separate files of `separateArtboards`. The close check treated a
native document last saved with `range` and without `separateArtboards` as
a save of some artboards, and refused to close it although the save writes
every artboard.