Skip to content

Commit

Permalink
HYDRA-1305 - re-eanble testUSDLights and testOpenPBRSurface with new …
Browse files Browse the repository at this point in the history
…baselines (#213)

* reeanble with new baselines

* use different image baselines based on CullMode API is availabe or not

* disable testUSDLights on Mac due missing refined wires

* update comment
  • Loading branch information
lilike-adsk authored Dec 3, 2024
1 parent c330677 commit 245e282
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ set(INTERACTIVE_TEST_SCRIPT_FILES
testMayaDisplayLayers.py
testMayaIsolateSelect.py
testMayaLights.py
# To be reenabled after investigation HYDRA-1305
#testUSDLights.py
testUSDLights.py|skipOnPlatform:osx # HYDRA-1315 : Wire of DiskLight not showing on OSX
testUVandUDIM.py
testArnoldLights.py|depOnPlugins:mtoa
testLookThrough.py
testObjectTemplate.py
testStandardSurface.py
# To be reenabled after investigation HYDRA-1305
#testOpenPBRSurface.py
testOpenPBRSurface.py
testFlowViewportAPI.py
testStageVariants.py|skipOnPlatform:osx # HYDRA-1127 : refinedWire not working on OSX
testStagePayloadsReferences.py
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/lib/mayaUsd/render/mayaToHydra/USDLightsTest/allLights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions test/lib/mayaUsd/render/mayaToHydra/testOpenPBRSurface.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import mtohUtils
import mayaUtils
import platform
import os

class TestOpenPBRSurface(mtohUtils.MayaHydraBaseTestCase): #Subclassing mtohUtils.MayaHydraBaseTestCase to be able to call self.assertSnapshotClose
# MayaHydraBaseTestCase.setUpClass requirement.
Expand Down Expand Up @@ -97,12 +98,15 @@ def test_OpenPBRSurface(self):
self.assertSnapshotClose("geometryOpacity" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)

#Verify Coat
imageVersion = None
if(os.getenv('MAYA_HAS_RENDER_ITEM_CULL_MODE_API', 'NOT-FOUND') in ('1', 'TRUE')):
imageVersion = "RenderItemHasCullModeAPI"
cmds.setAttr("openPBRSurface1.coatWeight", 0.9)
cmds.refresh()
self.assertSnapshotClose("coatWeight" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)
self.assertSnapshotClose("coatWeight" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT, imageVersion)
cmds.setAttr("openPBRSurface1.coatColor", 0.0,0.0,0.0, type = 'double3')
cmds.refresh()
self.assertSnapshotClose("coatColor" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT)
self.assertSnapshotClose("coatColor" + ".png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT, imageVersion)

if __name__ == '__main__':
fixturesUtils.runTests(globals())

0 comments on commit 245e282

Please sign in to comment.