本文整理汇总了C++中SdfLayerHandle::GetPseudoRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ SdfLayerHandle::GetPseudoRoot方法的具体用法?C++ SdfLayerHandle::GetPseudoRoot怎么用?C++ SdfLayerHandle::GetPseudoRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SdfLayerHandle
的用法示例。
在下文中一共展示了SdfLayerHandle::GetPseudoRoot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
PXR_NAMESPACE_OPEN_SCOPE
bool
UsdUtilsCopyLayerMetadata(const SdfLayerHandle &source,
const SdfLayerHandle &destination,
bool skipSublayers)
{
if (!TF_VERIFY(source && destination))
return false;
SdfPrimSpecHandle sourcePseudo = source->GetPseudoRoot();
SdfPrimSpecHandle destPseudo = destination->GetPseudoRoot();
std::vector<TfToken> infoKeys = sourcePseudo->ListInfoKeys();
std::vector<TfToken>::iterator last = infoKeys.end();
if (skipSublayers){
last = std::remove_if(infoKeys.begin(), last,
[](TfToken key) { return (key == SdfFieldKeys->SubLayers || key == SdfFieldKeys->SubLayerOffsets); });
}
for (auto key = infoKeys.begin(); key != last; ++key){
destPseudo->SetInfo(*key, sourcePseudo->GetInfo(*key));
}
return true;
}
示例2: Parent
Sdf_SubLayerListEditor::Sdf_SubLayerListEditor(
const SdfLayerHandle& owner)
: Parent(owner->GetPseudoRoot(),
SdfFieldKeys->SubLayers, SdfListOpTypeOrdered)
{
}