Skip to content

Commit

Permalink
Merge pull request #2241 from Autodesk/t_gamaj/fix_lighting_intensity…
Browse files Browse the repository at this point in the history
…_for_snapshots

Fix cotd preflights image comparison failures
  • Loading branch information
seando-adsk authored Apr 6, 2022
2 parents b4e78fa + 677676b commit cbcd729
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/testUtils/imageUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import unittest

import maya.cmds as cmds
import maya.mel

import testUtils
import mayaUtils
Expand All @@ -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:
Expand Down

0 comments on commit cbcd729

Please sign in to comment.