Skip to content

Lights: Slice H — CLI/MCP parity, tests, docs #490

@fernandotonon

Description

@fernandotonon

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

  • Every CLI subcommand listed works and supports --json where applicable.
  • Every MCP tool responds correctly via stdio and HTTP transports.
  • CLI ↔ GUI ↔ MCP parity: same operation produces the same result through every surface.
  • Breadcrumbs emitted for every user-visible light operation.
  • CLAUDE.md updated with the new section and CLI examples.
  • CI green on Linux, macOS, Windows.

Effort

~5 days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand-line / qtmeshdocumentationImprovements or additions to documentationenhancementNew feature or requestlightingScene lighting: add/edit/manage lights, shadows, IES

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions