`PathItems.index()` with a number went straight to `items_doc`, which
refuses every compound-path-scoped `PathItems` so that creating paths
there stays unavailable. Its siblings (`[n]`, `getByName`, `length`,
`removeAll`) already dispatch scoped collections to the layer handlers
first, but `index` did not, so `compoundPathItems[0].pathItems.index(0)`
threw "creating paths in a compound path is not available yet". Route a
scoped `index` to `scoped_index` like the other lookups; the guard now
only stops real creation.
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.
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.
- `artboards.insert` returns nothing, as the scripting reference says; `add`
still returns the new artboard.
- `toString` of `Layers`, `GroupItems`, `CompoundPathItems` and `Artboards`
checks the collection as `typename` does, so a collection whose container
is gone throws instead of stringifying.
- The collections' `index` is described as returning their element class,
with an `itemKey` of any type. `PageItems.parent` and `PathItems.parent`
are described as any type, since scoped collections return a layer or
group.
- `hasSelectedArtwork` charges the selection and every node of the layer it
looks at to the script budget, also when it runs no command.
- A document made during the run whose active artboard the run chose is
reported when an artboard inserted before it moves it.
- Tests: a test-only counter of built art lists bounds the group loop test,
and the rejected-parameter checks of `object.newGroup` compare the whole
layer tree.
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.