auto cache = pxr::UsdStageCache {};
{
pxr::UsdStageCacheContext context(cache);
auto stage = pxr::UsdStage::CreateInMemory();
}
cache = Usd.StageCache()
with Usd.StageCacheContext(cache):
stage = Usd.Stage.CreateInMemory()
auto stage = pxr::UsdStage::CreateInMemory();
auto cache = pxr::UsdStageCache {};
cache.Insert(stage);
stage = Usd.Stage.CreateInMemory()
cache = Usd.StageCache()
cache.Insert(stage)
def get_stage_from_id(stage_id):
"""Refer to the singleton UsdUtils cache to find a stage by-ID."""
cache = UsdUtils.StageCache.Get()
print('Found stage', cache.Find(stage_id))
https://graphics.pixar.com/usd/docs/api/class_usd_stage_cache.html
https://graphics.pixar.com/usd/docs/api/class_usd_stage_cache_context.html
https://graphics.pixar.com/usd/docs/api/class_usd_utils_stage_cache.html