Commit Graph
3369 Commits
Author SHA1 Message Date
dotCooCoo e4830a0e2c Docs: the Script Console note shows only after dropped or cut lines
The panel's note and the doc comment on ui.copyScriptConsole now say the
count of dropped and cut lines appears only when there are any, and the
returned lines count leaves that line out.
2026-11-10 18:51:13 -08:00
dotCooCoo 6643991710 Docs: ui.copyScriptConsole adds the count line only after dropped or cut lines
A copy of every Script Console line starts with the count of dropped and
cut lines only when there are any, and the returned lines count leaves
that line out. The end-line text is described without a code span that
ends in a space.
2026-11-10 18:30:11 -08:00
dotCooCoo df9c8d992d Merge main into feat/script-console 2026-11-10 17:27:35 -08:00
dotCooCoo 342d082c2b Scripts: Window › Script Console shows script output, errors and run reports
Scripts write to a new Script Console with $.write(...values) and
$.writeln(...values), each value as String(value) gives it. vc.log
entries, a run's uncaught error as name:line:column: message, and a
start, end and report line for each run go there too. The report line
gives the run's time, host calls and slowest commands.

- The console keeps at most 2,048 lines and 1 MiB of text, dropping the
  oldest and counting what it dropped. A line is cut at 4,096 bytes and
  a script's name at 256 bytes, with a count of cut lines. Line feeds,
  carriage returns and CRLF break lines; other control characters show
  as Unicode Control Pictures.
- script.run's result and scriptReport gain runTimeMs, timingAvailable,
  hostCallCounts, slowestCommands and the run's own console. A failed
  run's report has them too.
- script.console and script.console.clear read and empty the console;
  ui.copyScriptConsole {first?, last?} copies lines as the panel shows
  them.
- The panel lays out only the rows in view, selects with click and
  Shift-click, and has Clear, Copy Selected and Copy All. Output goes on
  while it is closed, and Clear works during a run.

Docs: docs/mcp.md, docs/gaps.md, docs/roadmap.md,
docs/target-app-parity.md.
2026-11-10 17:26:30 -08:00
BFlat 6889e49628 Merge pull request #6486 from dotCooCoo/fix/perspective-snap-grid-docs
Perspective grid: docs say when Snap to Grid moves an edge onto a gridline
2026-11-11 08:07:33 +07:00
BFlat afab109722 Merge pull request #6491 from dotCooCoo/feat/prefs-reset-confirmation
Preferences: Reset Preferences asks first
2026-11-11 08:03:03 +07:00
BFlat b08e9df95c Merge pull request #6478 from dotCooCoo/fix/3d-member-opacity-masks
3D: an opacity mask on a group member masks its solids
2026-11-11 07:44:06 +07:00
BFlat 6dbbdb769c Merge pull request #6477 from dotCooCoo/fix/text-style-param-types
Type: character formats, Ruby and Move Type Path Handle reject a param of the wrong type
2026-11-11 07:39:31 +07:00
dotCooCoo 4038232411 Perspective grid: docs say a constrained move snaps only within a quarter cell
A constrained move keeps only the snap correction along its direction, and that correction exists only when an edge ends within a quarter cell of a gridline. When no edge on those axes is that close, the move does not snap.
2026-11-10 16:28:09 -08:00
BFlat e60da871bc Merge pull request #6485 from dotCooCoo/fix/spot-gradient-cmyk-doc-docs
Docs: spot gradients with RGB or Lab stops keep the ink in a CMYK document
2026-11-11 07:26:40 +07:00
dotCooCoo 8413ca6226 Merge main into feat/prefs-reset-confirmation 2026-11-10 16:16:18 -08:00
dotCooCoo 4574ab047d Preferences: Reset Preferences asks first
Part of #6435.

Reset Preferences in the Preferences dialog now opens a question over
the dialog (`resetPreferences`). Cancel or Escape goes back to
Preferences as it was, with its edits, category and search kept. OK goes
back with every preference at its default value; OK in Preferences
applies them and Cancel there discards them, as before. `prefs.reset`
still resets at once.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-10 16:07:25 -08:00
BFlat 745fb4edd7 Merge pull request #6482 from dotCooCoo/fix/prefs-reset-keeps-document-units
Preferences: Reset Preferences leaves the open document's units alone
2026-11-11 07:04:48 +07:00
dotCooCoo 17f149ae2b Perspective grid: docs say which edge Snap to Grid lands on a constrained move
A constrained move keeps only the snap correction along its direction: a horizontal or vertical move lands the edge on its own axis, and a 45° move lands the edge on the axis whose nonzero correction is smaller. The per-axis rule now applies to unconstrained moves only.
2026-11-10 16:00:25 -08:00
BFlat c6f861808b Merge pull request #6481 from dotCooCoo/fix/repeat-param-types
Repeat, Pattern: the Repeat and pattern commands reject a param of the wrong type
2026-11-11 06:57:27 +07:00
BFlat fb10a6092f Merge pull request #6479 from dotCooCoo/fix/cut-ellipse-end-drag
Scissors: a cut leaves one of the two new end points selected
2026-11-11 06:52:41 +07:00
BFlat 8b34f0f826 Merge pull request #6476 from dotCooCoo/fix/answer-dialog-one-request
MCP: answer_dialog sets the fields and answers the dialog in one request
2026-11-11 06:41:16 +07:00
dotCooCoo fc34817d77 Perspective grid: docs say when Snap to Grid moves an edge onto a gridline
docs/mcp.md and docs/target-app-parity.md now state that a move in
perspective snaps an edge of the joint bounds only when it ends within
a quarter cell of a gridline (PerspectiveGrid::snap_offset), and that a
move perpendicular to the plane does not snap (perspective.move skips
snap_fix when perpendicular is true).
2026-11-10 15:37:42 -08:00
dotCooCoo ab27448921 Docs: spot gradients with RGB or Lab stops keep the ink in a CMYK document
Two PDF export passages in docs/target-app-parity.md said a gradient
that mixes a spot color with RGB or Lab stops is always written without
the spot ink, or as an image when Perceptual. A CMYK document, or an
export that converts colors to a CMYK destination profile, writes those
stops in CMYK first, so the gradient is a DeviceN shading that keeps the
ink; an RGB destination profile keeps them in RGB. The passages now say
so, as docs/mcp.md and the paint.editGradient params text already do.

A new test checks the Classic case in an RGB document, a CMYK document,
with a CMYK destination and with an RGB destination.
2026-11-10 15:34:06 -08:00
BFlat 400a3b7f91 Merge pull request #6469 from dotCooCoo/fix/3d-expand-keeps-curves
3D: expanded solids keep the art's curves in caps and the walls' cap edges
2026-11-11 06:32:32 +07:00
dotCooCoo 272dab7b0a Merge main into fix/text-style-param-types 2026-11-10 15:27:58 -08:00
dotCooCoo 6732dbab1e Preferences: Reset Preferences leaves the open document's units alone
Reset Preferences put Points in Units > General, and OK sent it to
prefs.set, which also set the open document's units as an undo step.
OK after Reset now resets the General preference and leaves the
document's units as they are. Choosing a General unit after Reset, in
the dialog or with ui.dialog.set, still sets the document's units.

prefs.set takes documentUnits (default true); false makes unitsGeneral
set only the preference. Docs: params text, docs/mcp.md.

Part of #6435
2026-11-10 15:21:18 -08:00
dotCooCoo 81dc541d5d Repeat, Pattern: the Repeat and pattern commands reject a param of the wrong type
object.repeat.radial, object.repeat.grid, object.repeat.mirror and
object.repeat.options, and object.pattern.make, object.pattern.edit,
object.pattern.saveCopy, pattern.options and pattern.delete, read their
params with helpers that fell back to the default for a value of the
wrong type: "instances": "8" made 8 instances whatever the text said,
"rows": "2" made 3 rows, "edit": "false" entered pattern editing mode,
and a `name` that was not a string edited the selected object's pattern.
Each such value is now an error naming the param, and the document, the
selection and the undo history stay as they were. An omitted or null
param keeps its default.

- pattern.options refuses an `overlap` that is not an object, and an
  `overlap.h` other than left or right or an `overlap.v` other than top
  or bottom.
- object.repeat.options refuses a `center` that is not [x, y].
- object.repeat.radial refuses a negative `radius`; it used the
  automatic radius before.
- object.repeat.grid reads `rows` and `cols` as object.repeat.options
  does: a fraction is cut to a whole number, within 1 to 500.
- object.repeat.options applies `brickOffset` given without `gridType`
  to a brick grid, and its params text lists the key.

Docs: docs/mcp.md.
2026-11-10 15:08:03 -08:00
dotCooCoo 7eb1006abb Scissors: a cut leaves one of the two new end points selected
After a Scissors cut (`path.split`) the whole path stayed selected: both
pieces of an open path, or the opened path of a closed one. A Direct
Selection drag from the cut then moved every anchor, so an ellipse cut
at an anchor could not be pulled open by dragging its end.

- `path.split` selects the first anchor of the piece after the cut and
  nothing else, as `path.cutAtAnchors` does: anchor 0 of an opened
  closed subpath, of the new path when an open path becomes two, or of
  the subpath added to a path of several subpaths.
- A Direct Selection press on anchors of a selected path that lie on top
  of each other takes the selected one. It took the first in path order,
  which in a path of several subpaths was the unselected end.

Docs: docs/mcp.md, docs/target-app-parity.md, the `path.split` params
text.
2026-11-10 15:04:50 -08:00
dotCooCoo bf09404c33 Type: character formats, Ruby and Move Type Path Handle reject a param of the wrong type
`text.setStyle` read `font`, `style` and `justify` with `str_param`,
`size` with `len_param` and `tracking` with `num_param`, so a value of
the wrong type was skipped: `{"size": 30, "style": ["Bold"]}` set the
size and ignored the style, and `{"font": "Inter", "size": [12]}` set
the font and ignored the size. `features` dropped an entry that was not
a string and applied the rest. `text.setRangeStyle` skipped a `font` or
`style` that was not a string, `type.ruby` skipped such a `text`,
`position` or `align`, and `text.setPathHandle` moved the out handle
for any `which` other than "in".

Each of these now returns an error that names the param, before the
command edits the document. Omitting a param or giving null keeps its
default. `size` and `leading` still take a length with a unit
("12 pt", "5 mm"), and `tracking` still takes a number written as a
string ("20").

- `text.setStyle`: `font`, `style`, `justify` (`text_param`), `size`
  and `tracking` (checked reads in `typecmd.rs`), `features`.
- `text.setRangeStyle`: `font`, `style`, `features`.
- `type.ruby`: `text`, `position`, `align`.
- `text.setPathHandle`: `which` must be "in" or "out".

Docs: docs/mcp.md.
2026-11-10 14:56:13 -08:00
BFlat 667237ab47 Merge pull request #6473 from dotCooCoo/fix/opacity-mask-param-types
Transparency: opacity mask commands reject a param of the wrong type
2026-11-11 05:55:33 +07:00
dotCooCoo d9e9adbf45 MCP: answer_dialog sets the fields and answers the dialog in one request
answer_dialog sent ui.dialog.set and then ui.dialog.confirm or
ui.dialog.cancel as two requests. A dialog another control connection
opened between them was confirmed or canceled without the fields.

ui.dialog.set takes `action: confirm | cancel`, checked before any field
is set, and confirms or cancels the dialog the fields were set in within
the same request, replying {dialog, result}. answer_dialog sends set and
action together; an app whose reply has no `dialog` key did not answer
it, and the dialog is then confirmed or canceled with its own request.
2026-11-10 14:51:50 -08:00
BFlat 1ce7b8530a Merge pull request #6471 from dotCooCoo/fix/plugin-no-call-after-failure
Plug-ins: no command call is made after a run's failed call
2026-11-11 05:39:27 +07:00
dotCooCoo 6c84c92907 3D: a beveled cap and its walls draw their shared edge as the same curves
A cap inset by a bevel fitted each run of sampled edges along one curve
as a whole, while the wall next to it fitted each sampled edge by itself.
The two outlines lay up to 0.25 pt apart on an 800 pt circle, which left
a gap or an overlap between the cap and the wall.

An inset outline is now fitted one sampled edge at a time in the cap as
well, so both faces draw the same curves. Caps that are not inset keep
one cubic for each curve of the art.

Test: solid::tests::a_beveled_cap_and_its_walls_share_their_curves.
Docs: docs/three-d.md, docs/target-app-parity.md.
2026-11-10 14:36:28 -08:00
BFlat 811bce73ae Merge pull request #6468 from dotCooCoo/fix/compound-member-copy-style
Edit: a copied compound member takes the compound's graphic style link
2026-11-11 05:33:49 +07:00
dotCooCoo 24155e1f75 3D: an opacity mask on a group member masks its solids
A 3D effect on a group built its solids from the members' paths and
paint and left out each member's opacity mask, and the mask of a group
inside the 3D group. Clipping groups, blends and symbol instances
resolved for the effect lost their masks the same way.

A member, or a group inside the 3D group, with an opacity mask now
gets a scope like one with its own opacity or blending mode, and the
mask goes on the group that holds that member's surfaces. Revolve
applies it with the member's opacity and blending mode; Extrude &
Bevel, Extrude & Bevel (Classic), Inflate and Rotate draw each solid
on its own when a mask is present and put the masked members' solids
in a group with the mask. A resolved clipping group, blend or symbol
instance keeps its mask. A disabled mask is ignored.
2026-11-10 14:30:10 -08:00
dotCooCoo e105548fdb Docs: the 3D curves entry names the edges that stay straight
The progress entry said caps and the walls' cap edges are cubics without
its limits. It now lists the cases three-d.md describes: an edge of a
twisted wall that is cut into pieces, a piece of curve that does not fit
after 8 halvings, and the curves past 1,048,576 for one solid.
2026-11-10 14:29:15 -08:00
BFlat 3c55b60e52 Merge pull request #6467 from dotCooCoo/fix/pathops-param-types
Path commands: Offset Path, Simplify, Split Into Grid, Clean Up, Trap and Contour reject a param of the wrong type
2026-11-11 05:25:49 +07:00
dotCooCoo 68b9f6305c Transparency: opacity mask commands reject a param of the wrong type
transparency.makeOpacityMask read `clip` and `invert` with bool_or,
transparency.setOpacityMask read `clip`, `invert`, `disabled` and
`linked` with as_bool, and the New Opacity Masks and page toggles read
`value` with bool_or, so a value of the wrong type was dropped:
"clip": "false" made a clipping mask, "invert": "yes" next to another
flag was ignored, and "value": "on" toggled the page knockout group.
They are now read with switch_or, and such a value is an error that
names the param, before anything changes. Omitting a param or giving
null keeps its default.
2026-11-10 14:14:31 -08:00
BFlat 349385fd56 Merge pull request #6418 from dotCooCoo/fix/3d-more-object-kinds
3D: effects build from clipping groups, blends and symbol instances
2026-11-11 05:13:37 +07:00
BFlat 2f117ba967 Merge pull request #6466 from dotCooCoo/fix/expand-param-types
Expand: object.expand rejects a param of the wrong type
2026-11-11 05:13:27 +07:00
BFlat 92b61461f9 Merge pull request #6457 from slafebre/fix/6335-remember-color-settings
Fix #6335: Color Settings are remembered across restarts
2026-11-11 04:51:27 +07:00
BFlat 3cb6f44c9b Merge pull request #6464 from dotCooCoo/fix/issue-6382
Fix #6382: PDF export says how a page longer than 200 inches is written
2026-11-11 04:46:38 +07:00
dotCooCoo f259c2372a 3D: expanded solids keep the art's curves in caps and the walls' cap edges
Extrude & Bevel (both kinds) and Rotate wrote every face as straight
segments between sample points, so Expand Appearance and the exports
gave a corner at every sample. Sampling now records the curve each
polygon edge follows, and a facet carries an outline of cubics rebuilt
from it: exact without perspective, within 0.001 pt with it, and within
the sampling tolerance for bevel insets. Caps, Rotate's face and the
wall and bevel edges that meet a cap keep curves; interior bevel edges,
edges a twist cuts and edges past 1,048,576 curves stay straight.
Inflate's faces stay polygons.

Docs: docs/three-d.md, docs/target-app-parity.md.
2026-11-10 13:43:05 -08:00
dotCooCoo 5628f1fe0c Plug-ins: no command call is made after a run's failed call
A plug-in that went on calling after a failed `vc_call` still had each
later call made on the document, although the run fails and is undone
at its end. After the run's first failed call, `vc_call` now returns
`-11` (CALL_NO_CONTEXT) and the host makes no further call; the run
still fails with the first call's reason.
2026-11-10 13:42:38 -08:00
BFlat 54092a0a01 Merge pull request #6462 from dotCooCoo/feat/plugin-call-commands
Plug-ins: an API level 2 plug-in calls the commands its manifest lists
2026-11-11 04:37:37 +07:00
dotCooCoo bf3e6b12ed Path commands: Offset Path, Simplify, Split Into Grid, Clean Up, Trap and Contour reject a param of the wrong type
object.path.offsetPath, object.path.simplify, object.path.splitIntoGrid,
object.path.cleanUp, object.pathfinder.trap and addon.contour.set read
their params with helpers that fell back to the default for a value of
the wrong type: "offset": true offset by 10 pt, "joins": 3 gave mitered
joins, "addGuides": "yes" added no guides. Each such value is now an
error naming the param, and the document and the undo history stay as
they were. An omitted or null param keeps its default, and a distance
still takes a string with a unit ("5 mm"). An unknown `joins` name is
refused as well.
2026-11-10 13:31:54 -08:00
dotCooCoo c92dad3838 Edit: a copied compound member takes the compound's graphic style link
Make Compound Path leaves each member's graphic style id in place. A
member copied or cut on its own took the compound's appearance but kept
that old id, so the clipboard carried an unrelated style and the pasted
path was linked to a style that did not match its look.

The copied member or piece now takes the compound's link while it has
that style's look, and no link otherwise (no style on the compound, or
a gradient pinned to the compound's bounds). It also takes the
compound's knockout setting with the rest of its transparency.
2026-11-10 13:28:28 -08:00
dotCooCoo 626db59d53 Expand: object.expand rejects a param of the wrong type
object.expand read `object`, `fill` and `stroke` with bool_or, `steps`
with f64_or and `gradient` with str_param, so a value of the wrong type
fell back to the default: "fill": "yes" expanded the fill, "steps": "16"
made 255 strips and "gradient": 3 made strips. They are now read with
switch_or, number_or and text_param, and such a value is an error that
names the param, before anything changes. Omitting a param or giving
null keeps its default.
2026-11-10 13:28:28 -08:00
dotCooCoo 73ada5181d Docs: the Copy and Cut paragraph follows the whole Clear description 2026-11-10 13:28:28 -08:00
BFlat 77f2198d1c Merge pull request #5035 from dotCooCoo/fix/undo-history-follows-memory-r
Undo: the history keeps steps within a quarter of installed memory on every desktop OS
2026-11-11 04:25:52 +07:00
BFlat a730f81e33 Merge pull request #6461 from dotCooCoo/fix/compound-member-copy-cut
Edit: Copy and Cut of a whole compound member take only that member
2026-11-11 04:17:12 +07:00
BFlat 7bac831948 Merge pull request #6458 from dotCooCoo/fix/mesh-keeps-shape
Fix #2752: a gradient mesh keeps the outline of the path it is made from
2026-11-11 04:17:03 +07:00
dotCooCoo f42b03f392 Plug-ins: a call reads no file, whatever param names it
A call whose arguments hold a file or folder key at any depth, such as an
effect's textureImage.path, is refused before the command runs; the walk
keeps its own stack. Each call also runs with automation file access
confined to no roots, so every checked read or write a command makes is
refused, whichever param carried the path.
2026-11-10 12:41:46 -08:00
dotCooCoo d1f5af011f Fix #2752: a gradient mesh keeps the outline of the path it is made from
Create Gradient Mesh, a Mesh tool click and Object > Expand of a gradient
to a mesh gave each border edge one cubic fitted between two mesh points
and picked the corners from the bounding box, so the border cut off
corners and curves: 49 pt off a five-point star, 54 pt off a notch.

- The border follows the outline of the largest subpath by length; border
  points sit on it and an edge with no anchor inside is the exact piece
  of its segment.
- Where no single cubic follows a run within 0.1 pt (a thousandth of the
  size on a small outline), a mesh line goes through an anchor, the
  sharpest corner first; at most 256 lines each way. Rectangles and
  ellipses keep the rows and columns asked for.
- Smooth runs keep their end tangents; border handles are no longer made
  collinear.
- To Center and To Edge highlight placement accounts for the extra lines
  (for_path_shaded, also used for gradient fills).
- Non-finite points give no mesh; a degenerate outline keeps the old
  bounding-box mesh.

Holes of a compound path are still left out, as before.

Docs: docs/target-app-parity.md.
2026-11-10 12:33:20 -08:00