Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix anonymous layer default name #660

Merged
merged 2 commits into from
Jul 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/mayaUsd/nodes/proxyShapeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ TF_DEFINE_PUBLIC_TOKENS(MayaUsdProxyShapeBaseTokens,
MayaUsdProxyShapeBase::ClosestPointDelegate
MayaUsdProxyShapeBase::_sharedClosestPointDelegate = nullptr;

const std::string kAnonymousLayerName{"anonymousLayer1"};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker for the change...but non exported definitions we prefer to put in the unnamed namespace - https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#sf22-use-an-unnamed-anonymous-namespace-for-all-internalnon-exported-entities. Consider adapting to this rule in a new PR.


// ========================================================

Expand Down Expand Up @@ -584,7 +585,7 @@ MayaUsdProxyShapeBase::computeInStageDataCached(MDataBlock& dataBlock)
}
else {
// Create a new stage in memory with an anonymous root layer.
usdStage = UsdStage::CreateInMemory("", loadSet);
usdStage = UsdStage::CreateInMemory(kAnonymousLayerName, loadSet);
}
}

Expand Down