Parent epic: #482
Depends on: Slice B
Goal
A dedicated "Light" section in the QML inspector that appears when a light is selected, exposing every editable property with sensible ranges and live preview.
Scope
- New collapsible section in
qml/PropertiesPanel.qml: "Light". Visible only when the selection contains lights.
- Bridge through a new
LightPropertiesController (src/LightPropertiesController.{h,cpp}, QML_SINGLETON) similar in shape to PropertiesPanelController. Reads/writes through LightManager.
- Properties:
- Type: directional / point / spot (changing type preserves position/rotation).
- Enabled toggle.
- Colour: diffuse + specular as separate pickers (most users will lock them together; provide a "link" toggle, default linked).
- Intensity: scalar 0–10 with slider + numeric input. Maps to a power scaler on
Ogre::Light colour or to setPowerScale where available.
- Range (point/spot): scalar in scene units.
- Attenuation:
range, constant, linear, quadratic. Provide presets ("Realistic" inverse-square, "Old-school" linear) so users don't need to fiddle with the four numbers directly. Advanced expander shows the raw values.
- Spot cone (spot only): inner angle, outer angle (in degrees), falloff exponent.
- Directional softness (directional only, advanced): placeholder for a future PCSS-style param; UI-only no-op for now.
- All slider edits push a single mergeable
EditLightPropertyCommand per drag interaction (mirror TranslateCommand::mergeWith).
- Numeric inputs honour
Enter to commit; Escape to revert.
- Multi-selected lights show "Mixed" for differing values; editing applies the new value to all.
Acceptance Criteria
Effort
~5 days.
Parent epic: #482
Depends on: Slice B
Goal
A dedicated "Light" section in the QML inspector that appears when a light is selected, exposing every editable property with sensible ranges and live preview.
Scope
qml/PropertiesPanel.qml: "Light". Visible only when the selection contains lights.LightPropertiesController(src/LightPropertiesController.{h,cpp}, QML_SINGLETON) similar in shape toPropertiesPanelController. Reads/writes throughLightManager.Ogre::Lightcolour or tosetPowerScalewhere available.range,constant,linear,quadratic. Provide presets ("Realistic" inverse-square, "Old-school" linear) so users don't need to fiddle with the four numbers directly. Advanced expander shows the raw values.EditLightPropertyCommandper drag interaction (mirrorTranslateCommand::mergeWith).Enterto commit;Escapeto revert.Acceptance Criteria
scene.light.editper property class (colour / intensity / range / cone).LightPropertiesControllerround-trips every property.Effort
~5 days.