UsdLayerManager/openspec/changes/camera-wireframe-viewport/specs/camera-viewport-picking/spec.md

2.0 KiB

ADDED Requirements

Requirement: Camera prim selectable by clicking its wireframe

The system SHALL test each viewport left-mouse-button click against all camera wireframe segments before running the existing geometry pick. If the click position is within 10 screen pixels of any projected wireframe edge, the corresponding UsdGeomCamera prim SHALL be selected. Among multiple qualifying cameras the nearest one (smallest minimum screen distance) SHALL be chosen.

Scenario: Clicking camera wireframe selects the camera prim

  • WHEN the user left-clicks within 10 pixels of a camera wireframe segment
  • THEN the camera prim appears selected in the Scene Hierarchy panel and the Property panel shows its attributes

Scenario: Camera pick takes priority over geometry behind it

  • WHEN the user clicks on a camera wireframe that visually overlaps rendered geometry
  • THEN the camera prim is selected, not the geometry behind it

Scenario: Click misses all cameras — falls through to geometry pick

  • WHEN the user left-clicks on an area with no camera wireframe within 10 pixels
  • THEN the normal geometry pick runs as before

Requirement: Selected camera is editable with the transform manipulator

After a camera prim is selected via viewport click, the system SHALL allow the TransformManipulator to translate and rotate it using the existing W/E/R tool modes. The camera SHALL implement UsdGeomXformCommonAPI for the manipulator to write to. No additional manipulator changes are required.

Scenario: Move manipulator repositions selected camera

  • WHEN a camera prim is selected and the Move tool (W) is active
  • THEN the translate gizmo appears at the camera's world position and dragging it moves the camera prim

Scenario: Rotate manipulator reorients selected camera

  • WHEN a camera prim is selected and the Rotate tool (E) is active
  • THEN the rotate rings appear at the camera's world position and dragging them rotates the camera prim