HYDRA-2095 : PRMan lighting was broken with maya lights#377
HYDRA-2095 : PRMan lighting was broken with maya lights#377debloip-adsk merged 2 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where PRMan lighting was broken when using Maya lights by adding fallback logic to retrieve material networks from light adapters when not found in material adapters.
Changes:
- Added fallback mechanism in
GetMaterialResourceto check light adapters for material networks when material adapters return empty results
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lib/mayaHydra/hydraExtensions/sceneIndex/mayaHydraSceneIndex.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [](MayaHydraMaterialAdapter* a) -> VtValue { return a->GetMaterialResource(); }, | ||
| _materialAdapters); | ||
|
|
||
| // For PRMan lights, the material network is stored in the light adapter | ||
| if (ret.IsEmpty()) { | ||
| ret = _GetValue<MayaHydraLightAdapter, VtValue>( | ||
| id, | ||
| [](MayaHydraLightAdapter* a) -> VtValue { return a->GetLightMaterialNetwork(); }, | ||
| _lightAdapters | ||
| ); |
There was a problem hiding this comment.
The _GetValue template function shown in the context requires three template parameters but only uses two parameters (id and lambda). The third parameter _lightAdapters is passed but the function signature in the context shows it doesn't accept a container parameter. Verify that the correct overload of _GetValue is being called or if the function signature needs to be updated to accept the adapters container.
| [](MayaHydraMaterialAdapter* a) -> VtValue { return a->GetMaterialResource(); }, | |
| _materialAdapters); | |
| // For PRMan lights, the material network is stored in the light adapter | |
| if (ret.IsEmpty()) { | |
| ret = _GetValue<MayaHydraLightAdapter, VtValue>( | |
| id, | |
| [](MayaHydraLightAdapter* a) -> VtValue { return a->GetLightMaterialNetwork(); }, | |
| _lightAdapters | |
| ); | |
| [](MayaHydraMaterialAdapter* a) -> VtValue { return a->GetMaterialResource(); }); | |
| // For PRMan lights, the material network is stored in the light adapter | |
| if (ret.IsEmpty()) { | |
| ret = _GetValue<MayaHydraLightAdapter, VtValue>( | |
| id, | |
| [](MayaHydraLightAdapter* a) -> VtValue { return a->GetLightMaterialNetwork(); }); |
|
Pre-flight failed on test timeout for a single configuration (Windows Maya 2026 USD 25.05 Coverage), all other configurations passed (including Windows Maya latest release Coverage), consider pre-flights as passed. |
|
Ignoring the timeout in one of the builds in agreement with the reviewer. |
No description provided.