Skip to content

Added USD inherits / specializes test. #257

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

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

ppt-adsk
Copy link
Collaborator

No description provided.

@ppt-adsk ppt-adsk added the test label Feb 27, 2025
@ppt-adsk ppt-adsk requested a review from lilike-adsk February 27, 2025 20:57
@ppt-adsk ppt-adsk self-assigned this Feb 27, 2025
@ppt-adsk ppt-adsk assigned ppt-adsk and unassigned ppt-adsk Feb 28, 2025
def imageFileName(self):
# Same image snapshot for both inherits and specializes test.
# Fallback material change in USD 24.11, Maya 2025 uses USD 23.11.
return 'inherits_2025.png' if mayaUtils.mayaMajorVersion() == 2025 \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lanierd-adsk is this the right thing to do? Or is there a way to have the same reference image for both 2025 and for later versions?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is another way where you keep the same filename but use an image version parameter (as a string) as a parameter of the assertSnapshotClose. This reads the filename in a subfolder with the imageVersion parameter name. Please see :

imageVersion = maya.mel.eval("defaultShaderName").rstrip(digits)

And we have subfolder of this test named "lambert" and "standardSurface" which correspond to the image version parameter name used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In this test, we have a folder for usd 24.11+ images using that imageVersion parameter :

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Used modifyDefaultLightIntensityByUsdVersion(), which unifies the default lighting.

Copy link
Collaborator

@lanierd-adsk lanierd-adsk left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, I think it would be better to use a subfolder with the imageVerdsion parameter as I described in the comments.

def imageFileName(self):
# Same image snapshot for both inherits and specializes test.
# Fallback material change in USD 24.11, Maya 2025 uses USD 23.11.
return 'inherits_2025.png' if mayaUtils.mayaMajorVersion() == 2025 \
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is another way where you keep the same filename but use an image version parameter (as a string) as a parameter of the assertSnapshotClose. This reads the filename in a subfolder with the imageVersion parameter name. Please see :

imageVersion = maya.mel.eval("defaultShaderName").rstrip(digits)

And we have subfolder of this test named "lambert" and "standardSurface" which correspond to the image version parameter name used.

def imageFileName(self):
# Same image snapshot for both inherits and specializes test.
# Fallback material change in USD 24.11, Maya 2025 uses USD 23.11.
return 'inherits_2025.png' if mayaUtils.mayaMajorVersion() == 2025 \
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this test, we have a folder for usd 24.11+ images using that imageVersion parameter :

@ppt-adsk ppt-adsk requested a review from lanierd-adsk March 3, 2025 14:37
@ppt-adsk ppt-adsk assigned ppt-adsk and unassigned ppt-adsk Mar 3, 2025

def setUp(self):
super(TestUsdInheritsSpecializes, self).setUp()
self.modifyDefaultLightIntensityByUsdVersion()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I didn't get you were having this kind of problems... I did that function :-)

@ppt-adsk ppt-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Mar 3, 2025
@lilike-adsk lilike-adsk merged commit 00624d5 into dev Mar 4, 2025
10 checks passed
@lilike-adsk lilike-adsk deleted the tremblp/HYDRA-879/test_USD_inherits_specializes branch March 4, 2025 18:25
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 test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants