24#ifndef PXR_USD_PCP_ERRORS_H
25#define PXR_USD_PCP_ERRORS_H
28#include "pxr/usd/pcp/api.h"
29#include "pxr/usd/pcp/site.h"
33#include "pxr/usd/sdf/path.h"
39PXR_NAMESPACE_OPEN_SCOPE
46 PcpErrorType_ArcCycle,
47 PcpErrorType_ArcPermissionDenied,
48 PcpErrorType_IndexCapacityExceeded,
49 PcpErrorType_ArcCapacityExceeded,
50 PcpErrorType_ArcNamespaceDepthCapacityExceeded,
51 PcpErrorType_InconsistentPropertyType,
52 PcpErrorType_InconsistentAttributeType,
53 PcpErrorType_InconsistentAttributeVariability,
54 PcpErrorType_InternalAssetPath,
55 PcpErrorType_InvalidPrimPath,
56 PcpErrorType_InvalidAssetPath,
57 PcpErrorType_InvalidInstanceTargetPath,
58 PcpErrorType_InvalidExternalTargetPath,
59 PcpErrorType_InvalidTargetPath,
60 PcpErrorType_InvalidReferenceOffset,
61 PcpErrorType_InvalidSublayerOffset,
62 PcpErrorType_InvalidSublayerOwnership,
63 PcpErrorType_InvalidSublayerPath,
64 PcpErrorType_InvalidVariantSelection,
65 PcpErrorType_MutedAssetPath,
66 PcpErrorType_OpinionAtRelocationSource,
67 PcpErrorType_PrimPermissionDenied,
68 PcpErrorType_PropertyPermissionDenied,
69 PcpErrorType_SublayerCycle,
70 PcpErrorType_TargetPermissionDenied,
71 PcpErrorType_UnresolvedPrimPath,
72 PcpErrorType_VariableExpressionError
77typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
78typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
109typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
118 static PcpErrorArcCyclePtr
New();
135typedef std::shared_ptr<PcpErrorArcPermissionDenied>
136 PcpErrorArcPermissionDeniedPtr;
146 static PcpErrorArcPermissionDeniedPtr
New();
168typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
190class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
193 PCP_API ~PcpErrorInconsistentPropertyBase()
override;
196 std::string definingLayerIdentifier;
201 std::string conflictingLayerIdentifier;
207 PcpErrorInconsistentPropertyBase(PcpErrorType
errorType);
214typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
215 PcpErrorInconsistentPropertyTypePtr;
222 public PcpErrorInconsistentPropertyBase {
225 static PcpErrorInconsistentPropertyTypePtr
New();
245typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
246 PcpErrorInconsistentAttributeTypePtr;
253 public PcpErrorInconsistentPropertyBase {
256 static PcpErrorInconsistentAttributeTypePtr
New();
276typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
277 PcpErrorInconsistentAttributeVariabilityPtr;
284 public PcpErrorInconsistentPropertyBase {
287 static PcpErrorInconsistentAttributeVariabilityPtr
New();
307typedef std::shared_ptr<PcpErrorInvalidPrimPath>
308 PcpErrorInvalidPrimPathPtr;
317 static PcpErrorInvalidPrimPathPtr
New();
343class PcpErrorInvalidAssetPathBase;
344typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
345 PcpErrorInvalidAssetPathBasePtr;
347class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
350 PCP_API ~PcpErrorInvalidAssetPathBase()
override;
359 std::string assetPath;
362 std::string resolvedAssetPath;
366 SdfLayerHandle sourceLayer;
371 std::string messages;
375 PcpErrorInvalidAssetPathBase(PcpErrorType
errorType);
382typedef std::shared_ptr<PcpErrorInvalidAssetPath>
383 PcpErrorInvalidAssetPathPtr;
392 static PcpErrorInvalidAssetPathPtr
New();
407typedef std::shared_ptr<PcpErrorMutedAssetPath>
408 PcpErrorMutedAssetPathPtr;
417 static PcpErrorMutedAssetPathPtr
New();
432typedef std::shared_ptr<PcpErrorTargetPathBase>
433 PcpErrorTargetPathBasePtr;
467typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
468 PcpErrorInvalidInstanceTargetPathPtr;
478 static PcpErrorInvalidInstanceTargetPathPtr
New();
493typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
494 PcpErrorInvalidExternalTargetPathPtr;
504 static PcpErrorInvalidExternalTargetPathPtr
New();
522typedef std::shared_ptr<PcpErrorInvalidTargetPath>
523 PcpErrorInvalidTargetPathPtr;
532 static PcpErrorInvalidTargetPathPtr
New();
547typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
548 PcpErrorInvalidSublayerOffsetPtr;
557 static PcpErrorInvalidSublayerOffsetPtr
New();
563 SdfLayerHandle layer;
564 SdfLayerHandle sublayer;
576typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
577 PcpErrorInvalidReferenceOffsetPtr;
586 static PcpErrorInvalidReferenceOffsetPtr
New();
618typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
619 PcpErrorInvalidSublayerOwnershipPtr;
628 static PcpErrorInvalidSublayerOwnershipPtr
New();
635 SdfLayerHandle layer;
636 SdfLayerHandleVector sublayers;
647typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
648 PcpErrorInvalidSublayerPathPtr;
657 static PcpErrorInvalidSublayerPathPtr
New();
663 SdfLayerHandle layer;
664 std::string sublayerPath;
665 std::string messages;
676typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
677 PcpErrorOpinionAtRelocationSourcePtr;
686 static PcpErrorOpinionAtRelocationSourcePtr
New();
692 SdfLayerHandle layer;
704typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
705 PcpErrorPrimPermissionDeniedPtr;
714 static PcpErrorPrimPermissionDeniedPtr
New();
734typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
735 PcpErrorPropertyPermissionDeniedPtr;
744 static PcpErrorPropertyPermissionDeniedPtr
New();
752 std::string layerPath;
763typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
772 static PcpErrorSublayerCyclePtr
New();
778 SdfLayerHandle layer;
779 SdfLayerHandle sublayer;
790typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
791 PcpErrorTargetPermissionDeniedPtr;
800 static PcpErrorTargetPermissionDeniedPtr
New();
815typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
816 PcpErrorUnresolvedPrimPathPtr;
825 static PcpErrorUnresolvedPrimPathPtr
New();
855typedef std::shared_ptr<PcpErrorVariableExpressionError>
856 PcpErrorVariableExpressionErrorPtr;
864 static PcpErrorVariableExpressionErrorPtr New();
896void PcpRaiseErrors(
const PcpErrorVector &errors);
898PXR_NAMESPACE_CLOSE_SCOPE
Arcs between PcpNodes that form a cycle.
static PcpErrorArcCyclePtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorArcCycle() override
Destructor.
Arcs that were not made between PcpNodes because of permission restrictions.
PcpSite site
The site where the invalid arc was expressed.
PcpSite privateSite
The private, invalid target of the arc.
static PcpErrorArcPermissionDeniedPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorArcPermissionDenied() override
Destructor.
PcpArcType arcType
The type of arc.
Base class for all error types.
virtual PCP_API ~PcpErrorBase()
Destructor.
virtual std::string ToString() const =0
Converts error to string message.
PcpSite rootSite
The site of the composed prim or property being computed when the error was encountered.
PcpErrorBase(PcpErrorType errorType)
Constructor.
const PcpErrorType errorType
The error code.
Exceeded the capacity for composition arcs at a single site.
static PcpErrorCapacityExceededPtr New(PcpErrorType errorType)
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorCapacityExceeded() override
Destructor.
Attributes that have specs with conflicting definitions.
TfToken definingValueType
The value type from the defining spec.
TfToken conflictingValueType
The value type from the conflicting spec.
PCP_API ~PcpErrorInconsistentAttributeType() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInconsistentAttributeTypePtr New()
Returns a new error object.
Attributes that have specs with conflicting variability.
SdfVariability definingVariability
The variability of the defining spec.
PCP_API ~PcpErrorInconsistentAttributeVariability() override
Destructor.
static PcpErrorInconsistentAttributeVariabilityPtr New()
Returns a new error object.
SdfVariability conflictingVariability
The variability of the conflicting spec.
PCP_API std::string ToString() const override
Converts error to string message.
Properties that have specs with conflicting definitions.
static PcpErrorInconsistentPropertyTypePtr New()
Returns a new error object.
SdfSpecType definingSpecType
The type of the defining spec.
SdfSpecType conflictingSpecType
The type of the conflicting spec.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorInconsistentPropertyType() override
Destructor.
Invalid asset paths used by references or payloads.
PCP_API ~PcpErrorInvalidAssetPath() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidAssetPathPtr New()
Returns a new error object.
Invalid target or connection path in some scope that points to an object outside of that scope.
PCP_API ~PcpErrorInvalidExternalTargetPath() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidExternalTargetPathPtr New()
Returns a new error object.
Invalid target or connection path authored in an inherited class that points to an instance of that c...
static PcpErrorInvalidInstanceTargetPathPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorInvalidInstanceTargetPath() override
Destructor.
Invalid prim paths used by references or payloads.
SdfPath primPath
The target prim path of the arc that is invalid.
static PcpErrorInvalidPrimPathPtr New()
Returns a new error object.
PcpSite site
The site where the invalid arc was expressed.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
PCP_API ~PcpErrorInvalidPrimPath() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
References or payloads that use invalid layer offsets.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
SdfLayerOffset offset
The invalid layer offset expressed on the arc.
static PcpErrorInvalidReferenceOffsetPtr New()
Returns a new error object.
std::string assetPath
Target asset path of the arc.
PCP_API std::string ToString() const override
Converts error to string message.
SdfPath sourcePath
The source path of the spec that caused this arc to be introduced.
SdfPath targetPath
Target prim path of the arc.
PCP_API ~PcpErrorInvalidReferenceOffset() override
Destructor.
Sublayers that use invalid layer offsets.
PCP_API ~PcpErrorInvalidSublayerOffset() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidSublayerOffsetPtr New()
Returns a new error object.
Sibling layers that have the same owner.
PCP_API ~PcpErrorInvalidSublayerOwnership() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidSublayerOwnershipPtr New()
Returns a new error object.
Asset paths that could not be both resolved and loaded.
PCP_API ~PcpErrorInvalidSublayerPath() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidSublayerPathPtr New()
Returns a new error object.
Invalid target or connection path.
PCP_API ~PcpErrorInvalidTargetPath() override
Destructor.
static PcpErrorInvalidTargetPathPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
Muted asset paths used by references or payloads.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorMutedAssetPath() override
Destructor.
static PcpErrorMutedAssetPathPtr New()
Returns a new error object.
Opinions were found at a relocation source path.
PCP_API ~PcpErrorOpinionAtRelocationSource() override
Destructor.
static PcpErrorOpinionAtRelocationSourcePtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
Layers with illegal opinions about private prims.
PcpSite site
The site where the invalid arc was expressed.
PCP_API ~PcpErrorPrimPermissionDenied() override
Destructor.
PcpSite privateSite
The private, invalid target of the arc.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorPrimPermissionDeniedPtr New()
Returns a new error object.
Layers with illegal opinions about private properties.
static PcpErrorPropertyPermissionDeniedPtr New()
Returns a new error object.
PCP_API ~PcpErrorPropertyPermissionDenied() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
Layers that recursively sublayer themselves.
PCP_API ~PcpErrorSublayerCycle() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorSublayerCyclePtr New()
Returns a new error object.
Base class for composition errors related to target or connection paths.
SdfPath owningPath
The path to the property where the target was authored.
SdfLayerHandle layer
The layer containing the property where the target was authored.
PCP_API ~PcpErrorTargetPathBase() override
Destructor.
SdfPath composedTargetPath
The target or connection path in the composed scene.
SdfSpecType ownerSpecType
The spec type of the property where the target was authored.
SdfPath targetPath
The invalid target or connection path that was authored.
Paths with illegal opinions about private targets.
static PcpErrorTargetPermissionDeniedPtr New()
Returns a new error object.
PCP_API ~PcpErrorTargetPermissionDenied() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
Asset paths that could not be both resolved and loaded.
PcpSite site
The site where the invalid arc was expressed.
PCP_API ~PcpErrorUnresolvedPrimPath() override
Destructor.
SdfLayerHandle targetLayer
The target layer of the arc.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorUnresolvedPrimPathPtr New()
Returns a new error object.
SdfPath unresolvedPath
The prim path that cannot be resolved on the target layer stack.
Error when evaluating a variable expression.
SdfLayerHandle sourceLayer
The source layer where the expression was authored.
std::string expression
The expression that was evaluated.
PCP_API std::string ToString() const override
Converts error to string message.
SdfPath sourcePath
The source path where the expression was authored.
std::string expressionError
The error generated during evaluation.
std::string context
The context where the expression was authored, e.g.
A site specifies a path in a layer stack of scene description.
Represents a time offset and scale between layers.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
SdfSpecType
An enum that specifies the type of an object.
SdfVariability
An enum that identifies variability types for attributes.