Skip to content

Commit

Permalink
Renaming mtohRefinementLevel to mayaHydraRefinementLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
vlasovi committed Mar 26, 2024
1 parent 97b5c16 commit 57d44cc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions lib/mayaHydra/mayaPlugin/renderGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down Expand Up @@ -925,7 +925,7 @@ MObject MtohRenderGlobals::CreateAttributes(const GlobalParams& params)
return mayaObject;
}
}
if (filter(MtohTokens->mtohRefinementLevel)) {
if (filter(MtohTokens->mayaHydraRefinementLevel)) {
_CreateIntAttribute(
node,
filter.mayaString(),
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion lib/mayaHydra/mayaPlugin/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PXR_NAMESPACE_OPEN_SCOPE
#define MTOH_TOKENS \
(HdStormRendererPlugin) \
(mtohMaximumShadowMapResolution) \
(mtohRefinementLevel)
(mayaHydraRefinementLevel)
// clang-format on

// This is not an exported API.
Expand Down
16 changes: 8 additions & 8 deletions test/lib/mayaUsd/render/mayaToHydra/testRefinement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

0 comments on commit 57d44cc

Please sign in to comment.