Skip to content
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

EMSUSD-1654 Updated baseline images for testVP2RenderDelegateLights test #3938

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/lib/mayaUsd/render/vp2RenderDelegate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ foreach(script ${TEST_SCRIPT_FILES})
# Maya uses a very old version of GLEW, so we need support for
# pre-loading a newer version from elsewhere.
"LD_PRELOAD=${ADDITIONAL_LD_PRELOAD}"

# Used in detecting whether there is support for volume light gizmos
"UFE_VOLUME_LIGHTS_SUPPORT=${UFE_VOLUME_LIGHTS_SUPPORT}"
)

# Assign a CTest label to these tests for easy filtering.
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.
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.
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def setUpClass(cls):
'VP2RenderDelegateLightsTest', 'baseline')

cls._testDir = os.path.abspath('.')

if (os.getenv('UFE_VOLUME_LIGHTS_SUPPORT', 'FALSE') == 'FALSE'):
cls._suffix = '-legacy'
else:
cls._suffix = ''

def assertSnapshotClose(self, imageName):
baselineImage = os.path.join(self._baselineDir, imageName)
Expand All @@ -66,7 +71,7 @@ def _RunTest(self):
# unselect all and compare images
globalSelection = ufe.GlobalSelection.get()
globalSelection.clear()
self.assertSnapshotClose('%s_unselected.png' % (self._testName))
self.assertSnapshotClose('%s_unselected%s.png' % (self._testName, self._suffix))

# select all 4 lights and compare images
selection = ufe.Selection()
Expand All @@ -75,36 +80,36 @@ def _RunTest(self):
selection.append(self._GetSceneItem('|stage|stageShape', '/lights/directionalLight'))
selection.append(self._GetSceneItem('|stage|stageShape', '/lights/areaLight'))
globalSelection.replaceWith(selection)
self.assertSnapshotClose('%s_selected.png' % (self._testName))
self.assertSnapshotClose('%s_selected%s.png' % (self._testName, self._suffix))

# move all 4 lights and compare images
cmds.move(-2, -2, -2, relative=True)
self.assertSnapshotClose('%s_moved.png' % (self._testName))
self.assertSnapshotClose('%s_moved%s.png' % (self._testName, self._suffix))

# rename the stage to verify that the proxy light handles this properly
cmds.rename('|stage', 'stage2')

# select the stage and compare images
globalSelection.clear()
cmds.select('|stage2')
self.assertSnapshotClose('%s_stage_selected.png' % (self._testName))
self.assertSnapshotClose('%s_stage_selected%s.png' % (self._testName, self._suffix))

# delete one of the lights to verify that the proxy light handles this properly
cmds.delete('|stage2|stage2Shape,/lights/pointLight')

# move the stage and compare images
cmds.move(4, 4, 4, absolute=True)
self.assertSnapshotClose('%s_stage_moved.png' % (self._testName))
self.assertSnapshotClose('%s_stage_moved%s.png' % (self._testName, self._suffix))

# add a new USD light and compare images
stage = mayaUsdUfe.getStage("|stage2|stage2Shape")
stage.DefinePrim('/lights2/pointLight2', "SphereLight")
cmds.select( clear=True )
self.assertSnapshotClose('%s_with_new_light.png' % (self._testName))
self.assertSnapshotClose('%s_with_new_light%s.png' % (self._testName, self._suffix))

# set time and verify light animation
cmds.currentTime(3)
self.assertSnapshotClose('%s_animation.png' % (self._testName))
self.assertSnapshotClose('%s_animation%s.png' % (self._testName, self._suffix))

def _GetSceneItem(self, mayaPathString, usdPathString):
mayaPathSegment = mayaUtils.createUfePathSegment(mayaPathString)
Expand Down