24 #ifndef PXR_USD_PCP_LAYER_STACK_H
25 #define PXR_USD_PCP_LAYER_STACK_H
37 #include <tbb/spin_mutex.h>
41 #include <unordered_set>
51 class Pcp_LayerStackRegistry;
52 class Pcp_MutedLayers;
130 {
return *_expressionVariables; }
135 const std::unordered_set<std::string>&
137 {
return _expressionVariableDependencies; }
230 void _BlowRelocations();
232 const Pcp_MutedLayers &mutedLayers);
235 const SdfLayerHandle &
layer,
241 const Pcp_MutedLayers & mutedLayers,
252 Pcp_LayerStackRegistryPtr _registry;
270 std::vector<PcpMapFunction> _mapFunctions;
274 double _timeCodesPerSecond;
281 struct _SublayerSourceInfo {
282 _SublayerSourceInfo() =
default;
284 const SdfLayerHandle& layer_,
288 , authoredSublayerPath(authoredSublayerPath_)
289 , computedSublayerPath(computedSublayerPath_) { }
291 SdfLayerHandle
layer;
297 std::vector<_SublayerSourceInfo> _sublayerSourceInfo;
300 std::set<std::string> _mutedAssetPaths;
304 std::unique_ptr<PcpErrorVector> _localErrors;
318 _RelocatesVarMap _relocatesVariables;
319 tbb::spin_mutex _relocatesVariablesMutex;
325 std::shared_ptr<PcpExpressionVariables> _expressionVariables;
328 std::unordered_set<std::string> _expressionVariableDependencies;
334 std::ostream&
operator<<(std::ostream&,
const PcpLayerStackPtr&);
336 std::ostream&
operator<<(std::ostream&,
const PcpLayerStackRefPtr&);
363 const PcpLayerStackPtr& layerStack,
const SdfLayerHandle &changedLayer);
375 #endif // PXR_USD_PCP_LAYER_STACK_H
virtual PCP_API ~PcpLayerStack()
PCP_API const SdfRelocatesMap & GetRelocatesTargetToSource() const
PCP_API const SdfLayerOffset * GetLayerOffsetForLayer(const SdfLayerHandle &) const
PCP_API std::ostream & operator<<(std::ostream &, const PcpLayerStackPtr &)
PCP_API const PcpLayerStackIdentifier & GetIdentifier() const
Returns the identifier for this layer stack.
friend bool Pcp_NeedToRecomputeDueToAssetPathChange(const PcpLayerStackPtr &)
std::map< SdfPath, SdfPath > SdfRelocatesMap
A map of source SdfPaths to target SdfPaths for relocation.
PCP_API SdfLayerHandleVector GetSessionLayers() const
PCP_API const SdfRelocatesMap & GetIncrementalRelocatesSourceToTarget() const
GLsizei const GLchar *const * string
GLsizei const GLchar *const * path
std::map< std::string, std::string > FileFormatArguments
void Pcp_ComputeRelocationsForLayerStack(const SdfLayerRefPtrVector &layers, SdfRelocatesMap *relocatesSourceToTarget, SdfRelocatesMap *relocatesTargetToSource, SdfRelocatesMap *incrementalRelocatesSourceToTarget, SdfRelocatesMap *incrementalRelocatesTargetToSource, SdfPathVector *relocatesPrimPaths)
PCP_API const SdfRelocatesMap & GetRelocatesSourceToTarget() const
std::set< SdfHandleTo< SdfLayer >::Handle > SdfLayerHandleSet
PCP_API void Apply(const PcpLayerStackChanges &changes, PcpLifeboat *lifeboat)
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(SdfLayer)
friend class Pcp_LayerStackRegistry
TF_DECLARE_WEAK_AND_REF_PTRS(PcpLayerStack)
GLenum GLuint GLint GLint layer
PCP_API const SdfRelocatesMap & GetIncrementalRelocatesTargetToSource() const
std::vector< TfRefPtr< SdfLayer > > SdfLayerRefPtrVector
double GetTimeCodesPerSecond() const
PCP_API const SdfPathVector & GetPathsToPrimsWithRelocates() const
PcpErrorVector GetLocalErrors() const
Return the list of errors local to this layer stack.
bool Pcp_NeedToRecomputeDueToAssetPathChange(const PcpLayerStackPtr &layerStack)
std::unique_ptr< Variable > VariableUniquePtr
Variables are held by reference.
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
const std::unordered_set< std::string > & GetExpressionVariableDependencies() const
std::vector< PcpErrorBasePtr > PcpErrorVector
PCP_API bool PcpIsTimeScalingForLayerTimeCodesPerSecondDisabled()
PCP_API bool HasLayer(const SdfLayerHandle &layer) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
PCP_API const SdfLayerRefPtrVector & GetLayers() const
#define PXR_NAMESPACE_CLOSE_SCOPE
const PcpExpressionVariables & GetExpressionVariables() const
Return the composed expression variables for this layer stack.
PCP_API const std::set< std::string > & GetMutedLayers() const
PCP_API PcpMapExpression GetExpressionForRelocatesAtPath(const SdfPath &path)
bool Pcp_NeedToRecomputeLayerStackTimeCodesPerSecond(const PcpLayerStackPtr &layerStack, const SdfLayerHandle &changedLayer)
PCP_API const SdfLayerTreeHandle & GetLayerTree() const