#include <stageCache.h>
Cache for USD stages. Clients interact with the cache via the GusdStageCacheReader and GusdStageCacheWriter classes.
Definition at line 58 of file stageCache.h.
GusdStageCache::GusdStageCache |
( |
| ) |
|
GusdStageCache::~GusdStageCache |
( |
| ) |
|
Add/remove auxiliary data caches. Auxiliary data caches are cleared in response to changes to stages on this cache.
Utility function to create a LOP stage identifier from a path to a LOP node, and the other bits of data required to generated a locked stage from a LOP node in the HUSD library.
static void GusdStageCache::ReloadLayers |
( |
const UT_Set< SdfLayerHandle > & |
layers | ) |
|
|
static |
Mark a set of layers for reload on the event queue.
static void GusdStageCache::ReloadStages |
( |
const UT_Set< UsdStagePtr > & |
stages | ) |
|
|
static |
Mark a set of stages for reload on the event queue.
Reloading
Stages and layers may be reloaded during an active session, but it's important to understand the full implications of doing so. When a layer is reloaded, change notifications are sent to any stages referencing that layer, causing those stages to recompose, if necessary. This operation is not thread-safe, and may result in a crash if another thread is attempting to read from an affected stage at the same time. Further, it must be noted that simply loading stages within separate GusdStageCache instances also does not mean that that change propopagation will be isolated only to stages of the stage cache instance: Although it is possible to isolate the effect of changes on the root layers of stages to some extent, secondary layers – such as sublayers and reference arcs – are shared on a global cache. The effect of reloading layers is global and immediate.
Rather than attempting to solve this problem with intrusive and expensive locking – which would only solve the problem for stages held internally in a GusdStageCache, not for stages referenced from other caches – we prefer to address the problem by requiring that reloading only be performed at certain points of Houdini's main event loop, where it is known to be safe. An example of a 'safe' way to exec stage reloads is via a callback triggered by a button in a node's GUI. Users should never attempt to reload stages or layers during node cook methods.
Add/remove auxiliary data caches. Auxiliary data caches are cleared in response to changes to stages on this cache.
Set the callback function that should be used to interpret stage file paths that specify a LOP node.
Set a callback used to track the construction and destruction of stage cache readers/writers. This is used by the Lop Stage Resolver to know when it is safe to clean up after itself.
Utility function to split a stage file path specifying a LOP node into a part that specifies the LOP node and any additional arguments that may appear after the LOP node path. Returns true if the path is a LOP node path (starts with "op:"), otherwise returns false.
The documentation for this class was generated from the following file: