7 #ifndef PXR_USD_PCP_CHANGES_H
8 #define PXR_USD_PCP_CHANGES_H
24 #include <unordered_set>
83 , _didChangeExpressionVariablesSource(false)
91 bool _didChangeExpressionVariablesSource;
150 using _ProcessedLayerSublayerPathPairsKey =
151 std::pair<SdfLayerHandle, std::string>;
156 std::unordered_set<_ProcessedLayerSublayerPathPairsKey, TfHash>
157 _processedLayerSublayerPathPairs;
170 SdfPathSet _didChangePrimSpecsAndChildrenInternal;
184 void Retain(
const PcpLayerStackRefPtr& layerStack);
194 std::set<SdfLayerRefPtr> _layers;
195 std::set<PcpLayerStackRefPtr> _layerStacks;
229 const SdfLayerHandle&
layer,
230 const std::string& assetPath);
237 const SdfLayerHandle& srcLayer,
238 const std::string& assetPath);
254 const std::vector<std::string>& layersToMute,
255 const std::vector<std::string>& layersToUnmute);
276 const SdfLayerHandle& changedLayer,
312 void Swap(PcpChanges& other);
343 typedef std::map<SdfPath, SdfPath> _PathEditMap;
344 typedef std::map<PcpCache*, _PathEditMap> _RenameChanges;
353 _PathEditMap& _GetRenameChanges(
const PcpCache* cache);
357 void _Optimize()
const;
367 const _PathEditMap* pathChanges);
370 enum _SublayerChangeType {
378 const SdfLayerHandle& layer,
379 const std::string& sublayerPath,
380 _SublayerChangeType changeType)
const;
385 const std::string& sublayerPath,
386 _SublayerChangeType changeType)
const;
391 void _DidChangeSublayerAndLayerStacks(
const PcpCache* cache,
392 const PcpLayerStackPtrVector& stacks,
393 const std::string& sublayerPath,
394 const SdfLayerHandle& sublayer,
395 _SublayerChangeType sublayerChange,
396 std::string* debugSummary);
400 void _DidChangeSublayer(
const PcpCache* cache,
401 const PcpLayerStackPtrVector& layerStacks,
402 const std::string& sublayerPath,
403 const SdfLayerHandle& sublayer,
404 _SublayerChangeType sublayerChange,
405 std::string* debugSummary,
410 void _DidAddOrRemoveSublayer(
const PcpCache* cache,
411 const PcpLayerStackPtrVector& layerStacks,
412 const SdfLayerHandle& layer,
413 const std::string& sublayerPath,
414 _SublayerChangeType sublayerChange,
415 std::string* debugSummary,
416 std::vector<bool> *significant);
419 void _DidChangeLayerStack(
421 const PcpLayerStackPtr& layerStack,
422 bool requiresLayerStackChange,
423 bool requiresLayerStackOffsetsChange,
424 bool requiresSignificantChange);
430 void _DidChangeLayerStackRelocations(
432 const PcpLayerStackPtr& layerStack,
433 std::string* debugSummary);
437 void _DidChangeLayerStackResolvedPath(
439 const PcpLayerStackPtr& layerStack,
440 bool requiresLayerStackChange,
441 std::string* debugSummary);
446 void _DidChangeLayerStackExpressionVariables(
448 const PcpLayerStackPtr& layerStack,
449 std::string* debugSummary);
454 void _DidChangeSpecStackInternal(
457 void _DidChangeSpecStackAndChildrenInternal(
463 void _ProcessLayerStackAndDependencyChanges(
465 const PcpLayerStackPtrVector& layerStacks);
472 void _MarkReferencingSitesAsSignificantlyChanged(
474 const PcpLayerStackPtrVector& layerStacks);
479 _RenameChanges _renameChanges;
485 #endif // PXR_USD_PCP_CHANGES_H
PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES(SdfLayer)
PCP_API void DidMaybeFixSublayer(const PcpCache *cache, const SdfLayerHandle &layer, const std::string &assetPath)
SdfRelocatesMap newIncrementalRelocatesTargetToSource
VtDictionary newExpressionVariables
New expression variables for this layer stack.
SdfPathSet didChangePrims
SdfLayerChangeListVec layerChangeListVec
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
GLsizei const GLchar *const * path
TF_DECLARE_WEAK_AND_REF_PTRS(PcpLayerStack)
bool didChangeExpressionVariables
Must rebuild expression variables.
PCP_API void Apply() const
Applies the changes to the layer stacks and caches.
PCP_API const CacheChanges & GetCacheChanges() const
Returns a map of all of the cache changes.
SdfPathVector newRelocatesPrimPaths
PCP_API void DidChangeAssetResolver(const PcpCache *cache)
GLenum GLuint GLint GLint layer
PCP_API const LayerStackChanges & GetLayerStackChanges() const
PCP_API void DidChangeSignificantly(const PcpCache *cache, const SdfPath &path)
SdfPathSet pathsAffectedByRelocationChanges
Paths that are affected by the above relocation changes.
std::vector< class SdfPath > SdfPathVector
PCP_API const PcpLifeboat & GetLifeboat() const
std::map< SdfPath, int, SdfPath::FastLessThan > didChangeTargets
Must rebuild the connections/targets at each path.
PCP_API void DidDestroyCache(const PcpCache *cache)
Remove any changes for cache.
PcpErrorVector newRelocatesErrors
void Swap(PcpLifeboat &other)
Swap the contents of this and other.
SdfRelocatesMap newIncrementalRelocatesSourceToTarget
bool didChangeLayers
Must rebuild the layer tree. Implies didChangeLayerOffsets.
std::map< PcpLayerStackPtr, PcpLayerStackChanges > LayerStackChanges
PCP_API void Swap(PcpChanges &other)
Swap the contents of this and other.
PCP_API void DidChangeSpecs(const PcpCache *cache, const SdfPath &path, const SdfLayerHandle &changedLayer, const SdfPath &changedPath, ChangeSpecsType changeType)
PCP_API void DidChangePaths(const PcpCache *cache, const SdfPath &oldPath, const SdfPath &newPath)
std::vector< PcpErrorBasePtr > PcpErrorVector
bool didMaybeChangeLayers
Layers used in the composition may have changed.
std::set< class SdfPath > SdfPathSet
A set of SdfPaths.
std::map< PcpCache *, PcpCacheChanges > CacheChanges
SdfPathSet didChangeSpecs
Must rebuild the prim/property stacks at each path.
bool didChangeRelocates
Must rebuild the relocation tables.
std::vector< std::pair< SdfLayerHandle, SdfChangeList > > SdfLayerChangeListVec
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
SdfPathSet didChangeSignificantly
PCP_API bool IsEmpty() const
Returns true iff there are no changes.
SdfRelocatesMap newRelocatesTargetToSource
PCP_API void DidChangeTargets(const PcpCache *cache, const SdfPath &path, PcpCacheChanges::TargetType targetType)
PCP_API void _DidUnmuteLayer(const PcpCache *cache, const std::string &layerId)
The layer identified by layerId was unmuted in cache.
#define PXR_NAMESPACE_CLOSE_SCOPE
bool didChangeSignificantly
PCP_API void DidMaybeFixAsset(const PcpCache *cache, const PcpSite &site, const SdfLayerHandle &srcLayer, const std::string &assetPath)
SdfRelocatesMap newRelocatesSourceToTarget
PCP_API void _DidMuteLayer(const PcpCache *cache, const std::string &layerId)
The layer identified by layerId was muted in cache.
const std::set< PcpLayerStackRefPtr > & GetLayerStacks() const
void Retain(const SdfLayerRefPtr &layer)
Ensure that layer exists until this object is destroyed.
PCP_API void DidChangeSpecStack(const PcpCache *cache, const SdfPath &path)
bool didMuteOrUnmuteNonEmptyLayer
Will be true if a muting operation took place on a non empty layer.
PCP_API void DidChange(const PcpCache *cache, const SdfLayerChangeListVec &changes)
void DidMuteAndUnmuteLayers(const PcpCache *cache, const std::vector< std::string > &layersToMute, const std::vector< std::string > &layersToUnmute)
bool didChangeLayerOffsets
Must rebuild the layer offsets.
std::unordered_set< SdfLayerHandle, TfHash > layersAffectedByMutingOrRemoval
std::vector< std::pair< SdfPath, SdfPath > > didChangePath
bool didAddOrRemoveNonEmptySublayer
Will be true if a non empty sublayer was added or removed.