Loading...
Searching...
No Matches
PcpChanges Class Reference

Describes Pcp changes. More...

#include <changes.h>

Public Types

typedef std::map< PcpLayerStackPtr, PcpLayerStackChangesLayerStackChanges
 
typedef std::map< PcpCache *, PcpCacheChangesCacheChanges
 

Public Member Functions

PCP_API void DidChange (const PcpCache *cache, const SdfLayerChangeListVec &changes)
 Breaks down changes into individual changes on cache.
 
PCP_API void DidMaybeFixSublayer (const PcpCache *cache, const SdfLayerHandle &layer, const std::string &assetPath)
 Tries to load the sublayer of layer at sublayerPath.
 
PCP_API void DidMaybeFixAsset (const PcpCache *cache, const PcpSite &site, const SdfLayerHandle &srcLayer, const std::string &assetPath)
 Tries to load the asset at assetPath.
 
PCP_API void DidMuteLayer (const PcpCache *cache, const std::string &layerId)
 The layer identified by layerId was muted in cache.
 
PCP_API void DidUnmuteLayer (const PcpCache *cache, const std::string &layerId)
 The layer identified by layerId was unmuted in cache.
 
PCP_API void DidChangeSignificantly (const PcpCache *cache, const SdfPath &path)
 The object at path changed significantly enough to require recomputing the entire prim or property index.
 
PCP_API void 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.
 
PCP_API void DidChangeSpecStack (const PcpCache *cache, const SdfPath &path)
 The spec stack for the prim or property at path in cache has changed.
 
PCP_API void 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 DidChangePaths (const PcpCache *cache, const SdfPath &oldPath, const SdfPath &newPath)
 The composed object at oldPath was moved to newPath.
 
PCP_API void DidDestroyCache (const PcpCache *cache)
 Remove any changes for cache.
 
PCP_API void DidChangeAssetResolver (const PcpCache *cache)
 The asset resolver has changed, invalidating previously-resolved asset paths.
 
PCP_API void Swap (PcpChanges &other)
 Swap the contents of this and other.
 
PCP_API bool IsEmpty () const
 Returns true iff there are no changes.
 
PCP_API const LayerStackChanges & GetLayerStackChanges () const
 Returns a map of all of the layer stack changes.
 
PCP_API const CacheChanges & GetCacheChanges () const
 Returns a map of all of the cache changes.
 
PCP_API const PcpLifeboatGetLifeboat () const
 Returns the lifeboat responsible for maintaining the lifetime of layers and layer stacks during change processing.
 
PCP_API void Apply () const
 Applies the changes to the layer stacks and caches.
 

Detailed Description

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.

Definition at line 191 of file changes.h.

Member Typedef Documentation

◆ CacheChanges

typedef std::map<PcpCache*, PcpCacheChanges> CacheChanges

Definition at line 289 of file changes.h.

◆ LayerStackChanges

typedef std::map<PcpLayerStackPtr, PcpLayerStackChanges> LayerStackChanges

Definition at line 288 of file changes.h.

Member Function Documentation

◆ Apply()

PCP_API void Apply ( ) const

Applies the changes to the layer stacks and caches.

◆ DidChange()

PCP_API void 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().

◆ DidChangeAssetResolver()

PCP_API void DidChangeAssetResolver ( const PcpCache cache)

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.

◆ DidChangePaths()

PCP_API void 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.

◆ DidChangeSignificantly()

PCP_API void DidChangeSignificantly ( const PcpCache cache,
const SdfPath path 
)

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.

◆ DidChangeSpecs()

PCP_API void 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.

◆ DidChangeSpecStack()

PCP_API void DidChangeSpecStack ( const PcpCache cache,
const SdfPath path 
)

The spec stack for the prim or property at path in cache has changed.

◆ DidChangeTargets()

PCP_API void DidChangeTargets ( const PcpCache cache,
const SdfPath path,
PcpCacheChanges::TargetType  targetType 
)

The connections on the attribute or targets on the relationship have changed.

◆ DidDestroyCache()

PCP_API void DidDestroyCache ( const PcpCache cache)

Remove any changes for cache.

◆ DidMaybeFixAsset()

PCP_API void 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.

◆ DidMaybeFixSublayer()

PCP_API void 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.

◆ DidMuteLayer()

PCP_API void DidMuteLayer ( const PcpCache cache,
const std::string &  layerId 
)

The layer identified by layerId was muted in cache.

◆ DidUnmuteLayer()

PCP_API void DidUnmuteLayer ( const PcpCache cache,
const std::string &  layerId 
)

The layer identified by layerId was unmuted in cache.

◆ GetCacheChanges()

PCP_API const CacheChanges & GetCacheChanges ( ) const

Returns a map of all of the cache changes.

◆ GetLayerStackChanges()

PCP_API const LayerStackChanges & GetLayerStackChanges ( ) const

Returns a map of all of the layer stack changes.

Note that some keys may be to expired layer stacks.

◆ GetLifeboat()

PCP_API const PcpLifeboat & 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.

◆ IsEmpty()

PCP_API bool IsEmpty ( ) const

Returns true iff there are no changes.

◆ Swap()

PCP_API void Swap ( PcpChanges other)

Swap the contents of this and other.


The documentation for this class was generated from the following file: