Add per-viewport AOV selection (stageView.py GetRendererAovs port)

Exposes the render delegate's available AOVs in the gear popup under a new
"AOV" sub-menu. Selecting an AOV calls SetRendererAov on the engine and
persists the choice per-viewport in viewport_settings.ini. Switching the
render delegate resets the AOV to "color", matching stageView.py's
_handleRendererChanged. Menu is greyed-out when the delegate reports no AOVs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 03:03:00 +08:00
parent 6adf022c13
commit 862f3c9745
5 changed files with 47 additions and 4 deletions
+5
View File
@@ -183,6 +183,10 @@ public:
bool ShowCameraGuide() const { return m_showCameraGuide; }
void SetShowCameraGuide(bool show) { m_showCameraGuide = show; }
const pxr::TfToken& GetCurrentAov() const { return m_currentAov; }
pxr::TfTokenVector GetRendererAovs() const;
bool SetCurrentAov(const pxr::TfToken& aov);
bool GetAAEnabled() const { return m_aaEnabled; }
void SetAAEnabled(bool enabled) { m_aaEnabled = enabled; }
@@ -331,6 +335,7 @@ private:
bool m_showGrid;
bool m_showCameraGuide;
pxr::TfToken m_currentAov;
bool m_aaEnabled; ///< GL_LINE_SMOOTH anti-aliasing for all line overlays
pxr::GfVec3f m_backgroundColor;