Parent epic: #482
Depends on: Slices A–G (functionally requires A, B, C, E, G minimum)
Goal
Bring scene lighting up to project conventions: CLI, MCP, breadcrumbs, tests, docs.
Scope
- CLI — new
qtmesh light subcommand:
qtmesh light scene.gltf --list [--json]
qtmesh light scene.gltf --add directional|point|spot --pos x,y,z [--dir x,y,z] [--colour #fff] [--intensity 1.0] -o out.gltf
qtmesh light scene.gltf --remove <name> -o out.gltf
qtmesh light scene.gltf --edit <name> --intensity 2.0 --colour "#ffaa66" -o out.gltf
qtmesh light scene.gltf --apply-rig three_point_studio -o out.gltf
qtmesh light --list-rigs
- MCP tools:
create_light(type, position, direction?, colour?, intensity?, range?, cone?)
delete_light(name)
list_lights() -> array
set_light_property(name, key, value)
apply_light_rig(name, replace_existing?)
- All JSON-RPC on the main thread via
QSocketNotifier; no BlockingQueuedConnection.
- Sentry breadcrumbs:
scene.light.create, scene.light.delete, scene.light.duplicate, scene.light.rename, scene.light.edit, scene.light.shadow_toggle, scene.light.apply_rig, scene.light.gizmo_toggle, plus ui.action for menu/toolbar clicks.
- Tests:
LightManager_test.cpp — create/delete/rename/duplicate/find.
LightCommands_test.cpp — undo/redo for each command class.
LightRigLibrary_test.cpp — each rig produces expected light count + types.
MeshImporterExporter_lights_test.cpp — glTF round-trip.
- Headless-CI safe (no real display assumed).
- Docs:
- New "Scene Lighting" section in
CLAUDE.md under Architecture.
- Add
qtmesh light examples to the CLI block.
- Document the intensity-units mapping (QtMeshEditor scalar ↔ glTF lumens, FBX best-effort).
- User-facing changelog note: "QtMeshEditor now supports multiple scene lights with presets, shadows, and full glTF round-trip."
Acceptance Criteria
Effort
~5 days.
Parent epic: #482
Depends on: Slices A–G (functionally requires A, B, C, E, G minimum)
Goal
Bring scene lighting up to project conventions: CLI, MCP, breadcrumbs, tests, docs.
Scope
qtmesh lightsubcommand:qtmesh light scene.gltf --list [--json]qtmesh light scene.gltf --add directional|point|spot --pos x,y,z [--dir x,y,z] [--colour #fff] [--intensity 1.0] -o out.gltfqtmesh light scene.gltf --remove <name> -o out.gltfqtmesh light scene.gltf --edit <name> --intensity 2.0 --colour "#ffaa66" -o out.gltfqtmesh light scene.gltf --apply-rig three_point_studio -o out.gltfqtmesh light --list-rigscreate_light(type, position, direction?, colour?, intensity?, range?, cone?)delete_light(name)list_lights() -> arrayset_light_property(name, key, value)apply_light_rig(name, replace_existing?)QSocketNotifier; noBlockingQueuedConnection.scene.light.create,scene.light.delete,scene.light.duplicate,scene.light.rename,scene.light.edit,scene.light.shadow_toggle,scene.light.apply_rig,scene.light.gizmo_toggle, plusui.actionfor menu/toolbar clicks.LightManager_test.cpp— create/delete/rename/duplicate/find.LightCommands_test.cpp— undo/redo for each command class.LightRigLibrary_test.cpp— each rig produces expected light count + types.MeshImporterExporter_lights_test.cpp— glTF round-trip.CLAUDE.mdunder Architecture.qtmesh lightexamples to the CLI block.Acceptance Criteria
--jsonwhere applicable.CLAUDE.mdupdated with the new section and CLI examples.Effort
~5 days.