diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/CMakeLists.txt b/test/lib/mayaUsd/render/vp2RenderDelegate/CMakeLists.txt index 34930c1acd..5f3bb894df 100644 --- a/test/lib/mayaUsd/render/vp2RenderDelegate/CMakeLists.txt +++ b/test/lib/mayaUsd/render/vp2RenderDelegate/CMakeLists.txt @@ -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. diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation-legacy.png new file mode 100644 index 0000000000..3c0ca870c4 Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation.png index 3c0ca870c4..0a64a4d6e2 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_animation.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved-legacy.png new file mode 100644 index 0000000000..85e2da1a5f Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved.png index 85e2da1a5f..806edc1f0b 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_moved.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected-legacy.png new file mode 100644 index 0000000000..565e33d0bd Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected.png index 565e33d0bd..fcc58ed662 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_selected.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_moved-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_moved-legacy.png new file mode 100644 index 0000000000..3b49399e4a Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_moved-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected-legacy.png new file mode 100644 index 0000000000..c5169e0273 Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected.png index c5169e0273..0c8d8fcf5d 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_stage_selected.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected-legacy.png new file mode 100644 index 0000000000..2e70d3cc22 Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected.png index 2e70d3cc22..690c6e7563 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_unselected.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light-legacy.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light-legacy.png new file mode 100644 index 0000000000..462d0b74ee Binary files /dev/null and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light-legacy.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light.png b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light.png index 462d0b74ee..ba82a3ab39 100644 Binary files a/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light.png and b/test/lib/mayaUsd/render/vp2RenderDelegate/VP2RenderDelegateLightsTest/baseline/RenderLights_with_new_light.png differ diff --git a/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateLights.py b/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateLights.py index 72b662792b..9326dea112 100644 --- a/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateLights.py +++ b/test/lib/mayaUsd/render/vp2RenderDelegate/testVP2RenderDelegateLights.py @@ -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) @@ -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() @@ -75,11 +80,11 @@ 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') @@ -87,24 +92,24 @@ def _RunTest(self): # 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)