A canceled undo group, or a canceled undo scope that put back an earlier
snapshot, now advances the document's history restore count, as Undo
and Redo do. The same steps can make an equal object with the same id
again after such a cancel, so Raster Settings, Placement Options and
Create Object Mosaic ask to be reopened. A scope canceled without an
edit puts back the same snapshot and does not count.
Raster Settings OK also refuses while a tool edit computed on another
thread is pending, since running the command would apply that edit
first, after the targets were checked.
When the objects the dialog opened on render again, OK clears their
earlier fallback warning from the status bar while it still shows it,
unless a selected object still gives that warning; the selection's
first other warning takes its place.
app.showColorPicker answers the run between slices, when the active
color settings hold the profiles of the document the window shows. A
pick in the run's own document, made or assigned other profiles by the
script, was converted to that document's RGB space and separated to CMYK
through the window's profiles instead.
The dialog now carries the RGB and CMYK profiles assigned to the run's
active document when the picker opens. On OK a display-sRGB pick (hex,
sample, HSB) is taken into that document's RGB space, RGB values typed
into the picker convert from the shown RGB profile to the document's,
and an RGB pick in a CMYK document separates through the document's
CMYK profile.
Adds a test that builds a document where a path outside a group has the
same id as a path in the group, and checks that the group's
pathItems.removeAll() throws and deletes nothing.
A Shaper group keeps its source art at the bottom and rebuilds the rest
from it. object.newGroup with a Shaper group as parent at index 0, and
layer.clippingMask.toggle (also a script's clipped = true) on a Shaper
group, put a new object where the source art was. The group then read
no sources and was deleted. Both commands now refuse a Shaper group and
leave the document as it is; the clipping check runs before the edit
opens, so a refused call leaves typing as it is.
removeAll() on a layer's or group's pathItems walked every object in the
document to check clipping paths, even when the collection was empty or
held two paths. It now walks the container's own objects, or, when the
container sits in the clipping path of a clipping group, the subtree of
the highest such clipping path and the group it clips. An empty
collection walks nothing. The document's own pathItems.removeAll() still
checks every object.
A scoped removeAll() now also throws when a path id in the list resolves
to an object outside the container, which a damaged file with repeated
ids can cause, instead of deleting that other object.
The walk came in with #9288 ("Scripts: paths, path points and colors
for scripts").
Web builds and FreeBSD on 64-bit ARM have no DWG decoder, yet File ›
Open, File › Place, their "All readable files" and "All placeable
files" filters, `openExtensions`, `document.formats`, the MCP open_file
description and the CLI help all offered `.dwg` there, and a DWG file
then failed in the missing decoder.
- `vectorcraft_cad::dwg::DECODES` says whether the build decodes DWG.
- `readable_format`, `open_exts()`, `place_exts()` and the per-format
dialog filters leave DWG out where it is false; `document.formats`
reports `dwg` as not readable there.
- An installed `.dwg` importer plug-in is used for such files on those
builds, by File › Open, File › Place and folder batches, and the
desktop app skips its background DWG conversion there.
- Without an importer, File › Place keeps the DWG-specific error, and a
`.dwg` file is still not read as HP-GL.
The listing functions take the decoder availability as a parameter, so
the new test checks both cases on every platform.
layers.index(n) and artboards.index(n) returned Not found for a negative
or fractional number before checking whether the collection was stale, so
a script holding a stale collection got the wrong error. Both now check
the collection first, as the art collections' index() does.
When a live geometry effect reshapes what stays in a clipping path,
removeAll() now measures the area that outline fills under its fill
rule, with overlaps resolved, instead of the area of each subpath. An
image whose Transform effect adds a copy reflected onto itself fills
nothing under nonzero, so deleting the other paths now throws and
deletes nothing. A frame that an effect scales to a thin strip still
counts as a clipping region.
- Document.exportForScreens throws a TypeError for null in place of the
options, itemToExport or fileNamePrefix, as exportFile does for null
options, instead of taking the defaults.
- The script checker counts a variable read just before the `}` that
closes a function body (`function get() { return $.global['local'] }`)
as read in that body, so a later literal's saveAs is no longer exempt.
renumber_after_insert numbered the direct-selected anchors and segments after a new anchor one higher but left the key anchor's index as it was, so after Add Anchor Point before the key anchor the key named the point before it. The key anchor now moves with the other anchors.
Also adds a test that Reverse Path Direction on one subpath leaves the other subpath's selection unchanged.
With relative rounding, a move that bent a straightened corner converted
its stored radius to a fraction of the bent corner's maximum. When the
pixel-grid snap then straightened the corner again, the radius stayed in
those units, so the move changed the radius and recorded an undo step
although no anchor moved, and the corner rounded at the wrong size when
bent later. The snap of a path with Live Corners now converts the radii
of corners it straightens or bends, with the same rule as an anchor
edit, and a move the snap takes back counts as no change when the radii
differ only by rounding.
The help of object.setLiveShape, path.moveAnchor and path.moveAnchors
and docs/mcp.md now say that a straightened corner keeps its radius and
the path stays live.