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 USDLuxTokens for spot light #2253

Merged
merged 2 commits into from
Apr 7, 2022

Conversation

Vsevolod1983
Copy link

If I understand correctly starting with Pixar USD 21.05 we should use UsdLuxTokens for spot light parameters instead of HdLightTokes

From 21.05 release notes:
"UsdLux Shadow and Shaping APIs are now connectable. All attributes on these APIs have been given the "inputs:" prefix."

In our "hdRPR" render delegate we use these "inputs" prefixes but it does not work with MtoH without such fixes.

@seando-adsk seando-adsk added the mtoh Related to legacy Maya to Hydra plugin. label Apr 6, 2022
@seando-adsk seando-adsk requested a review from williamkrick April 6, 2022 14:38
@@ -134,11 +134,11 @@ class HdMayaSpotLightAdapter : public HdMayaLightAdapter
} else if (paramName == UsdLuxTokens->treatAsPoint) {
const bool treatAsPoint = (light.shadowRadius() == 0.0);
return VtValue(treatAsPoint);
} else if (paramName == HdLightTokens->shapingConeAngle) {
} else if (paramName == UsdLuxTokens->inputsShapingConeAngle) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We would like to be able to compile MayaUsd and mtoh against older versions of USD as well. You will need to add some preprocessor macros testing #if PXR_VERSION >= 2105 before using the new tokens.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Apr 7, 2022
@seando-adsk seando-adsk merged commit 700cfd9 into Autodesk:dev Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mtoh Related to legacy Maya to Hydra plugin. 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.

4 participants