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_InvalidAuthoredRelocation,
67 PcpErrorType_InvalidConflictingRelocation,
68 PcpErrorType_InvalidSameTargetRelocations,
69 PcpErrorType_OpinionAtRelocationSource,
70 PcpErrorType_PrimPermissionDenied,
71 PcpErrorType_PropertyPermissionDenied,
72 PcpErrorType_SublayerCycle,
73 PcpErrorType_TargetPermissionDenied,
74 PcpErrorType_UnresolvedPrimPath,
75 PcpErrorType_VariableExpressionError
80typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
81typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
112typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
121 static PcpErrorArcCyclePtr
New();
138typedef std::shared_ptr<PcpErrorArcPermissionDenied>
139 PcpErrorArcPermissionDeniedPtr;
149 static PcpErrorArcPermissionDeniedPtr
New();
171typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
193class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
196 PCP_API ~PcpErrorInconsistentPropertyBase()
override;
199 std::string definingLayerIdentifier;
204 std::string conflictingLayerIdentifier;
210 PcpErrorInconsistentPropertyBase(PcpErrorType
errorType);
217typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
218 PcpErrorInconsistentPropertyTypePtr;
225 public PcpErrorInconsistentPropertyBase {
228 static PcpErrorInconsistentPropertyTypePtr
New();
248typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
249 PcpErrorInconsistentAttributeTypePtr;
256 public PcpErrorInconsistentPropertyBase {
259 static PcpErrorInconsistentAttributeTypePtr
New();
279typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
280 PcpErrorInconsistentAttributeVariabilityPtr;
287 public PcpErrorInconsistentPropertyBase {
290 static PcpErrorInconsistentAttributeVariabilityPtr
New();
310typedef std::shared_ptr<PcpErrorInvalidPrimPath>
311 PcpErrorInvalidPrimPathPtr;
320 static PcpErrorInvalidPrimPathPtr
New();
346class PcpErrorInvalidAssetPathBase;
347typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
348 PcpErrorInvalidAssetPathBasePtr;
350class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
353 PCP_API ~PcpErrorInvalidAssetPathBase()
override;
362 std::string assetPath;
365 std::string resolvedAssetPath;
369 SdfLayerHandle sourceLayer;
374 std::string messages;
378 PcpErrorInvalidAssetPathBase(PcpErrorType
errorType);
385typedef std::shared_ptr<PcpErrorInvalidAssetPath>
386 PcpErrorInvalidAssetPathPtr;
395 static PcpErrorInvalidAssetPathPtr
New();
410typedef std::shared_ptr<PcpErrorMutedAssetPath>
411 PcpErrorMutedAssetPathPtr;
420 static PcpErrorMutedAssetPathPtr
New();
435typedef std::shared_ptr<PcpErrorTargetPathBase>
436 PcpErrorTargetPathBasePtr;
470typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
471 PcpErrorInvalidInstanceTargetPathPtr;
481 static PcpErrorInvalidInstanceTargetPathPtr
New();
496typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
497 PcpErrorInvalidExternalTargetPathPtr;
507 static PcpErrorInvalidExternalTargetPathPtr
New();
525typedef std::shared_ptr<PcpErrorInvalidTargetPath>
526 PcpErrorInvalidTargetPathPtr;
535 static PcpErrorInvalidTargetPathPtr
New();
550typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
551 PcpErrorInvalidSublayerOffsetPtr;
560 static PcpErrorInvalidSublayerOffsetPtr
New();
566 SdfLayerHandle layer;
567 SdfLayerHandle sublayer;
579typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
580 PcpErrorInvalidReferenceOffsetPtr;
589 static PcpErrorInvalidReferenceOffsetPtr
New();
621typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
622 PcpErrorInvalidSublayerOwnershipPtr;
631 static PcpErrorInvalidSublayerOwnershipPtr
New();
638 SdfLayerHandle layer;
639 SdfLayerHandleVector sublayers;
650typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
651 PcpErrorInvalidSublayerPathPtr;
660 static PcpErrorInvalidSublayerPathPtr
New();
666 SdfLayerHandle layer;
667 std::string sublayerPath;
668 std::string messages;
679typedef std::shared_ptr<PcpErrorRelocationBase>
680 PcpErrorRelocationBasePtr;
699typedef std::shared_ptr<PcpErrorInvalidAuthoredRelocation>
700 PcpErrorInvalidAuthoredRelocationPtr;
709 static PcpErrorInvalidAuthoredRelocationPtr
New();
735typedef std::shared_ptr<PcpErrorInvalidConflictingRelocation>
736 PcpErrorInvalidConflictingRelocationPtr;
745 static PcpErrorInvalidConflictingRelocationPtr
New();
772 TargetIsConflictSource,
773 SourceIsConflictTarget,
774 TargetIsConflictSourceDescendant,
775 SourceIsConflictSourceDescendant
789typedef std::shared_ptr<PcpErrorInvalidSameTargetRelocations>
790 PcpErrorInvalidSameTargetRelocationsPtr;
799 static PcpErrorInvalidSameTargetRelocationsPtr
New();
829typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
830 PcpErrorOpinionAtRelocationSourcePtr;
839 static PcpErrorOpinionAtRelocationSourcePtr
New();
845 SdfLayerHandle layer;
857typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
858 PcpErrorPrimPermissionDeniedPtr;
867 static PcpErrorPrimPermissionDeniedPtr
New();
887typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
888 PcpErrorPropertyPermissionDeniedPtr;
897 static PcpErrorPropertyPermissionDeniedPtr
New();
905 std::string layerPath;
916typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
925 static PcpErrorSublayerCyclePtr
New();
931 SdfLayerHandle layer;
932 SdfLayerHandle sublayer;
943typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
944 PcpErrorTargetPermissionDeniedPtr;
953 static PcpErrorTargetPermissionDeniedPtr
New();
968typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
969 PcpErrorUnresolvedPrimPathPtr;
978 static PcpErrorUnresolvedPrimPathPtr
New();
1008typedef std::shared_ptr<PcpErrorVariableExpressionError>
1009 PcpErrorVariableExpressionErrorPtr;
1017 static PcpErrorVariableExpressionErrorPtr New();
1049void PcpRaiseErrors(
const PcpErrorVector &errors);
1051PXR_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 authored relocation found in a relocates field.
SdfPath owningPath
The path to the prim where the relocates is authored.
SdfLayerHandle layer
The layer containing the authored relocates.
PCP_API ~PcpErrorInvalidAuthoredRelocation() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
std::string messages
Additional messages about the error.
SdfPath sourcePath
The source path of the invalid relocation.
static PcpErrorInvalidAuthoredRelocationPtr New()
Returns a new error object.
SdfPath targetPath
The target path of the invalid relocation.
Relocation conflicts with another relocation in the layer stack.
SdfPath conflictOwningPath
The path to the prim where the relocation this conflicts with is authored.
SdfPath owningPath
The path to the prim where the relocates is authored.
static PcpErrorInvalidConflictingRelocationPtr New()
Returns a new error object.
ConflictReason
Enumeration of reasons a relocate can be in conflict with another relocate.
SdfPath conflictSourcePath
The source path of the relocation this conflicts with.
SdfLayerHandle layer
The layer containing the authored relocates.
ConflictReason conflictReason
The reason the relocate is a conflict.
SdfLayerHandle conflictLayer
The layer containing the authored relocation this conflicts with.
PCP_API std::string ToString() const override
Converts error to string message.
SdfPath conflictTargetPath
The target path of the relocation this conflicts with.
SdfPath sourcePath
The source path of the invalid relocation.
SdfPath targetPath
The target path of the invalid relocation.
PCP_API ~PcpErrorInvalidConflictingRelocation() override
Destructor.
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.
Multiple relocations in the layer stack have the same target.
std::vector< RelocationSource > sources
The sources of all relocates that relocate to the target path.
PCP_API ~PcpErrorInvalidSameTargetRelocations() override
Destructor.
SdfPath owningPath
The path to the prim where the relocates is authored.
SdfLayerHandle layer
The layer containing the authored relocates.
PCP_API std::string ToString() const override
Converts error to string message.
SdfPath sourcePath
The source path of the invalid relocation.
SdfPath targetPath
The target path of the multiple invalid relocations.
static PcpErrorInvalidSameTargetRelocationsPtr New()
Returns a new error object.
Info about each relocate source that has the same target path.
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.
Base class for composition errors related to relocates.
PCP_API ~PcpErrorRelocationBase() override
Destructor.
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.