From 677676b5d2fe760278185eaf4a78878c4b05efb3 Mon Sep 17 00:00:00 2001 From: Jerry Gamache Date: Mon, 4 Apr 2022 09:21:22 -0400 Subject: [PATCH] Fix cotd preflights image comparison failures The default light intensity can be tuned in cotd and the default value causes image comparison failures. Bring it back to pre-cotd values so image comparisons work across the versions. --- test/testUtils/imageUtils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/testUtils/imageUtils.py b/test/testUtils/imageUtils.py index 4fc4ef6472..92809b3a86 100644 --- a/test/testUtils/imageUtils.py +++ b/test/testUtils/imageUtils.py @@ -2,6 +2,7 @@ import unittest import maya.cmds as cmds +import maya.mel import testUtils import mayaUtils @@ -19,6 +20,10 @@ 'png': 32, } +"""If the current Maya version supports setting the default light intensity, + then restore it to 1 so snapshots look equal across versions.""" +if maya.mel.eval("optionVar -exists defaultLightIntensity"): + maya.mel.eval("optionVar -fv defaultLightIntensity 1") def snapshot(outputPath, width=400, height=None, hud=False, grid=False, camera=None): if height is None: