Commit Graph
9097 Commits
Author SHA1 Message Date
.CooCoo 857ea2aa94 Merge pull request #10892 from dotCooCoo/fix/composite-installed-name-place
Place: placed type keeps an installed font that shares a composite font's name
2026-12-04 20:02:26 -08:00
.CooCoo 1597047278 Merge pull request #10873 from dotCooCoo/fix/dxf-group-block-reference
DXF export: Always Export Group as Block Reference
2026-12-04 19:41:55 -08:00
.CooCoo dcab528174 Merge pull request #10632 from dotCooCoo/fix/tracing-mask-art
Scripts: retracing and releasing refuse a tracing with added opacity mask art
2026-12-04 18:58:41 -08:00
.CooCoo 72801b126e Merge pull request #10896 from dotCooCoo/fix/new-group-in-shaper-group
Shaper: new groups and clipping masks no longer delete a Shaper group
2026-12-04 18:52:48 -08:00
.CooCoo 4be58b75cd Merge pull request #10144 from dotCooCoo/feat/release-containers
Artwork Cleanup: Release All Containers takes apart every group, clipping mask and compound path
2026-12-04 18:46:43 -08:00
dotCooCoo 60cdfc1eb4 Merge main into fix/dxf-group-block-reference
The craft-libs pins take main's rev. Until storytold/craft-libs#5381 merges,
crates/cad/src/blocks_compat.rs writes the block records, BLOCK definitions
and INSERT entities that #5381 adds to the drawing writer.
2026-12-04 18:24:34 -08:00
dotCooCoo a680aef74a Merge main into fix/tracing-mask-art 2026-12-04 18:19:19 -08:00
dotCooCoo 0ca72a4a26 Merge main into fix/new-group-in-shaper-group 2026-12-04 18:18:17 -08:00
dotCooCoo ab17c55959 Merge main into fix/composite-installed-name-place 2026-12-04 18:17:54 -08:00
.CooCoo ae67ca69e6 Merge pull request #10884 from dotCooCoo/fix/script-stale-collection-before-range
Scripts: stale layers and artboards throw their stale error from index()
2026-12-04 18:10:21 -08:00
.CooCoo f4c65a2f0f Merge pull request #9053 from dotCooCoo/feat/scripts-api-d5-swatches-symbols
Scripts: documents give scripts their swatches, spots, symbols, graphic styles and brushes
2026-12-04 18:08:05 -08:00
.CooCoo e14a044217 Merge pull request #10881 from dotCooCoo/fix/artboard-guide-closing-anchor
Arrange Tools: a guide whose last anchor repeats its first is not added again
2026-12-04 18:07:08 -08:00
dotCooCoo 43d4cb2a25 Merge main into feat/release-containers 2026-12-04 18:03:46 -08:00
dotCooCoo 05ed058fb1 Shaper: new groups and clipping masks no longer delete a Shaper group
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.
2026-12-04 18:02:53 -08:00
.CooCoo 85bd77b528 Merge pull request #9315 from dotCooCoo/feat/scripts-export-for-screens
Scripts: Document.exportForScreens writes artboards, assets or the document into a folder
2026-12-04 17:59:22 -08:00
.CooCoo 415fa81712 Merge pull request #10641 from dotCooCoo/fix/trace-preset-bracket-names
Scripts: loading the same built-in preset with or without brackets does not trace again
2026-12-04 17:59:16 -08:00
.CooCoo 48488547af Merge pull request #10856 from dotCooCoo/fix/live-corners-keep-straightened-radius
Live Corners: a straightened corner rounds again when a later move bends it
2026-12-04 17:59:11 -08:00
.CooCoo 32513255bd Merge pull request #10860 from dotCooCoo/fix/placed-dimension-composite-font
Place: a placed dimension keeps the composite font its label was renamed to
2026-12-04 17:59:07 -08:00
.CooCoo 0fb3f00a4b Merge pull request #10877 from dotCooCoo/fix/dwt-dws-open
DWG: .dwt templates and .dws standards files open as DWG drawings
2026-12-04 17:59:00 -08:00
.CooCoo 43e046ed33 Merge pull request #10878 from dotCooCoo/fix/webp-embed-icc
WebP export: Embed ICC Profile writes the sRGB profile in an ICCP chunk
2026-12-04 17:58:57 -08:00
dotCooCoo 5cddb35244 Merge main into feat/release-containers 2026-12-04 17:52:15 -08:00
dotCooCoo ec78385f8c Artwork Cleanup: Release All Containers keeps group paint and clipped art on locked artboards
- 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.
2026-12-04 17:45:02 -08:00
dotCooCoo 79aea5c009 Place: placed type keeps an installed font that shares a composite font's name
A native file's composite font named like an installed font is not lent
while the file's type is measured for placement, so the type is laid out
in the installed font. Adoption still brought that definition in under a
free name such as "Source Sans 3 2" and renamed the type to it, so the
placed type switched to the composite font it was never measured in.
Adoption now skips the source definitions the font database does not
lend: one named like an installed font, or one that fails its own checks.
2026-12-04 17:43:01 -08:00
dotCooCoo a53165fa85 Scripts: stale layers and artboards throw their stale error from index()
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.
2026-12-04 17:03:47 -08:00
dotCooCoo a4b2e4fe36 Scripts: remove the unused empty-path closed set
Setting `closed` on a path with no points gives it an empty closed
subpath, so the path's own data keeps the setting. The separate set of
empty paths, its key, its cleanup after commands and its copy in the
command trail were no longer written to by anything. `closed` and
`setEntirePath` now read the closed state from the subpaths only.
2026-12-04 16:52:48 -08:00
dotCooCoo 6607e9acc5 Arrange Tools: a guide whose last anchor repeats its first is not added again
Add Artboard Guides (#10090) skipped a guide already on the Artboard
Guides layer only when its path listed each corner once. A closed path
whose last anchor sits on its first one, as some files and tools write
a rectangle, did not match, so each run added another guide and another
undo step. The corner check now leaves out a closing anchor on the
first one; the segment check still runs over every anchor, so that
anchor's handles must stay on its point.
2026-12-04 16:43:27 -08:00
.CooCoo 3368ac519c Merge pull request #10871 from dotCooCoo/fix/cad-clipboard-paste
Paste: read CAD apps' metafiles on Windows and copied DXF, DWG and HP-GL files
2026-12-04 16:29:31 -08:00
dotCooCoo 96e66b5e8d Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 16:27:43 -08:00
dotCooCoo ba9b2691eb Merge feat/scripts-export-for-screens 2026-12-04 16:05:16 -08:00
dotCooCoo 8b82ccf327 Scripts: null exportForScreens arguments throw, and a read before a closing brace is shared
- 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.
2026-12-04 16:04:49 -08:00
dotCooCoo b8e11fb2c7 Place: a placed dimension reuses an equal composite font of the same name
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.
2026-12-04 16:00:35 -08:00
dotCooCoo 2101a3af56 Tests: check the prefixed export folder holds two entries before checking each is a file 2026-12-04 15:58:20 -08:00
dotCooCoo e32c3ae32d Merge main into fix/tracing-mask-art 2026-12-04 15:56:51 -08:00
dotCooCoo d467c36805 Merge main into fix/trace-preset-bracket-names 2026-12-04 15:32:09 -08:00
.CooCoo 2612015ffc Merge pull request #10090 from dotCooCoo/feat/artboard-rect-guides
Arrange Tools: Add Artboard Guides puts a guide rectangle inside or outside artboards
2026-12-04 15:29:34 -08:00
.CooCoo 1b02d80af7 Merge pull request #10855 from dotCooCoo/fix/confined-marked-links-keep-canvas-markers
Links: a confined links.marked call leaves the canvas markers alone
2026-12-04 15:29:25 -08:00
.CooCoo 88694da6eb Merge pull request #10628 from dotCooCoo/fix/script-remove-trace-source
Scripts: remove() refuses a tracing's shown source image
2026-12-04 15:29:17 -08:00
.CooCoo d802cf3cd5 Merge pull request #9259 from dotCooCoo/feat/scripts-api-layer-path-items
Scripts: layers and groups give their own path items
2026-12-04 15:29:12 -08:00
dotCooCoo 2dc8a41ff8 Merge main into fix/webp-embed-icc 2026-12-04 15:24:10 -08:00
dotCooCoo 87778a672b WebP export: Embed ICC Profile writes the sRGB profile in an ICCP chunk
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.
2026-12-04 15:24:10 -08:00
dotCooCoo 7dc78396e0 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-04 15:11:24 -08:00
dotCooCoo 2b5ca4f2ad Merge main into fix/placed-dimension-composite-font 2026-12-04 15:04:24 -08:00
dotCooCoo a6b3d0c0a9 DWG: .dwt templates and .dws standards files open as DWG drawings
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.
2026-12-04 14:44:29 -08:00
dotCooCoo 89d2a0374a Merge main into fix/dxf-group-block-reference 2026-12-04 14:42:36 -08:00
dotCooCoo 63bc8cbf77 Merge main into fix/cad-clipboard-paste 2026-12-04 14:33:04 -08:00
dotCooCoo 889327e85d Paste: read CAD apps' metafiles on Windows and copied DXF, DWG and HP-GL files
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.
2026-12-04 14:32:59 -08:00
dotCooCoo b117e7fa90 DXF export: Always Export Group as Block Reference
DXF Options gets the check box Always Export Group as Block Reference,
and document.exportDxf and document.export take groupBlocks. It is off
by default, and the CNC / CAM preset does not set it. When it is on,
each group is written as a block definition holding its contents,
placed by one INSERT on the group's layer at the origin, unscaled, so
its entities keep their coordinates. A group inside it becomes a block
placed inside that block, and a group that writes no entity writes no
block. Block names come from the group names ("Group" for an unnamed
group), made unique with _2, _3 and so on, and follow each version's
naming rules. It works in every version from R12 to 2018.

The craft-libs revs move to 35709fdb (storytold/craft-libs#5381 on top
of the current pin 77ade517), whose drawing writer writes block
definitions and INSERT entities. A drawing without groups, or with the
option off, is written as before.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md.
2026-12-04 14:23:44 -08:00
.CooCoo 15d90d3f53 Merge pull request #10852 from dotCooCoo/fix/placed-undefined-family-composite
Place: placed type keeps its font when the document has a composite font of its family's name
2026-12-04 14:20:12 -08:00
.CooCoo e24c62bf75 Merge pull request #10836 from dotCooCoo/fix/preview-new-id-lookups
Lookups: previews find an object added since the press without walking the tree
2026-12-04 14:20:07 -08:00
.CooCoo 4c673f3aa1 Merge pull request #10841 from dotCooCoo/fix/pencil-one-preview-per-pass
Pencil: the moves of one frame preview the stroke once
2026-12-04 14:20:02 -08:00