Skip to content

Multi select in the editor - #78

Merged
deanblackborough merged 5 commits into
mainfrom
multi-select
Jun 13, 2026
Merged

Multi select in the editor#78
deanblackborough merged 5 commits into
mainfrom
multi-select

Conversation

@deanblackborough

@deanblackborough deanblackborough commented Jun 13, 2026

Copy link
Copy Markdown
Owner
  • Added multi select to the editor, bounded box with new drag handle
  • Added multi move and delete
  • Multi move and delete atomic actions supported by the command system and undo/redo

Summary by CodeRabbit

New Features

  • Multi-object selection via viewport and outliner with Shift+click toggling.
  • Move multiple selected objects together with atomic undo/redo.
  • Delete multiple selected objects using Delete/Backspace keys with grouped undo/redo.
  • Ctrl+D shortcut to duplicate the active selected object.
  • Selection count display in inspector when multiple objects selected.
  • Visual multi-selection bounds and move handle rendering in viewport.

Documentation

  • Added design decision documentation clarifying grouped move/delete support and deferred grouped inspector edits for multi-selection.
  • Updated roadmap reflecting completed multi-selection and grouped operation implementation.

@deanblackborough deanblackborough self-assigned this Jun 13, 2026
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2e6c1636-381f-4260-83e2-545cd2bb95fa

📥 Commits

Reviewing files that changed from the base of the PR and between 553428a and 9f662f6.

📒 Files selected for processing (17)
  • DECISIONS.md
  • NOTES.md
  • src/prune/editor/editor_command.cpp
  • src/prune/editor/editor_command.hpp
  • src/prune/scene/game_object_manager.cpp
  • src/prune/scene/game_object_manager.hpp
  • src/prune/scene/scene_interaction.cpp
  • src/prune/scene/scene_interaction.hpp
  • src/prune/scene/scene_renderer.cpp
  • src/prune/scene/scene_renderer.hpp
  • src/prune/scene/scene_state.hpp
  • src/prune/scene/world_scene.cpp
  • src/prune/scene/world_scene.hpp
  • src/prune/tooling/command_history.cpp
  • src/prune/tooling/controls.cpp
  • src/prune/tooling/inspector.cpp
  • src/prune/tooling/outliner.cpp

📝 Walkthrough

Walkthrough

This PR implements multi-object selection in the editor. GameObjectManager is migrated from a single selected ID to a m_selected_ids vector, gaining select_many, toggle_selected, clear_selection, is_selected, selected_count, and selected_ids methods. EditorCommand replaces single-object optional snapshot fields with before_objects/after_objects vectors and object_ids, and gains MoveObjects/DeleteObjects command types with corresponding factory functions. SceneInteraction is updated for shift-click toggling, multi-object drag (tracking per-object start transforms in a new DragState.object_starts vector), keyboard nudge across the full selection set, and a new handle_delete_duplicate_shortcuts handler for delete and ctrl+d duplication. SceneRenderer is refactored to draw per-object outlines and a combined multi-selection bounds gizmo. WorldScene gains batch snapshot restoration for undo/redo of multi-deletes. Tooling panels (outliner, inspector, command history, controls) are updated accordingly. Documentation records deferred grouped inspector edits.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • deanblackborough/Prune#73: Introduces the initial EditorCommand model and history pipeline that this PR directly extends with multi-object command types, snapshot vectors, and new factory functions in the same files.
  • deanblackborough/Prune#75: Establishes WorldScene::apply_editor_command and snapshot-restore infrastructure that this PR builds on to add DeleteObjects undo/redo and batch restore_object_snapshots.
  • deanblackborough/Prune#37: Adds the SceneInteraction drag/nudge/click handlers in scene_interaction.cpp/.hpp that this PR refactors entirely for multi-object support.

Suggested labels

enhancement

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch multi-select

Comment @coderabbitai help to get the list of available commands and usage tips.

@deanblackborough
deanblackborough merged commit dc33d7e into main Jun 13, 2026
1 of 2 checks passed
@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jun 13, 2026
@deanblackborough
deanblackborough deleted the multi-select branch June 25, 2026 21:56
@coderabbitai coderabbitai Bot mentioned this pull request Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant