From 92dc3fa63d2acbc12f403d2beda6cc962b55267e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 14:24:51 -0800 Subject: [PATCH 1/2] Layers: layer.locate's reference names when the panel does not scroll The Layers panel scrolls to the located row only when that row is in its list (crates/ui-egui/src/panels/layers.rs, where `revealed` is the row's position in the listed rows). With Show Layers Only, a search or the filter leaving the row out, a Locate does not scroll. The command's params text and docs/mcp.md said it scrolls on every call. --- crates/engine/src/cmd/layerpanel.rs | 2 +- docs/mcp.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/layerpanel.rs b/crates/engine/src/cmd/layerpanel.rs index 81e73326fb..9446902516 100644 --- a/crates/engine/src/cmd/layerpanel.rs +++ b/crates/engine/src/cmd/layerpanel.rs @@ -132,7 +132,7 @@ pub fn specs() -> Vec { "Locate Object", ["Window", "Layers"], None, - "{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it and scrolls to it, also when the row was already highlighted → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}", + "{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it and scrolls to it, also when the row was already highlighted, unless Show Layers Only, a search or the filter leaves the row out of the list → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}", has_doc, locate ), diff --git a/docs/mcp.md b/docs/mcp.md index 5bc273289c..72d5c003d0 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5877,7 +5877,8 @@ and `layerRows`, the rows highlighted in the panel. `layer.locate {id?, layersOnly?}` (highlights the selected object's row, or with several selected the row of the one frontmost in the stacking order, whatever order they were selected in; an `id` locates that object instead; the panel opens the rows around it; - it scrolls to it on every call, also when the row was already highlighted; + it scrolls to it on every call, also when the row was already highlighted, unless Show Layers Only, a search or the + filter leaves the row out of the list, in which case it does not scroll; `layersOnly: true`, which the panel sends while Show Layers Only is on, as Locate Layer, highlights the innermost layer or sublayer holding the object instead, or a layer `id` itself, and returns `{id, objectId, ancestry}`) and `layer.clippingMask.toggle`. From 480571af82922d4771cfb0dfa8936883294fb089 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 15:05:37 -0800 Subject: [PATCH 2/2] Layers: layer.locate opens the rows around a row it does not scroll to Locate Object opens the layers around the object even when the row is not in the list, and only the scroll depends on the row being listed. Editing an opacity mask on another layer also leaves the row out (crates/ui-egui/src/panels/layers/model.rs). The params text and docs/mcp.md now say both. --- crates/engine/src/cmd/layerpanel.rs | 2 +- docs/mcp.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/cmd/layerpanel.rs b/crates/engine/src/cmd/layerpanel.rs index 9446902516..b88f6ce636 100644 --- a/crates/engine/src/cmd/layerpanel.rs +++ b/crates/engine/src/cmd/layerpanel.rs @@ -132,7 +132,7 @@ pub fn specs() -> Vec { "Locate Object", ["Window", "Layers"], None, - "{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it and scrolls to it, also when the row was already highlighted, unless Show Layers Only, a search or the filter leaves the row out of the list → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}", + "{id?, layersOnly?} (default: the frontmost selected object in the stacking order) highlight the object's row; the Layers panel opens the layers around it, and scrolls to its row when the row is in the list, also when the row was already highlighted (Show Layers Only, a search, the filter, or editing an opacity mask on another layer can leave the row out) → {id, ancestry: [layer…, id]}. layersOnly (default false; the panel sends true while Show Layers Only is on, as Locate Layer) highlights the innermost layer or sublayer holding the object instead, or a layer id itself → {id: layer, objectId, ancestry: [layer…]}", has_doc, locate ), diff --git a/docs/mcp.md b/docs/mcp.md index 72d5c003d0..c219adf30b 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5877,8 +5877,9 @@ and `layerRows`, the rows highlighted in the panel. `layer.locate {id?, layersOnly?}` (highlights the selected object's row, or with several selected the row of the one frontmost in the stacking order, whatever order they were selected in; an `id` locates that object instead; the panel opens the rows around it; - it scrolls to it on every call, also when the row was already highlighted, unless Show Layers Only, a search or the - filter leaves the row out of the list, in which case it does not scroll; + it scrolls to the row on every call when the row is in the list, also when the row was already highlighted; + Show Layers Only, a search, the filter, or editing an opacity mask on another layer can leave the row out, and then + the panel still opens the rows around it but does not scroll; `layersOnly: true`, which the panel sends while Show Layers Only is on, as Locate Layer, highlights the innermost layer or sublayer holding the object instead, or a layer `id` itself, and returns `{id, objectId, ancestry}`) and `layer.clippingMask.toggle`.