Commit Graph
12649 Commits
Author SHA1 Message Date
dotCooCoo ebf7ebd063 Docs: opening a path deselects its closing segment and the ends it alone held
docs/mcp.md said that setting `closed` keeps the direct selection. Setting
it to false removes the closing segment, so the selection drops that
segment and each of its end anchors that no other selected segment uses.
The tests opening_a_path_* in crates/engine/src/tests/script_dom_paths.rs
cover these cases.
2026-12-02 18:58:47 -08:00
dotCooCoo 27e10129bd Scripts: hasSelectedArtwork selects inside an isolated group and charges its scans
While a group is isolated, `layer.hasSelectedArtwork = true` looked only at
the layer's top-level art, which is not selectable in isolation, so it
selected nothing. It now takes what Select All takes in isolation: the art
inside the isolated group (through any sublayer it holds), or the isolated
object itself, and nothing when the isolated object or what holds it is
hidden or locked. While Lock Guides is on, paths made into guides are not
counted as art to add, so they no longer trip the selection limit.

Reading `hasSelectedArtwork` now counts each selected object it checks
toward the script's operation budget, as the setter already did.

Follows #9048, which added the property.
2026-12-02 18:44:27 -08:00
dotCooCoo 0d8a56cfde Scripts: zOrderPosition reuses the layer list; textFrames.removeAll releases masks
- Layer.zOrderPosition reads the sibling list through the cached layer
  lists, so reading it for every layer of a loop lists the layers once.
  Each read is still charged for the search through the list.
- TextFrames.removeAll releases the mask of a group or layer whose
  clipping path is one of the type objects it deletes, as
  PageItems.removeAll and remove() do, so the object above the type is
  not made the clipping path.
- GroupItems.createFromFile checks that its collection is still there
  first, so a collection whose group was deleted throws "Stale page item"
  instead of the not-available message. docs/mcp.md says so.
2026-12-02 18:44:26 -08:00
dotCooCoo 192c015f09 Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-02 18:27:53 -08:00
dotCooCoo dc11714200 Scripts: removeAll cannot leave an image first in a group named Image Trace
groupItems.removeAll() and compoundPathItems.removeAll() could delete the
bottom object of an ordinary group named "Image Trace" and leave an image
first in it, which made that group read as a tracing. They now throw
"Only Image Trace can make a tracing" before anything is deleted, as move,
remove() and zOrder do. The check came in with #9048's collection
removeAll.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-12-02 18:27:40 -08:00
dotCooCoo 774762bbf6 Print: file.print refuses a null paper, and only the local scheduler's sockets read its PPDs
`file.print` treated `paper: null` like an omitted `paper`; a null value is
now an error, as the params text already says for anything but a keyword.
The Print dialog leaves `paper` out of its job when the driver lists no
keyword for the Size chosen.

A `CUPS_SERVER` or `ServerName` that names a domain socket counted as this
machine's scheduler for any path, so the dialog read `/etc/cups/ppd` for a
second scheduler on another socket. Only CUPS's own sockets, the sockets
the `Listen` lines of `/etc/cups/cupsd.conf` name, and links to either now
read the local PPDs. The IPP lookup asks `localhost:631` for CUPS's own
sockets and links to them only. A `\#` in a `cupsd.conf` path keeps its `#`,
as in `client.conf`.

Follows up #10581.
2026-12-02 18:27:36 -08:00
dotCooCoo 9e3327da32 Merge main into feat/print-per-job-settings 2026-12-02 18:25:50 -08:00
dotCooCoo 4010eb5be2 Merge main into feat/scripts-api-layer-path-items 2026-12-02 18:24:31 -08:00
dotCooCoo c1470adfc6 Merge main into feat/scripts-text-paint 2026-12-02 18:14:59 -08:00
dotCooCoo cca97099a7 Scripts: image matrix assignment refuses locked and hidden images
Assigning `matrix` to a placed or raster image ran `object.transform` on a
locked or hidden image, an image inside a locked or hidden layer or group,
and an image on a locked artboard. The transform methods (`translate`,
`rotate`, `resize`, `transform`) refuse all of these with nothing changed.
The setter now refuses them with the same errors, before the unchanged
matrix check, so assigning the current matrix to such an image throws too.
The locked artboard check uses the cached lookup that `editable` uses.

The setter came in with #9062.

Docs: docs/mcp.md.
2026-12-02 18:02:52 -08:00
dotCooCoo 1f32f01394 Docs: say when a bad exportForScreens value throws after files are written
A bad option value throws before anything is written. The scale of each
item is checked before its export writes, but each region gets its own
scale from a size, so a later export can throw after the earlier
exports wrote their files, and an item too large to draw throws after
the files before it.
2026-12-02 17:59:17 -08:00
dotCooCoo a70c687ee0 Docs: a tracing saved without made is checked only for artwork added in the run
The Scripts line for Image Trace now says that retracing or releasing a
tracing saved without `made` can discard artwork added before the run,
and that the opacity mask check applies with or without `made`.
2026-12-02 17:58:23 -08:00
David MannandClaude Opus 5.5 a7652fff9d fix(agents): address review: edited agent fields only, --when-closed error without a settings folder, docs
- Preferences OK sends only the agent settings changed in the window, before prefs.set, so a refused one
  applies nothing and one changed through prefs.agents while the window is open keeps its value.
- mcp --when-closed error refuses when there is no settings folder instead of going headless.
- Docs: automation roots make plain mcp headless; a session that went headless needs a new MCP session
  for the window; a window-run export may still finish after cancellation; crate docs name the
  closed-app choices.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:58:15 +01:00
dotCooCoo a227132cac Docs: clipped = true alone checks the topmost object 2026-12-02 17:58:11 -08:00
dotCooCoo 99a04b9a78 Scripts: transforms keep path strokes within 1000 points and take empty paths
`resize` and `transform` with `changeLineWidths` at the transformation's own
scale scaled a path's strokes past the 1000-point limit that other line
widths enforce, and could store a NaN weight for a scale too large for a
number. Every stroke layer the transformation scales is now checked against
the limit with the factor the transformation applies.

`rotate`, `resize` and `transform` threw "the object has no bounds" on a
path without points whenever the call named or defaulted to a point of the
bounds. Such a path now takes the transformation about the origin, or the
first artboard's bottom-left corner for `Transformation.DOCUMENTORIGIN`,
so its linked mask, strokes, effects and patterns still transform.

Both faults came in with #9295.
2026-12-02 17:52:07 -08:00
dotCooCoo e4e6dd517d Merge main into feat/scripts-layer-text-frames 2026-12-02 17:49:12 -08:00
dotCooCoo a7c6ff1d43 Scripts: clipped = true refuses a hidden or locked topmost object
Assigning `clipped = true` to a GroupItem checked only that the group and
its layer were editable, so a hidden or locked topmost object lost its fill
and stroke and became the clipping path. The setter now refuses that object
before running the command, with no undo step. The setter came from #9048.
2026-12-02 17:45:14 -08:00
dotCooCoo 3ada75ba6b Merge main into fix/dialog-keys-ui-inspect 2026-12-02 17:41:45 -08:00
dotCooCoo b51d13d2a4 New document: a replayed rows count over 1000 is kept to 1000
A file.new step replayed from a journal or the Actions panel rounded
artboardLayout.rows and then refused a result over 1000, so a step with
rows 1000.5 or 5000 stopped the playback. The rows count now follows the
columns rule: it is rounded, must be 1 or more, and is kept to at most
1000. Recent stores the kept count. docs/mcp.md says the same.
2026-12-02 17:28:48 -08:00
dotCooCoo 1922ba20c9 Scripts: ExportOptionsAutoCAD.unitScaleRatio is a percentage
The scripting reference gives unitScaleRatio as the ratio, as a
percentage, by which the output is scaled, from 0 to 1000. exportFile
passed it to the DXF writer as drawing units per unit, so 100 wrote
the drawing 100 times too large and 1 wrote it at full size.

- The value is divided by 100 before it reaches the DXF writer, and a
  value left out still writes at full size (100).
- A value below 0.0001, which the writer's smallest scale cannot
  represent, throws a range error at the script instead of an error
  about the DXF scale from the writer.
- docs/mcp.md describes the percentage and the default of 100.

The option was added in #9266.
2026-12-02 17:27:06 -08:00
David MannandClaude Opus 5.5 04da4edc77 docs(mcp): the macOS CLI path names /Applications as the default
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:26:08 +01:00
dotCooCoo 2df0b911e8 Merge main into feat/scripts-show-color-picker 2026-12-02 17:26:02 -08:00
dotCooCoo a7c7dae179 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 17:25:26 -08:00
dotCooCoo dd62352a8a Merge main into feat/scripts-export-for-screens 2026-12-02 17:20:50 -08:00
.CooCoo 15cc3b048f Merge pull request #10581 from dotCooCoo/fix/print-paper-size-to-cups
Print: the job asks CUPS for the paper size chosen
2026-12-02 17:20:21 -08:00
dotCooCoo d8caffae61 Merge main into feat/scripts-scriptui-palettes 2026-12-02 17:15:19 -08:00
.CooCoo cd502f08e8 Merge pull request #9073 from dotCooCoo/feat/scripts-api-d1b-prefs-matrix-clipboard
Scripts: app gives scripts preferences, matrices and the clipboard
2026-12-02 17:08:38 -08:00
dotCooCoo f52ff9b4ec Docs: gaps.md no longer lists script tracing as missing
The Scripts entry said tracing images from scripts was still missing and
listed placed and raster images twice. Scripts trace images with
`trace()` since #9062 (`crates/engine/src/script/dom/tracing.rs`), as
the same entry says a few lines later, so the earlier sentence drops the
duplicate and the stale claim. Rasterizing and capturing images stay
listed as missing.
2026-12-02 17:08:07 -08:00
David MannandClaude Opus 5.5 3e699b4d21 feat(automation): agents in the open window through the ArtCraft Launcher's switch
While the launcher's Settings > AI agents switch names VectorCraft, the
window serves its control channel on loopback with craft-libs' AgentLink
and publishes agent-connection.json; plain `vectorcraft-cli mcp` finds it
on every tool call through the shared Live (challenge handshake, no port or
token in client configs) and otherwise runs headless or follows the
closed-app choice. Agent requests in the window are confined to the agent
folders. Preferences gets an AI Integrations page (the shared Agents page),
saved through the new UI command prefs.agents, which agents can't change.
New MCP tool agent_folders; `--when-closed`; `--connect` deprecated.

Closes #10621, closes #1470, closes #10453.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-03 02:07:29 +01:00
dotCooCoo 79ef692ce5 Scripts: palette events keep their checks after getters and print questions
- paletteClose with another engine's palette id no longer drops that
  palette's waiting events.
- A hidden palette is not described after a run or an add, so a
  throwing getter on it no longer fails the run; script.palettes and
  docs/mcp.md say a hidden palette lists its controls as they were.
- A check box's click rechecks the box after reading its value, so a
  getter that disables it or closes the palette stops the click.
- A list's change rechecks that the list is still enabled and visible
  after its item texts are read, and is dropped when a getter disabled
  or hid it.
- A waiting palette event does not start its run, or ask for frames,
  while the last run's print jobs wait for their answer.
- script.palette.event's help states that a change merges only after
  its palette's last waiting click or close.
2026-12-02 17:05:59 -08:00
dotCooCoo 0a2d25e334 Merge main into feat/scripts-export-for-screens 2026-12-02 17:00:47 -08:00
dotCooCoo 73a9eca70a Merge main into fix/tracing-mask-art 2026-12-02 16:55:55 -08:00
.CooCoo 5d8deddaf0 Merge pull request #9048 from dotCooCoo/feat/scripts-api-d3-layers-artboards
Scripts: documents give scripts their layers, groups, compound paths and artboards
2026-12-02 16:50:47 -08:00
dotCooCoo fbe16e8143 Scripts: retracing and releasing refuse any opacity mask on traced artwork
The check for added artwork compared mask art by id. A mask made with
Make Opacity Mask from two traced paths keeps the art's id, which the
tracing records as made, and a tracing saved without that record took
a mask it already held as part of its own objects. Retracing or
releasing then discarded the mask without the refusal.

An opacity mask on the tracing or on any object in it other than the
source image now makes retracing and releasing refuse, whatever the
ids of its art. The source image keeps its own mask as before.
2026-12-02 16:46:42 -08:00
dotCooCoo 7b433a52fe Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 16:27:15 -08:00
dotCooCoo e556406652 Scripts: loading the same built-in preset with or without brackets does not trace again
`vectorcraft_trace::preset` accepts a built-in preset's name with or
without brackets (`[Default]`), but `TracingOptions.loadFromPreset`
compared the tracing's stored preset name with the requested one as
given. Loading `[Default]` on a tracing made with `Default` (or the
other way round) with unchanged options traced the image again and
added an undo step. The comparison now strips the brackets from
built-in preset names on both sides. Saved presets keep the exact
comparison.

The check came in with #9077.
2026-12-02 16:14:06 -08:00
dotCooCoo dc94ae977c Docs: matrix records passed in need only the six mValue fields
The matrix functions read only mValueA to mValueTY from a record passed
in. The typename "Matrix" is on the records they give back.
2026-12-02 16:10:05 -08:00
dotCooCoo ea752548df New Document: reject a bad preset or presetCategory instead of ignoring it
file.new and file.newPresets.save read `preset` and `presetCategory`
with str_param, so a value that is not a string was dropped and the
call went on with the default settings or the search of every category.
An unknown category reported "no preset called" instead of naming the
category, and a presetCategory without a preset was dropped.

Each of these is now an error, with the same "unknown category" message
file.newPresets gives. Null still leaves a param out, and a replayed
journal step reads the params as before, so saved steps still play.
presetCategory came in with #9295.
2026-12-02 16:09:00 -08:00
.CooCoo e72ff7480d Merge pull request #9062 from dotCooCoo/feat/scripts-api-d8-placed-raster
Scripts: documents give scripts their placed and raster images
2026-12-02 16:07:47 -08:00
dotCooCoo aa4cce5080 Merge main into feat/scripts-api-layer-path-items 2026-12-02 16:02:05 -08:00
dotCooCoo 70504f6dfe Merge main into feat/scripts-layer-text-frames 2026-12-02 16:02:05 -08:00
dotCooCoo bbc6772b6a Merge main into feat/scripts-api-d5-swatches-symbols 2026-12-02 15:57:11 -08:00
dotCooCoo 98c6e5fb20 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:57:11 -08:00
.CooCoo c800d92d1f Merge pull request #10610 from dotCooCoo/fix/one-column-rail-edit-toolbar
Tools: show Edit Toolbar alone in the one-column rail
2026-12-02 15:54:40 -08:00
dotCooCoo 44b238b814 Merge main into feat/scripts-text-paint 2026-12-02 15:51:24 -08:00
dotCooCoo 15d11beb83 Print: a second scheduler on a loopback port supplies its own paper sizes
A `CUPS_SERVER` or `ServerName` of `localhost`, `127.0.0.1` or `::1` counts
as this machine's scheduler only with no port or port 631. On another port
(a second CUPS instance) the dialog no longer reads `/etc/cups/ppd`, whose
queues belong to the default scheduler, and asks `lpoptions` and IPP
instead.

When the named server is one of CUPS's own domain sockets and neither the
PPD nor `lpoptions` lists sizes, the IPP lookup asks `localhost` on the IPP
default port, as it already does when no server is named. `ipptool` rejects
a URI whose host is a socket path (`httpSeparateURI` in CUPS's
`cups/http-support.c`), so another socket path is not asked.
2026-12-02 15:48:30 -08:00
dotCooCoo dfff55991f Merge main into feat/scripts-api-layer-path-items 2026-12-02 15:42:39 -08:00
.CooCoo 822651dc7a Merge pull request #9266 from dotCooCoo/feat/scripts-export-autocad
Scripts: exportFile writes DXF with ExportOptionsAutoCAD
2026-12-02 15:42:04 -08:00
dotCooCoo e369013463 Merge main into feat/scripts-api-d3-layers-artboards 2026-12-02 15:37:51 -08:00
dotCooCoo 217c33d46e Merge main into feat/scripts-layer-text-frames 2026-12-02 15:29:55 -08:00