Object tree: groups and the drawing order
Deploy web Studio / deploy (push) Successful in 1m5s

Groups: objects of type "group" draw nothing; members carry the group's id
in a new `group` field (groups nest). A hidden group hides everything in it
(Doc::hidden_in_groups, skipped by the driver), a locked one locks it in
the Studio. Removing a group moves its members up into its parent group.
isokit check warns about members of missing groups. New `order` op: the
whole object order at once (each id once), one undo step.

Studio object list as a tree in the document order, front first: each
group sits just after its members, so it draws as one block, and ground
pieces higher in the list lie on top. Groups fold open and shut; every row
has an eye and a lock (shown on hover or when set); a click on a group
selects all of it, so a drag on the map moves it all. Group / Ungroup
(Ctrl+G, Ctrl+Shift+G), Order up/down (Ctrl+] Ctrl+[, with Shift to the
front / back), drag rows above, below or into a group. Group panel: name,
zoom, ungroup, to front / back, lock, hide, delete with contents.

MCP: group field in the object schema, order op, guidance.

Tests: Rust 81 (ops: groups, order, removal; driver: nested hidden
groups), Studio 131, web 100.
This commit is contained in:
grabowski committed 2026-10-25 18:06:04 +07:00
1 parent 5ec164a633
commit 540b37020c
15 files changed
+573 -30

No files matched your search

+9 -1
View File
@@ -152,12 +152,20 @@ sprite whose sort box is its lane strip, so movers pass in front of and behind w
beside the road; keyframes per piece show a mover only while it is on it. Streets demo: traffic
round the block, a bus, motorbikes, cyclists, people; country demo: cars on the lane.
Groups and the drawing order: objects of type `group` draw nothing; members carry the group's id
in `group` (groups nest), hiding or locking a group hides or locks all of it, removing it keeps
its members. The Studio's object list is a tree in the document order (each group just after
its members, so it draws as one block; ground pieces later lie on top): fold groups, eye and lock
per row, Ctrl+G / Ctrl+Shift+G, drag rows to reorder or into a group, ▲ ▼ and Ctrl+] / Ctrl+[
(with Shift to the front / back). Every tree edit is one undo step (`order` op: all ids at once).
## Phase 2: richer editing
- [x] Interior prefabs (see Build your own house); a building `rooms` prop is still open
- [ ] Path objects in the Studio: click points for areas, roads (polyline with width), fences, walls,
pipe runs; vertex handles
pipe runs; vertex handles (routes are drawn point by point: meta `shape: "path"`)
- [x] Multi-select (box select, Ctrl+click, Shift range), group move, turn, copy, delete, edit
- [x] Groups in the object tree (fold, hide, lock, drag in and out) and the drawing order (drag, ▲ ▼)
- [ ] Align / distribute the selection
- [ ] Copy/paste between projects; prefab thumbnails in the palette (rendered icons)
- [ ] Measure tool and grid overlay; numeric resize handles on the selection