M3: style links given in a call apply after its values

apply_order gave fillStyle, strokeStyle, effectStyle, gridStyle and
textStyle the rank of plain values, so the JSON map's byte order decided:
fills, strokes, effects, grids, layoutGrids and variationSettings sort
after their link and overrode it (node.set then unlinked the style;
node.create kept a link its values contradicted). Style links now apply
after the values and x/y, just before boundVariables. A deviation set in a
later call still unlinks.
This commit is contained in:
MortenHusted
2026-10-22 11:11:59 +02:00
parent a86897dc91
commit 24a5855cab
3 changed files with 77 additions and 6 deletions
+5 -3
View File
@@ -267,9 +267,11 @@ Or in a project's `.mcp.json`:
- **Styles stay true to their layers**: editing a styled fill, stroke, effect or layout grid list
(`node.set`, `fill.set`, `fill.add`, a bound variable…) unlinks that style (`styles.fill` etc. go
`null`), so a later `style.update` doesn't overwrite the edit; `style.apply` replaces variables
bound to what the style sets; a text style goes on text layers only. Names are trimmed per `/`
folder part. `style.move {styles, before?, folder?}` reorders (and with `folder`, renames into it),
`style.duplicate {style}` adds "<name> copy" right below, `style.renameFolder {folder, name}`.
bound to what the style sets; a text style goes on text layers only. In one call, a style link
(`fillStyle`, `textStyle`…) wins over values it sets; set a deviation in a later call, which
unlinks it. Names are trimmed per `/` folder part. `style.move {styles, before?, folder?}`
reorders (and with `folder`, renames into it), `style.duplicate {style}` adds "<name> copy" right
below, `style.renameFolder {folder, name}`.
- **Variables**: `variable.bind` refuses a variable of a type the field doesn't take (a colour on
`width`); scopes only filter pickers. `variable.delete` / `variable.deleteCollection` unbind the
layers using them (they keep their last value) and give aliases to them their values. An