Commit Graph
315 Commits
Author SHA1 Message Date
dotCooCoo 31ee8eacac Merge main into feat/scripts-api-d11-perspective-presets 2026-12-04 16:27:03 -08:00
dotCooCoo bb244bcd4b Merge main into feat/scripts-api-d11-perspective-presets 2026-12-04 15:03:04 -08:00
dotCooCoo 49186cb426 Merge main into feat/scripts-api-layer-path-items 2026-12-04 12:28:26 -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 8b394a116d Merge main into feat/scripts-api-d11-perspective-presets 2026-12-04 08:02:00 -08:00
dotCooCoo 1ae7a5d5cb Merge main into feat/scripts-api-layer-path-items 2026-12-04 08:00:07 -08:00
dotCooCoo d5a54ccffa Merge main into feat/scripts-api-layer-path-items 2026-12-04 02:57:25 -08:00
dotCooCoo 570a7bfe6f Scripts: the active artboard stays active when the script adds or removes one before it
Adding, inserting or removing an artboard from a script now keeps the
artboard that was active before the change by its id, as
setActiveArtboardIndex does, also when the script never chose one. Before,
with no artboard chosen, an artboard inserted at index 0 became the active
one, so later app.doScript steps acted on it. A stored id of a removed
artboard no longer stops the fallback from being kept, and a document the
run made is reported when its active artboard moves.

The script run summary in docs/target-app-parity.md now says that showing
or hiding a perspective grid and its active plane add no undo step.
2026-12-04 01:42:03 -08:00
dotCooCoo 62e09de5ac Merge main into fix/remove-all-empty-compound-mask 2026-12-04 00:43:34 -08:00
dotCooCoo b66305bb59 Merge main into feat/scripts-api-d11-perspective-presets 2026-12-04 00:40:04 -08:00
dotCooCoo 8e23837867 Merge main into feat/scripts-api-layer-path-items 2026-12-03 11:15:06 -08:00
dotCooCoo 27642fbc81 Merge main into feat/scripts-api-d11-perspective-presets 2026-12-03 11:12:52 -08:00
dotCooCoo 6100517eab Merge main into feat/scripts-show-color-picker 2026-12-03 11:12:25 -08:00
dotCooCoo be47572304 Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 09:36:45 -08:00
dotCooCoo 0a990cecd1 Merge main into fix/remove-all-empty-compound-mask 2026-12-03 09:04:30 -08:00
dotCooCoo 199b92bd5c Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 07:44:01 -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 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 7e8c6bae5c Merge main into feat/scripts-api-layer-path-items 2026-12-03 02:24:07 -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 8793acf814 Merge main into feat/scripts-api-d11-perspective-presets 2026-12-03 01:55:09 -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 aeb11d6809 Merge main into feat/scripts-api-layer-path-items 2026-12-02 23:30:42 -08:00
dotCooCoo 85d9759773 Merge main into fix/doc-pathitems-removeall-clipping 2026-12-02 22:49:14 -08:00
dotCooCoo 13488c3103 Scripts: document pathItems.removeAll refuses to delete a clipping path
Document.pathItems.removeAll() deleted every path of the document even when
one was the clipping path of a group or layer that keeps other objects, so
the next object became the clipping path. The scoped collections already
refuse this. The document's collection now runs the same check before
anything is deleted, and also refuses when it would empty a compound path or
group that clips other objects. edit.clear removes an emptied compound path
and keeps an emptied group, and the check follows it.

The fault came with #9041, which added Document.pathItems.
2026-12-02 22:10:09 -08:00
dotCooCoo 72e99d1c3b Merge main into feat/scripts-layer-text-frames 2026-12-02 21:17:26 -08:00
dotCooCoo 8696df27f6 Merge main into feat/scripts-show-color-picker 2026-12-02 21:09:03 -08:00
dotCooCoo b29dd24c22 Merge main into feat/scripts-api-d11-perspective-presets 2026-12-02 20:37:02 -08:00
dotCooCoo f46d591204 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 20:30:16 -08:00
dotCooCoo c4ba200e9a Scripts: played steps follow the active artboard after the script adds or removes one
A script that removed or inserted an artboard before the active one left
the steps app.doScript plays on the index the run started with, so an
Align to Artboard step acted on a different artboard than
getActiveArtboardIndex() and the run's report gave. Adding, inserting or
removing an artboard through artboards or Artboard.remove() now makes
playback use the active artboard by id, as setActiveArtboardIndex does,
which also follows an undo inside the run.

- The locked-artboard removeAll test reads the collections' lengths
  inside the run after catching the refusal, so a delete before the
  refusal fails it.
- layer.setProps and docs/mcp.md give dimImages: true as 50%.
- docs/mcp.md says artboards.insert reorders only when the new artboard
  is not already at the index, and describes the playback rule.
- The Document.views progress line no longer says Type is missing.
2026-12-02 20:13:56 -08:00
dotCooCoo fabc6c45ad Scripts: pathItems.removeAll cannot empty a compound path that clips other art
`removeAll()` on the `pathItems` of a compound path deleted every path even
when the compound path was the clipping path of a group or layer that keeps
other objects, which left an empty clipping path. It now throws the same
"cannot delete a clipping path" error that deleting the clipping path itself
gives, and deletes nothing. The collection `removeAll()` came in with #9048.
2026-12-02 19:30:12 -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 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 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 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 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 44b238b814 Merge main into feat/scripts-text-paint 2026-12-02 15:51:24 -08:00
dotCooCoo dfff55991f Merge main into feat/scripts-api-layer-path-items 2026-12-02 15:42:39 -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
dotCooCoo 60383e1ac1 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 15:28:08 -08:00
dotCooCoo 1a4b4be93e Merge main into feat/scripts-show-color-picker 2026-12-02 15:27:47 -08:00
dotCooCoo d73dad7ee0 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 14:38:27 -08:00