feat(mcp): select by window or crossing box

select takes window [x1, y1, x2, y2] in world XY, with crossing to also
take what the box crosses. It runs the viewport's own box test, now one
helper (box_selection_handles) that the drag and click-move-click
gestures share; the drag gesture applies the selection filter as the
click one already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-08 08:41:54 +03:00
1 parent 6256ad3bd5
commit 018ac455cb
4 files changed
+165 -186

No files matched your search

+2
View File
@@ -204,6 +204,8 @@ pub static SELECT: OpDef = OpDef {
opt("handles", Ty::Handles, "Explicit entity handles to select."),
opt("type", Ty::Str, "Entity type filter."),
opt("layer", Ty::Str, "Layer name filter."),
opt("window", Ty::Raw(r#"{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4}"#), "World XY box [x1, y1, x2, y2]: selects what lies inside it, as a viewport window does."),
opt("crossing", Ty::Bool, "With window: also select what the box crosses."),
opt("clear", Ty::Bool, "Clear existing selection before applying."),
opt("where", Ty::ArrayOf(&Ty::Raw(r#"{"type":"object","properties":{"path":{"type":"string"},"op":{"type":"string"},"value":{}},"required":["path"]}"#)), "Property filter predicates."),
],