From 7e7268b1c4d964b4decc1b422d84dc02f6129928 Mon Sep 17 00:00:00 2001 From: Pierre Tremblay Date: Tue, 3 Dec 2024 15:02:43 -0500 Subject: [PATCH] Addressed code review feedback. --- test/testUtils/mtohUtils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/testUtils/mtohUtils.py b/test/testUtils/mtohUtils.py index 5946f945b..002c1e099 100644 --- a/test/testUtils/mtohUtils.py +++ b/test/testUtils/mtohUtils.py @@ -107,7 +107,9 @@ def setUp(self): self.setHdStormRenderer() # We've just opened a new scene, so we should not be modified. Setting - # Storm should conceptually not change that status. + # Storm as the renderer should conceptually not change that status, but + # unfortunately in automated tests it does (see setHdStormRender() + # method documentation). Restore modified status to false. cmds.file(modified=False) @classmethod @@ -133,6 +135,10 @@ def setHdStormRenderer(self): cmds.modelEditor( self.activeEditor, e=1, rendererOverrideName=HD_STORM_OVERRIDE) + # During automated tests, tracing demonstrates that the following call + # to refresh marks the scene as modified, with the modified node being + # defaultRenderGlobals. This behavior cannot be reproduced in a + # non-automated interactive Maya. cmds.refresh(f=1) self.delegateId = cmds.mayaHydra(renderer=HD_STORM, sceneDelegateId="MayaHydraSceneDelegate")