Variables: a visibility variable shows and hides locked art

variable.bind refused a locked layer, a locked object and objects
inside a locked layer or group for every kind of variable, and
dataset.select skipped them. A visibility variable bound before the
art was locked stopped working, and a locked layer could not be shown
or hidden by a data set.

A visibility variable now binds locked art and objects inside a locked
layer or group. dataset.select, dataset.next and dataset.prev show and
hide them and leave them locked. dataset.list, dataset.capture and
dataset.update read whether they show. Text, image and graph variables
are refused for locked art as before, and a row skips them. Binding
any variable still refuses art inside a hidden layer or group, and for
a visibility variable the error says the art is in a hidden group or
layer.

Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-10-17 10:36:54 -07:00
parent f7de3d6a01
commit cbafe16b61
5 changed files with 144 additions and 45 deletions
+8 -4
View File
@@ -1156,11 +1156,15 @@ already walks Image Trace. Short agent entry points:
`dataset.select`, `dataset.next` and `dataset.prev` reply `{name, applied, skipped}`. They add `overflow: [id…]`
when area type or type on a path whose text they rewrote doesn't fit, as `text.setText` does (see
[Fitting area type](#fitting-area-type-auto-size-shrink-text-to-fit-overflow)). They skip an object that is
locked or inside a locked layer or group, and count it in `skipped`. They rewrite hidden objects and objects inside
locked or inside a locked layer or group, and count it in `skipped`, unless the value is a visibility value, which
shows or hides it. They rewrite hidden objects and objects inside
a hidden layer or group, which stay hidden unless one of the data set's visibility values shows them. When such a
layer is shown again, its type holds the data set's text. They apply the values in the order the variables are
defined. Of two variables of the same kind on one object, the one defined last wins. `dataset.list`,
`dataset.capture` and `dataset.update` read hidden objects and objects inside a hidden layer or group as well.
`dataset.capture` and `dataset.update` read hidden objects and objects inside a hidden layer or group as well, and
read whether a locked object, or one inside a locked layer or group, shows. `variable.bind` binds a visibility
variable to a locked layer or object and to objects inside a locked layer or group, and refuses them for a text,
image or graph variable.
```json
{"name":"run_command","arguments":{"command":"symbol.list","params":{}}}
@@ -1174,8 +1178,8 @@ defined. Of two variables of the same kind on one object, the one defined last w
```
`dataset.update {all?}` writes what the bound objects hold now into the active data set, for each variable that the
data set holds. A variable whose objects report no value, because they are locked, inside a locked layer or group,
or deleted, keeps the data set's value. With `all: true` it also adds every other variable that the
data set holds. A variable whose objects report no value, because they are deleted or, for a text, image or graph
variable, locked or inside a locked layer or group, keeps the data set's value. With `all: true` it also adds every other variable that the
objects report a value for. The reply gives `values`, the number of values it wrote, and `left`, the variables it
did not write.