From 57d44cc2a8c6f740b35c202be01b22fe6b47da18 Mon Sep 17 00:00:00 2001 From: Ivan Vlasov Date: Tue, 26 Mar 2024 12:56:55 -0400 Subject: [PATCH] Renaming mtohRefinementLevel to mayaHydraRefinementLevel --- lib/mayaHydra/mayaPlugin/renderGlobals.cpp | 8 ++++---- lib/mayaHydra/mayaPlugin/tokens.h | 2 +- .../mayaUsd/render/mayaToHydra/testRefinement.py | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/mayaHydra/mayaPlugin/renderGlobals.cpp b/lib/mayaHydra/mayaPlugin/renderGlobals.cpp index 64ad7cbc7b..044bfc868b 100644 --- a/lib/mayaHydra/mayaPlugin/renderGlobals.cpp +++ b/lib/mayaHydra/mayaPlugin/renderGlobals.cpp @@ -733,9 +733,9 @@ void MtohRenderGlobals::BuildOptionsMenu( { ss << "\tmtohRenderOverride_AddAttribute(" << quote(rendererDesc.rendererName.GetString()) << ',' << quote("Refine level") << ',' // Description - << quote(_MangleName(MtohTokens->mtohRefinementLevel).GetString()) + << quote(_MangleName(MtohTokens->mayaHydraRefinementLevel).GetString()) << ',' // Attribute name - << quote(MtohTokens->mtohRefinementLevel.GetText()) // Label + << quote(MtohTokens->mayaHydraRefinementLevel.GetText()) // Label << ", $fromAE);\n"; } @@ -925,7 +925,7 @@ MObject MtohRenderGlobals::CreateAttributes(const GlobalParams& params) return mayaObject; } } - if (filter(MtohTokens->mtohRefinementLevel)) { + if (filter(MtohTokens->mayaHydraRefinementLevel)) { _CreateIntAttribute( node, filter.mayaString(), @@ -1126,7 +1126,7 @@ MtohRenderGlobals::GetInstance(const GlobalParams& params, bool storeUserSetting return globals; } } - if (filter(MtohTokens->mtohRefinementLevel)) { + if (filter(MtohTokens->mayaHydraRefinementLevel)) { _GetAttribute( node, filter.mayaString(), diff --git a/lib/mayaHydra/mayaPlugin/tokens.h b/lib/mayaHydra/mayaPlugin/tokens.h index 3a96dc4d7c..6cf8e20f7f 100644 --- a/lib/mayaHydra/mayaPlugin/tokens.h +++ b/lib/mayaHydra/mayaPlugin/tokens.h @@ -25,7 +25,7 @@ PXR_NAMESPACE_OPEN_SCOPE #define MTOH_TOKENS \ (HdStormRendererPlugin) \ (mtohMaximumShadowMapResolution) \ - (mtohRefinementLevel) + (mayaHydraRefinementLevel) // clang-format on // This is not an exported API. diff --git a/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py b/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py index 02e82fdc4c..6817cd65a2 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py +++ b/test/lib/mayaUsd/render/mayaToHydra/testRefinement.py @@ -41,21 +41,21 @@ def test_usdPrim(self): self.setHdStormRenderer() cmds.mayaHydra(createRenderGlobals=1) - cmds.setAttr("defaultRenderGlobals.mtohRefinementLevel", 0) - cmds.mayaHydra(updateRenderGlobals="mtohRefinementLevel") + cmds.setAttr("defaultRenderGlobals.mayaHydraRefinementLevel", 0) + cmds.mayaHydra(updateRenderGlobals="mayaHydraRefinementLevel") self.verifySnapshot("usd_cube_refined_0.png") - cmds.setAttr("defaultRenderGlobals.mtohRefinementLevel", 2) - cmds.mayaHydra(updateRenderGlobals="mtohRefinementLevel") + cmds.setAttr("defaultRenderGlobals.mayaHydraRefinementLevel", 2) + cmds.mayaHydra(updateRenderGlobals="mayaHydraRefinementLevel") self.verifySnapshot("usd_cube_refined_2.png") - cmds.setAttr("defaultRenderGlobals.mtohRefinementLevel", 4) - cmds.mayaHydra(updateRenderGlobals="mtohRefinementLevel") + cmds.setAttr("defaultRenderGlobals.mayaHydraRefinementLevel", 4) + cmds.mayaHydra(updateRenderGlobals="mayaHydraRefinementLevel") self.verifySnapshot("usd_cube_refined_4.png") #restore the default - cmds.setAttr("defaultRenderGlobals.mtohRefinementLevel", 0) - cmds.mayaHydra(updateRenderGlobals="mtohRefinementLevel") + cmds.setAttr("defaultRenderGlobals.mayaHydraRefinementLevel", 0) + cmds.mayaHydra(updateRenderGlobals="mayaHydraRefinementLevel") if __name__ == '__main__': fixturesUtils.runTests(globals())