Tools: tool.setOption reads and sets the tool that lent the Selection tool

When a held Cmd press lends the Selection tool, `tool.setOption` that
names the waiting tool (the Shape Builder) reads its options from that
tool instead of making it again from the saved preferences, and a value
set on it counts as set since the tool last started afresh.

Params that are not an object now give the error the other commands
give, "the params must be an object, not {got}", which the message
catalogs already translate. The params text of tool.setOption in the
MCP catalog, the desktop commands and the headless host says so.
This commit is contained in:
dotCooCoo
2026-11-14 14:10:16 -08:00
parent 72082aee46
commit df95a67ea7
10 changed files with 96 additions and 23 deletions
+2 -3
View File
@@ -922,9 +922,8 @@ Tool options last: `tool.setOption {key, value}` or `{values: {…}}` (and `tool
the options a tool keeps (Liquify brush and tool options, Mirror & Cut, Puppet Warp, Symbolism, drawing tools) stay
when you switch tools or documents and are saved with the preferences. The Liquify tools share their Global Brush
Dimensions (`width`, `height`, `angle`, `intensity`). `{}` reads the options and sets nothing; parameters that are
not an object are an error. Every option given is
checked before any is set: an option the tool doesn't have, a value of the wrong type, a number outside the tool's
range or an unknown choice is an error that names the tool and the option
not an object are an error. Every option given is checked before any is set: an option the tool doesn't have, a value
of the wrong type, a number outside the tool's range or an unknown choice is an error that names the tool and the option
(``tool `smooth`: `fidelity` must be a number from 0.05 to 100``), and no option, preference or undo step changes.
The Live Paint tools' `width` and the Shape Builder's `gapLength` are set to the nearest end of their range instead.
+4 -4
View File
@@ -9816,10 +9816,10 @@ to that tool), a value of the wrong type, a number outside the tool's range, an
`value`, a `values` that is not an object or a `tool` that is not a tool id is an error result that names the tool and
the option, and nothing changes: no option, no saved preference and no undo step, also when another option given with
it is good. Parameters that are not an object are an error too. `{}`, or no parameters, reads the options and sets
nothing. The ranges are VectorCraft's own (for example the Smooth tool's
`fidelity` takes 0.05 to 100, the Pencil's 0.01 to 100); a refused value in a Tool Options dialog keeps the dialog
open. The Live Paint tools' `width` and the Shape Builder's `gapLength` are set to the nearest end of their range
when a number outside it is given, as their sections above say.
nothing. The ranges are VectorCraft's own (for example the Smooth tool's `fidelity` takes 0.05 to 100, the Pencil's
0.01 to 100); a refused value in a Tool Options dialog keeps the dialog open. The Live Paint tools' `width` and the
Shape Builder's `gapLength` are set to the nearest end of their range when a number outside it is given, as their
sections above say.
```json
{"name":"run_command","arguments":{"command":"tool.setOption","params":{"tool":"twirl","values":{"width":60,"rate":90}}}}