Skip to content

Commit

Permalink
use different image baselines based on CullMode API is availabe or not
Browse files Browse the repository at this point in the history
  • Loading branch information
lilike-adsk committed Nov 29, 2024
1 parent aae6d5e commit 4467df5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
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.
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.
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 4467df5

Please sign in to comment.