-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added USD inherits / specializes test. #257
Conversation
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 \ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :
cls.imageVersion = 'usd_2411+' |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 :
cls.imageVersion = 'usd_2411+' |
|
||
def setUp(self): | ||
super(TestUsdInheritsSpecializes, self).setUp() | ||
self.modifyDefaultLightIntensityByUsdVersion() |
There was a problem hiding this comment.
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 :-)
No description provided.