|
| GusdStageCacheWriter (GusdStageCache &cache=GusdStageCache::GetInstance()) |
|
| GusdStageCacheWriter (const GusdStageCacheWriter &)=delete |
|
GusdStageCacheWriter & | operator= (const GusdStageCacheWriter &)=delete |
|
void | FindStages (const UT_StringSet &paths, UT_Set< UsdStageRefPtr > &stages) |
|
void | Clear () |
|
exint | ClearEntriesFromDisk () |
|
void | Clear (const UT_StringSet &paths) |
|
void | ReloadStages (const UT_StringSet &paths) |
| Reload all stages matching the given paths. More...
|
|
| GusdStageCacheReader (GusdStageCache &cache=GusdStageCache::GetInstance()) |
| Construct a reader for the cache singleton. More...
|
|
| GusdStageCacheReader (const GusdStageCacheReader &)=delete |
|
GusdStageCacheReader & | operator= (const GusdStageCacheReader &)=delete |
|
| ~GusdStageCacheReader () |
|
UsdStageRefPtr | Find (const UT_StringRef &path, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), const GusdStageEditPtr &edit=nullptr) const |
| Find an existing stage on the cache. More...
|
|
UsdStageRefPtr | FindOrOpen (const UT_StringRef &path, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), const GusdStageEditPtr &edit=nullptr, UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
void | InsertStage (UsdStageRefPtr &stage, const UT_StringRef &path, const GusdStageOpts &opts, const GusdStageEditPtr &edit) |
|
DEP_MicroNode * | GetStageMicroNode (const UsdStagePtr &stage) |
|
PrimStagePair | GetPrim (const UT_StringRef &path, const SdfPath &primPath, const GusdStageEditPtr &stageEdit=GusdStageEditPtr(), const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
bool | GetPrims (const GusdDefaultArray< UT_StringHolder > &filePaths, const UT_Array< SdfPath > &primPaths, const GusdDefaultArray< GusdStageEditPtr > &edits, UsdPrim *prims, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
PrimStagePair | GetPrimWithVariants (const UT_StringRef &path, const SdfPath &primPath, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
PrimStagePair | GetPrimWithVariants (const UT_StringRef &path, const UT_StringRef &primPath, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
PrimStagePair | GetPrimWithVariants (const UT_StringRef &path, const SdfPath &primPath, const SdfPath &variants, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
| Different variations of the above the variants are stored separately. More...
|
|
PrimStagePair | GetPrimWithVariants (const UT_StringRef &path, const UT_StringRef &primPath, const UT_StringRef &variants, const GusdStageOpts &opts=GusdStageOpts::LoadAll(), UT_ErrorSeverity sev=UT_ERROR_ABORT) |
|
Write accessor for a stage cache. Write accessors have all of the capabilities of readers, and can also remove elements from the cache and manipulate child data caches. Writers gain exclusive locks to the cache, and should be used sparingly.
Definition at line 341 of file stageCache.h.
void GusdStageCacheWriter::Clear |
( |
| ) |
|
Reloading And Clearing
During active sessions, the contents of a cache may be refreshed by either reloading a subset of the stages that it contains, or by removing stage entries from the cache. In either case, if a stage is reloaded or evicted from the cache, and if that stage has a micro node (see: GusdStageCacheReader::GetMicroNode), then that micro node, and any OP_Node instances that reference it, are dirtied. This means that any nodes whose cook is based on data from a cached stage will properly update in response to Clear()/Reload() actions.
Dirty state propagation is not thread safe, and should only be called at a safe point on the main thread, such as through a callback triggered by a UI button. Also note that there may be side effects from reloading stages that affect stages from other caches. See Reloading for more information on the caveats of reloading. Clear out all cached items. Note that layers are owned by a different cache, and may stay active beyond this point.