Skip to content

Lights: Slice B — Add/delete/rename lights via GUI #484

@fernandotonon

Description

@fernandotonon

Parent epic: #482
Depends on: Slice A

Goal

User can add point / spot / directional lights from the GUI, see them in the scene outliner, rename them, duplicate them, and delete them — all undoable.

Scope

  • Toolbar/menu entries: "Add Light → Directional / Point / Spot". Default position: origin (with a small offset so they don't stack). Default direction for directional/spot: scene root forward.
  • Scene outliner (existing scene tree in the QML inspector at qml/SceneTreeNode.qml) shows lights as nodes with a light icon next to the name; clicking selects via SelectionSet.
  • Right-click context menu on a light: Rename, Duplicate, Delete.
  • Keyboard: Delete removes the selected light(s); Ctrl+D duplicates.
  • Undo commands: CreateLightCommand, DeleteLightCommand, RenameLightCommand — all in src/commands/LightCommands.{h,cpp}.
  • "Add Light at viewport center" alternative — uses the focused viewport's camera to position the light a sensible distance in front of the camera (useful for portrait-style key-light placement). Behind a separate menu entry.
  • Multi-select delete works.

Acceptance Criteria

  • All three light types can be added from the menu and appear in the scene outliner.
  • Selecting a light highlights it (selection box / icon highlight) in the viewport.
  • Rename works from the outliner (inline edit) and via context menu.
  • Duplicate copies all properties to a uniquely named clone.
  • Delete is undoable; Ctrl+Z brings the light back with identical properties.
  • Multi-select delete works.
  • Sentry breadcrumbs scene.light.create, scene.light.duplicate, scene.light.delete, scene.light.rename.

Effort

~4 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlightingScene lighting: add/edit/manage lights, shadows, IESui

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions