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.
- A group with fill or stroke rows of its own stays whole, so its members
keep the paint the group draws for them.
- A clipping group whose shown clipped artwork overlaps a locked artboard
stays whole even when its clipping path lies off the artboard, including
when a target inside it is named by `ids`. Hidden artwork, art in pattern
editing mode and runs with `clipGroups` false do not count.
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.
The Live Corners line said an anchor edit makes the shape a plain path when no corner has a radius. The check reads the stored radii, so a straight anchor that holds the only radius above 0 keeps the path live.
- 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.
When the document defined a composite font with the same name and the same
definition as one a placed dimension used, but spelled in more than the 256
bytes a dimension's family keeps (a case-insensitive match such as Kelvin
signs for k), placement copied the incoming font under a new name instead of
reusing the document's. The byte limit now applies only to an alias under
another name; a same-name reuse keeps the dimension's own spelling.
Merging main had also left a second, unguarded rename of a dimension's
family next to the guarded one, so a renamed family that was too long or
only differed in case was still written. The unguarded rename is removed.
docs/mcp.md describes how file.place renames a placed dimension's family.
WebP had no embedIcc option, and its encoder never attached a profile,
so no WebP file carried one. WebP now takes embedIcc like JPEG, TIFF and
PSD, on by default: the file becomes an extended (VP8X) file holding the
sRGB profile in an ICCP chunk, lossless or lossy. embedIcc: false writes
the plain file as before.
- document.export and Export for Screens' settings.webp take embedIcc,
and document.formats lists it for WebP.
- WebP Options (Export As and Export for Screens' Format Settings) gets
an Embed ICC Profile checkbox.
- Docs: docs/mcp.md and docs/file-format-parity.md.
Drawing templates (.dwt) and drawing standards files (.dws) are DWG
files, but File > Open and File > Place did not list or read them.
- Both extensions are in the open and place dialogs and go through the
DXF Import Options after the drawing is converted, as a .dwg does.
- A .dws file is read as format `dwg`. A .dwt file is format `dwt` and
opens as a new untitled document, as a .cdt template does.
- The format is found from the content; a DXF named .dwt stays a DXF.
- Exporting to dws or dwt says to export DXF instead.
Docs: docs/mcp.md, docs/target-app-parity.md.
Paste on Windows never read the enhanced metafile that CAD and office
apps put on the clipboard as vector art: windows_formats had no entry for
EMF, so the app pasted their bitmap instead, or nothing. The Windows
clipboard holds an EMF as a handle (CF_ENHMETAFILE, which Windows also
makes from CF_METAFILEPICT), so the app now copies its records with
GetEnhMetaFileBits, at most 64 MiB, and pastes them through
clipboard.importEmf.
A .dxf, .dwg or HP-GL plot file copied in a file manager did not paste,
because file_flavour had no flavour for them, though Open and Place read
all three. They now paste as image/vnd.dxf, image/vnd.dwg and
application/vnd.hp-hpgl through the new command clipboard.importCad
{dataBase64, format: dxf|dwg|hpgl, center?}, read as document.open reads
the file. A file pastes this way only when its bytes are the format, so
a chart script named .plt is not taken for a plot.
Fixes#10819.