Skip to content

Commit

Permalink
update based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
lilike-adsk committed Feb 1, 2024
1 parent a9836d2 commit 6a061fb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/lib/mayaUsd/render/mayaToHydra/testUSDLights.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ class TestUSDLights(mtohUtils.MtohTestCase): #Subclassing mtohUtils.MtohTestCase
# MayaHydraBaseTestCase.setUpClass requirement.
_file = __file__

IMAGE_DIFF_FAIL_THRESHOLD = 0.1
IMAGE_DIFF_FAIL_PERCENT = 0.3
IMAGE_DIFF_FAIL_THRESHOLD = 0.01
IMAGE_DIFF_FAIL_PERCENT = 0.2

def verifyLightingModes(self, shadowOn):
imageSuffix = "_shadowOn" if shadowOn else ""
panel = mayaUtils.activeModelPanel()

#Turn on/off shadows
cmds.modelEditor(panel, edit=True, shadows=shadowOn)

#All Lights mode
cmds.modelEditor(panel, edit=True, displayLights="all")
cmds.refresh()
Expand Down Expand Up @@ -72,18 +75,13 @@ def verifyLightingModes(self, shadowOn):
@unittest.skipUnless(mtohUtils.checkForMayaUsdPlugin(), "Requires Maya USD Plugin.")
def test_USDLights(self):
cmds.file(new=True, force=True)
cmds.refresh()

# Load a maya scene with a maya native sphere, usd sphere and some lights, with HdStorm already being the viewport renderer.
# The sphere is not at the origin on purpose
testFile = mayaUtils.openTestScene(
"testUSDLights",
"testUSDLights.ma")
cmds.refresh()
#Do a view fit --Test removed as on Linux the fit doesn't produce the same result as on Windows and OSX.
#cmds.viewFit('persp')
#cmds.refresh()
#self.assertSnapshotClose("allLightsFit.png", None, None)

#Test Lighting Modes
#Shadow OFF
Expand Down

0 comments on commit 6a061fb

Please sign in to comment.