|
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. More...
#include <stageCacheContext.h>
Public Member Functions | |
UsdStageCacheContext (UsdStageCache &cache) | |
Bind a cache for calls to UsdStage::Open() to read from and write to. | |
UsdStageCacheContext (Usd_NonPopulatingStageCacheWrapper holder) | |
Bind a cache for calls to UsdStage::Open() to read from. | |
UsdStageCacheContext (UsdStageCacheContextBlockType blockType) | |
Disable cache use completely (with UsdBlockStageCaches) or only for writing (with UsdBlockStageCacheWrites). | |
Friends | |
class | UsdStage |
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.
Definition at line 104 of file stageCacheContext.h.
|
inlineexplicit |
Bind a cache for calls to UsdStage::Open() to read from and write to.
Definition at line 108 of file stageCacheContext.h.
|
inlineexplicit |
Bind a cache for calls to UsdStage::Open() to read from.
Definition at line 115 of file stageCacheContext.h.
|
inlineexplicit |
Disable cache use completely (with UsdBlockStageCaches) or only for writing (with UsdBlockStageCacheWrites).
Definition at line 122 of file stageCacheContext.h.
|
friend |
Definition at line 126 of file stageCacheContext.h.