Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new Sdr API #4141

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Use new Sdr API #4141

wants to merge 3 commits into from

Conversation

dj-mcg
Copy link
Collaborator

@dj-mcg dj-mcg commented Feb 28, 2025

USD 2505 introduces new shader registry API, moving from Ndr to Sdr. This converts maya-usd callsites with API guards

@pierrebai-adsk
Copy link
Collaborator

pierrebai-adsk commented Mar 3, 2025

While the changes work now, since Maya is not using USD 25.05 in any branches, we're likely to break things from time to time in new code, unfortunately. I'm already regularly being tripped up on differences between Maya 2022 up to most recent versions due to differences in USD (and UFE).

I'm only saying this to underline we will probably get things wrong and break USD 25.05 until we have an internal build exercising it.

@dj-mcg
Copy link
Collaborator Author

dj-mcg commented Mar 3, 2025

That's ok @pierrebai-adsk - I'll fix any breakages as we run into them

@seando-adsk seando-adsk added the build Related to building maya-usd repository label Mar 3, 2025
@@ -153,7 +153,11 @@ UsdShadeOutput UsdMayaShadingUtil::CreateShaderOutputAndConnectMaterial(
TfToken outputName = terminalName;
SdrShaderNodeConstPtr shaderNodeDef = registry.GetShaderNodeByIdentifier(nodeID);
if (shaderNodeDef) {
#if PXR_VERSION >= 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be 2505. This caused an error in the preflight since it compiled with your new code.

Copy link
Collaborator

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

version mistake in shadingUtil.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to building maya-usd repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants