-
Notifications
You must be signed in to change notification settings - Fork 5
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
HYDRA-1275 Prepare code and unit test for usd 24.11 #206
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,14 @@ class TestIsolateSelect(mtohUtils.MayaHydraBaseTestCase): | |
|
||
_requiredPlugins = ['mayaHydraCppTests', 'mayaHydraFlowViewportAPILocator'] | ||
|
||
imageVersion = None | ||
|
||
@classmethod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the unit tests, there are basically 2 possible workarounds to keep the same images as much as possible.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For 1. : Could we change the modify/reset methods to be more generic/modifiable over time than them being fixed to a single version, since I presume these things could change again? i.e. have something like setDefaultLightIntensityByUsdVersion and resetDefaultLightIntensity, in which we could handle all the different USD versions For 2. : Could we move the imageVersion class attribute and setup to the MayaHydraBaseTestCase in mtohUtils.py? That way the usd version would always be set automatically, can be used as needed and the code will not have to be copy-pasted in each test |
||
def setUpClass(cls): | ||
super(TestIsolateSelect, cls).setUpClass() | ||
if cls._usdVersion >= (0, 24, 11): | ||
cls.imageVersion = 'usd_2411+' | ||
Comment on lines
+61
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I had in mind was actually to move the imageVersion attribute itself to |
||
|
||
def setupScene(self): | ||
proxyShapePathStr = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() | ||
stage = mayaUsd.lib.GetPrim(proxyShapePathStr).GetStage() | ||
|
@@ -320,9 +328,9 @@ def test_isolateSelectMultiViewport(self): | |
cmds.select(clear=1) | ||
|
||
cmds.refresh() | ||
|
||
self.assertSnapshotClose("singleViewportIsolateSelectCylinder1.png", 0.1, 2) | ||
|
||
#Has a different version for usd 24.11+ | ||
self.assertSnapshotClose("singleViewportIsolateSelectCylinder1.png", 0.1, 2, self.imageVersion) | ||
# Switch to four-up viewport mode. Set the renderer in each new | ||
# viewport to be Hydra Storm. Viewport 4 is already set. | ||
cmds.FourViewLayout() | ||
|
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.
This is not used at all, we don't use Boost and it was removed in usd 24.11+