Commit Graph
821 Commits
Author SHA1 Message Date
dotCooCoo 07fb4c17ed Merge main into fix/remove-all-image-frame-clip 2026-12-04 12:23:45 -08:00
.CooCoo 534291eb8f Merge pull request #10818 from dotCooCoo/fix/script-palette-review-9147
Scripts: palette events keep drags, drafts and frames as the person left them
2026-12-04 11:42:17 -08:00
.CooCoo 4db38b885e Merge pull request #9300 from dotCooCoo/feat/scripts-show-color-picker
Scripts: app.showColorPicker asks for a color
2026-12-04 11:42:06 -08:00
dotCooCoo b28b7b11b7 Merge main into fix/remove-all-image-frame-clip
# Conflicts:
#	docs/target-app-parity.md
2026-12-04 09:32:54 -08:00
dotCooCoo 07c33b9f2a Scripts: pathItems.removeAll judges a kept clipping region by its live effects
The check that an image or placed-document frame still encloses an area
now measures each subpath from its own first point, so a tiny frame far
from the origin is not lost to roundoff and a collapsed frame is not
counted through roundoff.

When a live geometry effect, such as an Offset Path inset, would leave
no clipping region once the paths are deleted, removeAll() now throws and
deletes nothing. The preflight copies only the members that hold a path
being deleted.
2026-12-04 09:32:28 -08:00
dotCooCoo 6a19b804f7 Merge main into fix/remove-all-trace-group 2026-12-04 08:00:18 -08:00
.CooCoo ef168fad05 Merge pull request #10665 from dotCooCoo/fix/remove-all-empty-compound-mask
Scripts: pathItems.removeAll cannot empty a compound path that clips other art
2026-12-04 06:56:17 -08:00
dotCooCoo 761f99fc5a Scripts: pathItems.removeAll keeps a clipping path that still holds an image
The document's pathItems.removeAll() refused to delete paths from a group
that is a clipping path when an image or placed document stayed inside
that group, although the image's frame still clips. It now counts the frame
of a visible image or placed document as clipping geometry when the frame
encloses an area, as Node::clip_shapes does, and still refuses when the
frame is collapsed to a line.
2026-12-04 06:49:26 -08:00
dotCooCoo 90b6a7640b Scripts: palette events keep drags, drafts and frames as the person left them
Follow-up to the review of #9147 (script palettes):

- A waiting click or change that can no longer run (its control was
  disabled, hidden or removed by an earlier handler) is dropped before
  the open edit is settled, so it no longer commits or cancels a drag
  in the active document with no handler run.
- A palette title or other getter that hides or closes the palette
  while the palette is being described no longer sends that
  description to the host: the host keeps the controls the palette had
  when it was hidden.
- A typed text that matches the field's stored text is still given to
  the script, before a click, a close or on focus loss, when another
  change of that field waits, so the handler reads the typed text and
  not the waiting change.
- After a palette event's run fails to begin, the app does not retry
  and ask for a frame on every pass. It tries again after the next
  input in the window, another palette event, or a change to the
  documents' edit state, the active document or the recovery settings.
- The print test now checks that the click's handler ran after the
  print jobs were canceled, and the list test only fails when the
  earlier item's text changed.
2026-12-04 02:54:11 -08:00
dotCooCoo 232b9e1597 Merge main into feat/scripts-show-color-picker 2026-12-04 01:13:39 -08:00
dotCooCoo 573b2da1b4 Merge main into fix/remove-all-trace-group 2026-12-04 00:43:34 -08:00
dotCooCoo 62e09de5ac Merge main into fix/remove-all-empty-compound-mask 2026-12-04 00:43:34 -08:00
dotCooCoo c62ddb2b33 Merge main into fix/script-paths-locked-layer 2026-12-04 00:43:34 -08:00
dotCooCoo fa8d7dbe1d Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 11:43:15 -08:00
dotCooCoo 8245421df6 Merge main into fix/script-paths-locked-layer 2026-12-03 11:27:43 -08:00
dotCooCoo 1abaf78e8f Merge main into fix/remove-all-trace-group 2026-12-03 11:24:46 -08:00
.CooCoo 64a7515fea Merge pull request #9147 from dotCooCoo/feat/scripts-scriptui-palettes
Scripts: ScriptUI palettes stay open after the run and run their handlers in line
2026-12-03 11:24:20 -08:00
dotCooCoo 6100517eab Merge main into feat/scripts-show-color-picker 2026-12-03 11:12:25 -08:00
.CooCoo 6ec7bdd244 Merge pull request #10696 from dotCooCoo/fix/global-edit-stale-points
Scripts: path points of other Global Edit members go stale when Global Edit changes them
2026-12-03 10:46:39 -08:00
dotCooCoo d027865eea Merge main into fix/script-paths-locked-layer 2026-12-03 10:44:44 -08:00
dotCooCoo 65b85dbc8f Merge main into fix/remove-all-trace-group 2026-12-03 10:42:38 -08:00
dotCooCoo be47572304 Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 09:36:45 -08:00
dotCooCoo c4a737f255 Merge main into feat/scripts-scriptui-palettes 2026-12-03 09:29:28 -08:00
dotCooCoo 0a990cecd1 Merge main into fix/remove-all-empty-compound-mask 2026-12-03 09:04:30 -08:00
dotCooCoo 5ff65970f9 Merge main into fix/global-edit-stale-points 2026-12-03 08:56:53 -08:00
.CooCoo d91cf654b3 Merge pull request #10699 from dotCooCoo/fix/script-point-undo-selection
Scripts: undoing a point write selects the anchors it dropped again
2026-12-03 08:48:47 -08:00
.CooCoo dbacda04ee Merge pull request #10698 from dotCooCoo/fix/script-text-spot-color
Scripts: a text color assigned in a CMYK document is compared as the document stores it
2026-12-03 08:47:10 -08:00
dotCooCoo a857b49af4 Main: removeAll on a clipping path passes on a stale-point error
#10682 made paths::see_all_points return a Result; d22384d6 had added a call in the mask-release path of removeAll that ignored it, so clippy -D warnings fails on main. The call now passes the error on with ?, as the other three callers do.
2026-12-03 08:46:32 -08:00
.CooCoo fff1c92179 Merge pull request #10682 from dotCooCoo/fix/script-point-scan-charged
Scripts: the look for changed path points after each command is charged
2026-12-03 08:22:32 -08:00
dotCooCoo 96e3535c45 Merge main into fix/global-edit-stale-points 2026-12-03 07:45:26 -08:00
dotCooCoo 199b92bd5c Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 07:44:01 -08:00
.CooCoo fc19f5a42d Merge pull request #10664 from dotCooCoo/fix/action-playback-current-artboard
Scripts: doScript steps act on the artboard the script made active
2026-12-03 07:36:06 -08:00
.CooCoo a64c923e04 Merge pull request #10658 from dotCooCoo/fix/layer-selection-scans
Scripts: hasSelectedArtwork selects inside an isolated group and charges its scans
2026-12-03 07:35:25 -08:00
.CooCoo de71cfc9ef Merge pull request #10654 from dotCooCoo/fix/script-image-matrix-locks
Scripts: image matrix assignment refuses locked and hidden images
2026-12-03 07:34:43 -08:00
.CooCoo 6d2b626597 Merge pull request #10653 from dotCooCoo/fix/script-transform-stroke-limit-empty-path
Scripts: transforms keep path strokes within 1000 points and take empty paths
2026-12-03 07:34:28 -08:00
.CooCoo 06d4971200 Merge pull request #10648 from dotCooCoo/fix/dxf-unit-scale-ratio-percent
Scripts: ExportOptionsAutoCAD.unitScaleRatio is a percentage
2026-12-03 07:34:11 -08:00
.CooCoo 4ed98d68c1 Merge pull request #10645 from dotCooCoo/fix/legacy-tracing-first-sight
Scripts: tracings saved without their record catch artwork added before the script reaches them
2026-12-03 07:33:48 -08:00
.CooCoo 9a21dae940 Merge pull request #10636 from dotCooCoo/fix/script-image-read-once
Scripts: placing or relinking an image reads its file once
2026-12-03 07:32:03 -08:00
.CooCoo 79fdfedfb5 Merge pull request #9075 from dotCooCoo/feat/scripts-api-d8c-rasterize-capture
Scripts: Document.rasterize and Document.imageCapture with their option classes
2026-12-03 07:14:28 -08:00
dotCooCoo fc9d77032f Scripts: pathItems.removeAll counts a list marker as a clip outline
The document's pathItems.removeAll() skipped text whose characters are
all whitespace before laying it out, so a numbered paragraph holding a
single space did not count, although its number clips. The deletion was
then refused while the mask would still clip.

- Whitespace-only text is laid out like other text.
- Text is laid out only inside a mask that loses a path, so documents
  with text outside such masks do no layout for the check.
- A test covers a mask left with only a list number.
- docs/mcp.md says blank text without a list marker does not count.
2026-12-03 03:19:03 -08:00
dotCooCoo 4a1ac38ac3 Scripts: a Linux folder whose casefold flag can't be read is taken as casefolded
When the folder can't be opened or `FS_IOC_GETFLAGS` fails, `casefolded`
returned false, so `imageCapture` treated names that differ only in their
normalization form as two files and could write over a source document.
It now returns false only when the flags are read and the flag is clear.
2026-12-03 02:59:58 -08:00
dotCooCoo ade0e47f48 Scripts: refused writes create no file; Linux reads the casefold flag
A refused rename that falls back to copying into the target no longer
creates a missing target before the final authorization check. The
target is created only after that check, on every platform, so a
refusal at the final check leaves the path absent. An existing target
is still opened with O_CREAT, so Linux's fs.protected_regular applies.

imageCapture no longer treats an empty Linux folder as ignoring the
Unicode normalization form. It reads the folder's casefold inode flag
(FS_IOC_GETFLAGS) instead, so a missing linked cafe\u{301}.png no longer
matches cafe\u{e9}.png in an ordinary folder, and a casefolded folder
still matches both spellings.
2026-12-03 02:35:18 -08:00
dotCooCoo 4bbfb2d4af Scripts: pathItems.removeAll counts only type that draws glyphs as a clip outline
The document's pathItems.removeAll() counted any visible text object as
geometry that keeps a clipping mask clipping. Blank type and area type too
short for its first line lay out no glyphs, so the clip renderer clips by
nothing for them; deleting the mask's last path then hid the clipped art.

- Text counts only when it is visible and its layout gives glyph outlines.
- A clipping group nested in the mask counts only its first member.
- Hidden objects and members of hidden groups do not count.
- Tests cover blank, overset, hidden and nested-clipped type, and type
  with glyphs that still allows the delete.
- docs/mcp.md states the rule.
2026-12-03 02:17:57 -08:00
dotCooCoo d420a37ba0 Merge main into fix/remove-all-trace-group 2026-12-03 01:55:47 -08:00
dotCooCoo 895b542409 Merge main into fix/remove-all-empty-compound-mask 2026-12-03 01:54:59 -08:00
dotCooCoo 0d9dfe6bb8 Merge main into fix/script-clipped-hidden-top 2026-12-03 01:54:05 -08:00
dotCooCoo 4ada69770b Scripts: pathItems.removeAll deletes a clipping path when visible text still clips
A group that clips by a mask holding a path and a text object keeps
clipping by the text's outlines after the path is deleted, so
Document.pathItems.removeAll() no longer refuses that case. Hidden
text and hidden subgroups do not clip, so a mask left with only those
still refuses. docs/mcp.md describes the rule.
2026-12-03 00:34:07 -08:00
dotCooCoo 4e90d6c211 Scripts: same_folder builds without a needless bool on Windows
On Windows the Unix block in same_folder is compiled out, which left
`if a == b { return true; } false` and failed clippy's needless_bool
lint with -D warnings in the Windows CI run. The early return now sits
inside the Unix block and the other platforms compare the paths.
Behavior is unchanged on every platform.
2026-12-03 00:09:32 -08:00
dotCooCoo 7a480a7524 Scripts: new paths skip a locked or hidden active layer
Document.pathItems.add() and the shape creators passed the active layer
as onLayer even when it was locked or hidden, so path.create refused it
and the script threw, while textFrames.add() and the app's own creation
commands put the new art on the topmost shown, unlocked layer. The path
creators now choose that layer the same way. While an opacity mask,
pattern or symbol is being edited, they use that edit's layer, and a
locked or hidden editing layer still throws. When every layer is locked
or hidden, the call throws and makes no path.

The creators came in with #9304.
2026-12-02 23:31:52 -08:00
dotCooCoo f4ee5e7be3 Scripts: match the point write's undo step after the switch to its document
Making a background document active can measure its type again and replace the document, so the undo step is now found by the document read after the switch. A test covers a background document whose text is measured again.
2026-12-02 23:26:40 -08:00