Outliner, details, gizmos, undo and redo #46

Open
UnflavoredMeson/Primal_Plus_Plus
opened 2026-11-24 20:16:02 +00:00 by UnflavoredMeson · 0 comments
Owner

Why

This is where the editor starts to edit: pick an actor, change its fields, move it, undo.

Decided

  • Selection is model state; panels observe it.
  • The details panel edits any reflected class or component through reflect::find_type(), with no per-type code; 64-bit fields stay integers.
  • Undo/redo as commands on the model (set field, add/remove actor, reparent, add part/behavior, rename), merged while a drag lasts.
  • Gizmos: ImGuizmo (MIT, pinned), wrapped in ui::.
  • Add Actor lists registered actor classes and the engine's parts.

Read first

Steps

  • 1. Write the command model with tests (undo restores, a drag is one step).
  • 2. Write the outliner and the details panel.
  • 3. Add gizmos and Add Actor.
  • 4. Save and load the scene (S7-04).

Done when

  • You can build a small scene, save it, reopen it and undo every step; tests pass; 0 warnings; tidy 0.

Claude can help with

  • Test cases for command merging.

Learn

  • The command pattern and why merging belongs in the command, not the UI.
## Why This is where the editor starts to edit: pick an actor, change its fields, move it, undo. ## Decided - Selection is model state; panels observe it. - The details panel edits any reflected class or component through `reflect::find_type()`, with no per-type code; 64-bit fields stay integers. - Undo/redo as commands on the model (set field, add/remove actor, reparent, add part/behavior, rename), merged while a drag lasts. - Gizmos: ImGuizmo (MIT, pinned), wrapped in `ui::`. - Add Actor lists registered actor classes and the engine's parts. ## Read first - [Editor](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Editor), section 5.6; [Actors](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Actors), sections 9 and 22. ## Steps - [ ] 1. Write the command model with tests (undo restores, a drag is one step). - [ ] 2. Write the outliner and the details panel. - [ ] 3. Add gizmos and Add Actor. - [ ] 4. Save and load the scene (S7-04). ## Done when - [ ] You can build a small scene, save it, reopen it and undo every step; tests pass; 0 warnings; tidy 0. ## Claude can help with - Test cases for command merging. ## Learn - The command pattern and why merging belongs in the command, not the UI.
Sign in to join this conversation.
No assignees
No project
Blocks
#47 Prefabs
UnflavoredMeson/Primal_Plus_Plus
#49 Ambient light actors
UnflavoredMeson/Primal_Plus_Plus
#51 Content browser and import in the editor
UnflavoredMeson/Primal_Plus_Plus
Depends on
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
UnflavoredMeson/Primal_Plus_Plus#46
No description provided.