HDK
|
#include <stageCacheContext.h>
A context object that lets the UsdStage::Open() API read from or read from and write to a UsdStageCache instance during a scope of execution.
Code examples illustrate typical use:
The UsdStage::Open() API examines caches in UsdStageCacheContexts that exist on the stack in the current thread in order starting with the most recently created (deepest in the stack) to the least recently created.
The UsdUseButDoNotPopulateCache() function makes a cache available for UsdStage::Open() to find stages in, but newly opened stages will not be published to it. This can be useful if you want to make use of a cache but cannot or do not wish to mutate that cache.
Passing UsdBlockStageCaches disables cache use entirely (as if no UsdStageCacheContexts exist on the stack), while UsdBlockStageCachePopulation disables writing to all bound caches (as if they were all established with UsdUseButDoNotPopulateCache()).
Threading note: Different threads have different call stacks, so UsdStageCacheContext objects that exist in one thread's stack do not influence calls to UsdStage::Open() from a different thread.