Skip to content

EMSUSD-4019 renderer provider - #4716

Closed
pierrebai-adsk wants to merge 3 commits into
devfrom
bailp/EMSUSD-4019/renderer-provider-enhancements
Closed

EMSUSD-4019 renderer provider#4716
pierrebai-adsk wants to merge 3 commits into
devfrom
bailp/EMSUSD-4019/renderer-provider-enhancements

Conversation

@pierrebai-adsk

Copy link
Copy Markdown
Collaborator
  • Added validation of the command success when retrieving the display label of a renderer.
  • Moved private functions to be completely private.
  • Added a function to return a name-indexed map of renderers for faster access by name.
  • Added scan of the storm renderers registry.
  • This also allows merging renderers with the same name reported by different APIs.
  • This also fixes the problem that Maya-Hydra was not correctly reported as a Hydra renderer by the Maya renderer command.
  • Modified currentRenderer and switchRenderer to read and write the current renderer from the SceneRenderDescription.
  • This becomes the fallback value if for any reason the Maya global renderer node is not found or is empty.
  • Added unit tests for MayaRendererProvider.

@pierrebai-adsk pierrebai-adsk added the shared_components Shared Components (Max / Maya) label Aug 24, 2026
- Added validation of the command success when retrieving the display label of a renderer.
- Moved private functions to be completely private.
- Added a function to return a name-indexed map of renderers for faster access by name.
- Added scan of the storm renderers registry.
- This also allows merging renderers with the same name reported by different APIs.
- This also fixes the problem that Maya-Hydra was not correctly reported as a Hydra renderer by the Maya renderer command.
- Modified `currentRenderer` and `switchRenderer` to read and write the current renderer from the SceneRenderDescription.
- This becomes the fallback value if for any reason the Maya global renderer node is not found or is empty.
- Added unit tests for MayaRendererProvider.
@pierrebai-adsk
pierrebai-adsk force-pushed the bailp/EMSUSD-4019/renderer-provider-enhancements branch from 87e5d62 to bdd1527 Compare August 25, 2026 14:33
@pierrebai-adsk
pierrebai-adsk requested review from seando-adsk and a balanced review from Copilot August 25, 2026 17:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unified renderer discovery and current-renderer handling for Maya Render Setup.

Changes:

  • Merges Maya and Hydra renderer registries.
  • Adds SceneRenderDescription fallback and switching logic.
  • Adds Windows-based Maya integration tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/usd/ui/renderSetup/mayaRendererProvider.h Expands and exports the provider API.
lib/usd/ui/renderSetup/mayaRendererProvider.cpp Implements merged discovery and dual-store selection.
test/lib/usd/ui/renderSetup/testMayaRendererProvider.cpp Tests discovery and renderer switching.
test/lib/usd/ui/renderSetup/main.cpp Initializes Maya for tests.
test/lib/usd/ui/renderSetup/CMakeLists.txt Defines the test executable.
test/lib/usd/ui/CMakeLists.txt Includes Render Setup tests conditionally.
test/lib/usd/CMakeLists.txt Adds the UI test subtree.
render-setup-renderer-provider-plan.md Documents the design and implementation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread render-setup-renderer-provider-plan.md Outdated
- Removed exporation document.
- Made usage of `sceneRenderDescription` conditional on its availability.
- Added more code to validate that a given `Hydra` renderer is avialable.
- Continue to find `Hydra` renderers even if not Maya renderers are found.
- Avoid using possibly invalid renderer name when switching renderers.
- Update the global settings last since that is what triggers updates elsewhere.
-

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread test/lib/usd/ui/renderSetup/CMakeLists.txt Outdated
Comment thread test/lib/usd/ui/renderSetup/testMayaRendererProvider.cpp
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp Outdated
- Added clases to automatically hold and release Hydra-related pointers.
- Add case where test finds no hydra plugin.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Suppressed comments (3)

Previously missed (3) — in code that hasn't changed since the last review.

test/lib/usd/ui/renderSetup/CMakeLists.txt:26

  • The executable unconditionally loads mayaUsdPlugin, but BUILD_ADSK_PLUGIN is an optional build setting and is the condition that creates/installs that plugin. With it disabled, this test is still registered and always exits at startup because the plugin is unavailable. Gate the test on the plugin build as well.
if(IS_WINDOWS AND MAYA_HAS_USD_SETTINGS_NODES)

lib/usd/ui/renderSetup/mayaRendererProvider.cpp:34

  • std::map is used by getRenderersMap(), but this translation unit never includes <map> and currently depends on an unrelated Maya/USD header including it transitively. Include the standard header directly so this continues to compile if those implementation-detail includes change.
#include <maya/MSelectionList.h>
#include <maya/MStatus.h>
#include <maya/MStringArray.h>

lib/usd/ui/renderSetup/mayaRendererProvider.h:34

  • These public class docs do not match the implementation: switchRenderer() writes every selection to defaultRenderGlobals (lines 278-283), and currentRenderer() reads that store first, using the USD settings node only as a fallback. Describing separate “appropriate” stores can lead callers to read or update the wrong source.
//! Reads and writes the current renderer from the appropriate store:
//! - Hydra renderers: UsdSettingsNode::currentRenderer attribute
//! - Legacy renderers: defaultRenderGlobals.currentRenderer attribute

Comment thread test/lib/usd/ui/CMakeLists.txt
Comment thread lib/usd/ui/renderSetup/mayaRendererProvider.cpp
Comment thread test/lib/usd/ui/renderSetup/testMayaRendererProvider.cpp
@pierrebai-adsk
pierrebai-adsk deleted the bailp/EMSUSD-4019/renderer-provider-enhancements branch August 25, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shared_components Shared Components (Max / Maya)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants