Skip to content

Comments

HYDRA-2095 : PRMan lighting was broken with maya lights#377

Merged
debloip-adsk merged 2 commits intodevfrom
lanierd/HYDRA-2095
Feb 4, 2026
Merged

HYDRA-2095 : PRMan lighting was broken with maya lights#377
debloip-adsk merged 2 commits intodevfrom
lanierd/HYDRA-2095

Conversation

@lanierd-adsk
Copy link
Collaborator

No description provided.

@lanierd-adsk lanierd-adsk self-assigned this Feb 3, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 GetMaterialResource to 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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lanierd-adsk lanierd-adsk requested a review from Copilot February 3, 2026 14:23
Copy link
Contributor

Copilot AI left a comment

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 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.

Comment on lines 582 to +591
[](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
);
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
[](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(); });

Copilot uses AI. Check for mistakes.
@ppt-adsk
Copy link
Collaborator

ppt-adsk commented Feb 4, 2026

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.

@lanierd-adsk lanierd-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Feb 4, 2026
@lanierd-adsk
Copy link
Collaborator Author

Ignoring the timeout in one of the builds in agreement with the reviewer.

@debloip-adsk debloip-adsk merged commit ecbfa61 into dev Feb 4, 2026
9 of 10 checks passed
@debloip-adsk debloip-adsk deleted the lanierd/HYDRA-2095 branch February 4, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge Development process is finished, PR is ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants