7 #ifndef PXR_USD_PCP_CHANGES_H
8 #define PXR_USD_PCP_CHANGES_H
25 #include <unordered_set>
84 , _didChangeExpressionVariablesSource(false)
92 bool _didChangeExpressionVariablesSource;
145 using _ProcessedLayerSublayerPathPairsKey =
146 std::pair<SdfLayerHandle, std::string>;
148 using _LayerToLayerStacks =
149 std::unordered_map<SdfLayerHandle, PcpLayerStackPtrVector, TfHash>;
154 void _SetLayerStacksUsingLayerOverride(
155 const SdfLayerHandle&
layer,
156 const PcpLayerStackPtrVector& layerStacks);
159 const PcpLayerStackPtrVector&
160 _GetLayerStacksUsingLayerOverride(
const SdfLayerHandle&
layer)
const;
165 std::unordered_set<_ProcessedLayerSublayerPathPairsKey, TfHash>
166 _processedLayerSublayerPathPairs;
179 SdfPathSet _didChangePrimSpecsAndChildrenInternal;
182 _LayerToLayerStacks _layerToLayerStackOverrides;
196 void Retain(
const PcpLayerStackRefPtr& layerStack);
206 std::set<SdfLayerRefPtr> _layers;
207 std::set<PcpLayerStackRefPtr> _layerStacks;
241 const SdfLayerHandle&
layer,
242 const std::string& assetPath);
249 const SdfLayerHandle& srcLayer,
250 const std::string& assetPath);
266 const std::vector<std::string>& layersToMute,
267 const std::vector<std::string>& layersToUnmute);
288 const SdfLayerHandle& changedLayer,
324 void Swap(PcpChanges& other);
360 const SdfLayerHandle& siteLayer,
365 bool filterForExistingCachesOnly)
const;
372 const PcpLayerStackPtrVector&
374 const SdfLayerHandle& layer)
const;
378 typedef std::map<SdfPath, SdfPath> _PathEditMap;
379 typedef std::map<PcpCache*, _PathEditMap> _RenameChanges;
388 _PathEditMap& _GetRenameChanges(
const PcpCache* cache);
392 void _Optimize()
const;
402 const _PathEditMap* pathChanges);
405 enum _SublayerChangeType {
413 const SdfLayerHandle& layer,
414 const std::string& sublayerPath,
415 _SublayerChangeType changeType)
const;
420 const std::string& sublayerPath,
421 _SublayerChangeType changeType)
const;
426 void _DidChangeSublayerAndLayerStacks(
const PcpCache* cache,
427 const PcpLayerStackPtrVector& stacks,
428 const std::string& sublayerPath,
429 const SdfLayerHandle& sublayer,
430 _SublayerChangeType sublayerChange,
431 std::string* debugSummary);
435 void _DidChangeSublayer(
const PcpCache* cache,
436 const PcpLayerStackPtrVector& layerStacks,
437 const std::string& sublayerPath,
438 const SdfLayerHandle& sublayer,
439 _SublayerChangeType sublayerChange,
440 std::string* debugSummary,
445 void _DidAddOrRemoveSublayer(
const PcpCache* cache,
446 const PcpLayerStackPtrVector& layerStacks,
447 const SdfLayerHandle& layer,
448 const std::string& sublayerPath,
449 _SublayerChangeType sublayerChange,
450 std::string* debugSummary,
451 std::vector<bool> *significant);
454 void _DidChangeLayerStack(
456 const PcpLayerStackPtr& layerStack,
457 bool requiresLayerStackChange,
458 bool requiresLayerStackOffsetsChange,
459 bool requiresSignificantChange);
465 void _DidChangeLayerStackRelocations(
467 const PcpLayerStackPtr& layerStack,
468 std::string* debugSummary);
472 void _DidChangeLayerStackResolvedPath(
474 const PcpLayerStackPtr& layerStack,
475 bool requiresLayerStackChange,
476 std::string* debugSummary);
481 void _DidChangeLayerStackExpressionVariables(
483 const PcpLayerStackPtr& layerStack,
484 std::string* debugSummary);
489 void _DidChangeSpecStackInternal(
492 void _DidChangeSpecStackAndChildrenInternal(
498 void _ProcessLayerStackAndDependencyChanges(
500 const PcpLayerStackPtrVector& layerStacks);
507 void _MarkReferencingSitesAsSignificantlyChanged(
509 const PcpLayerStackPtrVector& layerStacks);
514 _RenameChanges _renameChanges;
520 #endif // PXR_USD_PCP_CHANGES_H
PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES(SdfLayer)
std::vector< PcpDependency > PcpDependencyVector
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.
#define PXR_NAMESPACE_OPEN_SCOPE
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
PCP_API const PcpLayerStackPtrVector & FindAllLayerStacksUsingLayer(const PcpCache *cache, const SdfLayerHandle &layer) const
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 PcpDependencyVector FindSiteDependencies(const PcpCache *cache, const SdfLayerHandle &siteLayer, const SdfPath &sitePath, PcpDependencyFlags depMask, bool recurseOnSite, bool recurseOnIndex, bool filterForExistingCachesOnly) const
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
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)
PCP_API void DidChange(const PcpCache *cache, const SdfLayerChangeListVec &changes)
unsigned int PcpDependencyFlags
A typedef for a bitmask of flags from PcpDependencyType.
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