capture_viewport
Save a screenshot of the O3DE editor viewport to a specified file path. Handles UI overlays via PySide6 and falls back to raw frame capture where PySide6 is unavailable.
Instructions
Capture a screenshot of the editor viewport.
Tries PySide6 widget grab first (captures the viewport widget
including UI overlays). Falls back to azlmbr.atom
FrameCaptureRequestBus.CaptureScreenshot which captures the
actual rendered frame and works on platforms where PySide6 is not
importable in the editor's embedded interpreter.
Args: output_path: File path for the screenshot (.png, .jpg, .jpeg, .bmp, or .tga). width: Optional width to scale the screenshot to (PySide6 path only). height: Optional height to scale the screenshot to (PySide6 path only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |