mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 20:27:05 -06:00
M3.21: the Appearance panel's active item drives paint, stroke, gradient and transparency edits
Clicking a fill or stroke row runs appearance.setActiveItem; the toolbar, Control bar and Properties proxies and the Color, Swatches, Gradient, Stroke and Transparency panels show and edit that item, and the gradient tool's annotator follows it. paint.setFill/setStroke, stroke.set/ setAdvanced, paint.editGradient/setGradientGeom and transparency.set take item (omitted: the active item, null: the top one). Item edits and the appearance.* commands address the selected objects' own stacks, so a group's own fills no longer leak into its contents. Any selection change clears the active item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fb8c41d8e3
commit
018bed29db
@@ -68,6 +68,13 @@ or a full `paint.setFill` params object (`{"gradient": …}`, `{"swatch": "name"
|
||||
| `text_wrap` | `{ids?, offset?, invert?, release?}` | Area type below the objects (same layer) flows around them. |
|
||||
| `undo` / `redo` | `{}` | |
|
||||
|
||||
Appearance stacks: an object can carry several fills and strokes (`appearance.addFill`, `appearance.addStroke`), indexed
|
||||
in paint order (0 is painted first, the bottom row of the Appearance panel). `paint.setFill`, `paint.setStroke`,
|
||||
`stroke.set`, `stroke.setAdvanced`, `paint.editGradient`, `paint.setGradientGeom` and `transparency.set` take
|
||||
`item` to edit one of them; `run_command appearance.setActiveItem {"index": n}` makes that row the target of later
|
||||
calls that omit `item` (as clicking the row in the Appearance panel does) until the selection changes.
|
||||
`inspect_document` reports it as `paint.appearanceItem`.
|
||||
|
||||
Errors (unknown tool, bad arguments, a disabled or failing command) come back as a normal result with
|
||||
`isError: true` and a message. The model can read the message and retry.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user