HDK
|
#include <changes.h>
Public Types | |
typedef std::map < PcpLayerStackPtr, PcpLayerStackChanges > | LayerStackChanges |
typedef std::map< PcpCache *, PcpCacheChanges > | CacheChanges |
Public Member Functions | |
PCP_API | PcpChanges () |
PCP_API | ~PcpChanges () |
PCP_API void | DidChange (const PcpCache *cache, const SdfLayerChangeListVec &changes) |
PCP_API void | DidMaybeFixSublayer (const PcpCache *cache, const SdfLayerHandle &layer, const std::string &assetPath) |
PCP_API void | DidMaybeFixAsset (const PcpCache *cache, const PcpSite &site, const SdfLayerHandle &srcLayer, const std::string &assetPath) |
PCP_API void | DidMuteLayer (const PcpCache *cache, const std::string &layerId) |
The layer identified by layerId was muted in cache . More... | |
PCP_API void | DidUnmuteLayer (const PcpCache *cache, const std::string &layerId) |
The layer identified by layerId was unmuted in cache . More... | |
PCP_API void | DidChangeSignificantly (const PcpCache *cache, const SdfPath &path) |
PCP_API void | DidChangeSpecs (const PcpCache *cache, const SdfPath &path, const SdfLayerHandle &changedLayer, const SdfPath &changedPath) |
PCP_API void | DidChangeSpecStack (const PcpCache *cache, const SdfPath &path) |
PCP_API void | DidChangeTargets (const PcpCache *cache, const SdfPath &path, PcpCacheChanges::TargetType targetType) |
PCP_API void | DidChangePaths (const PcpCache *cache, const SdfPath &oldPath, const SdfPath &newPath) |
PCP_API void | DidDestroyCache (const PcpCache *cache) |
Remove any changes for cache . More... | |
PCP_API void | DidChangeAssetResolver (const PcpCache *cache) |
PCP_API void | Swap (PcpChanges &other) |
Swap the contents of this and other . More... | |
PCP_API bool | IsEmpty () const |
Returns true iff there are no changes. More... | |
PCP_API const LayerStackChanges & | GetLayerStackChanges () const |
PCP_API const CacheChanges & | GetCacheChanges () const |
Returns a map of all of the cache changes. More... | |
PCP_API const PcpLifeboat & | GetLifeboat () const |
PCP_API void | Apply () const |
Applies the changes to the layer stacks and caches. More... | |
Describes Pcp changes.
Collects changes to Pcp necessary to reflect changes in Sdf. It does not cause any changes to any Pcp caches, layer stacks, etc; it only computes what changes would be necessary to Pcp to reflect the Sdf changes.
typedef std::map<PcpCache*, PcpCacheChanges> PcpChanges::CacheChanges |
typedef std::map<PcpLayerStackPtr, PcpLayerStackChanges> PcpChanges::LayerStackChanges |
PCP_API PcpChanges::PcpChanges | ( | ) |
PCP_API PcpChanges::~PcpChanges | ( | ) |
PCP_API void PcpChanges::DidChange | ( | const PcpCache * | cache, |
const SdfLayerChangeListVec & | changes | ||
) |
Breaks down changes
into individual changes on cache
. This simply translates data in changes
into other Did...() calls on this object.
Clients will typically call this method once then call Apply()
or get the changes using GetLayerStackChanges()
and GetCacheChanges()
.
The asset resolver has changed, invalidating previously-resolved asset paths. This function will check all prim indexes in cache
for composition arcs that may now refer to a different asset and mark them as needing significant resyncs.
PCP_API void PcpChanges::DidChangePaths | ( | const PcpCache * | cache, |
const SdfPath & | oldPath, | ||
const SdfPath & | newPath | ||
) |
The composed object at oldPath
was moved to newPath
. This implies every corresponding Sd change. This object will subsume those Sd changes under this higher-level move. Sd path changes that are not so subsumed will be converted to DidChangePrimGraph() and/or DidChangeSpecs() changes.
The object at path
changed significantly enough to require recomputing the entire prim or property index. A significant change implies changes to every namespace descendant's index, specs, and dependencies.
PCP_API void PcpChanges::DidChangeSpecs | ( | const PcpCache * | cache, |
const SdfPath & | path, | ||
const SdfLayerHandle & | changedLayer, | ||
const SdfPath & | changedPath | ||
) |
The spec stack for the prim or property has changed, due to the addition or removal of the spec in changedLayer
at changedPath
. This is used when inert prims/properties are added or removed or when any change requires rebuilding the property stack. It implies that dependencies on those specs has changed.
The spec stack for the prim or property at path
in cache
has changed.
PCP_API void PcpChanges::DidChangeTargets | ( | const PcpCache * | cache, |
const SdfPath & | path, | ||
PcpCacheChanges::TargetType | targetType | ||
) |
The connections on the attribute or targets on the relationship have changed.
PCP_API void PcpChanges::DidMaybeFixAsset | ( | const PcpCache * | cache, |
const PcpSite & | site, | ||
const SdfLayerHandle & | srcLayer, | ||
const std::string & | assetPath | ||
) |
Tries to load the asset at assetPath
. If successful, any prim in cache
using the site site
is marked as changed.
PCP_API void PcpChanges::DidMaybeFixSublayer | ( | const PcpCache * | cache, |
const SdfLayerHandle & | layer, | ||
const std::string & | assetPath | ||
) |
Tries to load the sublayer of layer
at sublayerPath
. If successful, any layer stack using layer
is marked as having changed and all prims in cache
using any prim in any of those layer stacks are marked as changed.
PCP_API void PcpChanges::DidMuteLayer | ( | const PcpCache * | cache, |
const std::string & | layerId | ||
) |
The layer identified by layerId
was muted in cache
.
PCP_API void PcpChanges::DidUnmuteLayer | ( | const PcpCache * | cache, |
const std::string & | layerId | ||
) |
The layer identified by layerId
was unmuted in cache
.
PCP_API const CacheChanges& PcpChanges::GetCacheChanges | ( | ) | const |
Returns a map of all of the cache changes.
PCP_API const LayerStackChanges& PcpChanges::GetLayerStackChanges | ( | ) | const |
Returns a map of all of the layer stack changes. Note that some keys may be to expired layer stacks.
PCP_API const PcpLifeboat& PcpChanges::GetLifeboat | ( | ) | const |
Returns the lifeboat responsible for maintaining the lifetime of layers and layer stacks during change processing. Consumers may inspect this object to determine which of these objects, if any, had their lifetimes affected during change processing.
PCP_API bool PcpChanges::IsEmpty | ( | ) | const |
Returns true
iff there are no changes.
PCP_API void PcpChanges::Swap | ( | PcpChanges & | other | ) |
Swap the contents of this and other
.