7#ifndef PXR_USD_PCP_ERRORS_H
8#define PXR_USD_PCP_ERRORS_H
11#include "pxr/usd/pcp/api.h"
12#include "pxr/usd/pcp/site.h"
16#include "pxr/usd/sdf/path.h"
22PXR_NAMESPACE_OPEN_SCOPE
29 PcpErrorType_ArcCycle,
30 PcpErrorType_ArcPermissionDenied,
31 PcpErrorType_ArcToProhibitedChild,
32 PcpErrorType_IndexCapacityExceeded,
33 PcpErrorType_ArcCapacityExceeded,
34 PcpErrorType_ArcNamespaceDepthCapacityExceeded,
35 PcpErrorType_InconsistentPropertyType,
36 PcpErrorType_InconsistentAttributeType,
37 PcpErrorType_InconsistentAttributeVariability,
38 PcpErrorType_InternalAssetPath,
39 PcpErrorType_InvalidPrimPath,
40 PcpErrorType_InvalidAssetPath,
41 PcpErrorType_InvalidInstanceTargetPath,
42 PcpErrorType_InvalidExternalTargetPath,
43 PcpErrorType_InvalidTargetPath,
44 PcpErrorType_InvalidReferenceOffset,
45 PcpErrorType_InvalidSublayerOffset,
46 PcpErrorType_InvalidSublayerOwnership,
47 PcpErrorType_InvalidSublayerPath,
48 PcpErrorType_InvalidVariantSelection,
49 PcpErrorType_MutedAssetPath,
50 PcpErrorType_InvalidAuthoredRelocation,
51 PcpErrorType_InvalidConflictingRelocation,
52 PcpErrorType_InvalidSameTargetRelocations,
53 PcpErrorType_OpinionAtRelocationSource,
54 PcpErrorType_PrimPermissionDenied,
55 PcpErrorType_PropertyPermissionDenied,
56 PcpErrorType_SublayerCycle,
57 PcpErrorType_TargetPermissionDenied,
58 PcpErrorType_UnresolvedPrimPath,
59 PcpErrorType_VariableExpressionError
64typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
65typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
96typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
105 static PcpErrorArcCyclePtr
New();
122typedef std::shared_ptr<PcpErrorArcPermissionDenied>
123 PcpErrorArcPermissionDeniedPtr;
133 static PcpErrorArcPermissionDeniedPtr
New();
155typedef std::shared_ptr<PcpErrorArcToProhibitedChild>
156 PcpErrorArcToProhibitedChildPtr;
166 static PcpErrorArcToProhibitedChildPtr
New();
191typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
213class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
216 PCP_API ~PcpErrorInconsistentPropertyBase()
override;
219 std::string definingLayerIdentifier;
224 std::string conflictingLayerIdentifier;
230 PcpErrorInconsistentPropertyBase(PcpErrorType
errorType);
237typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
238 PcpErrorInconsistentPropertyTypePtr;
245 public PcpErrorInconsistentPropertyBase {
248 static PcpErrorInconsistentPropertyTypePtr
New();
268typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
269 PcpErrorInconsistentAttributeTypePtr;
276 public PcpErrorInconsistentPropertyBase {
279 static PcpErrorInconsistentAttributeTypePtr
New();
299typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
300 PcpErrorInconsistentAttributeVariabilityPtr;
307 public PcpErrorInconsistentPropertyBase {
310 static PcpErrorInconsistentAttributeVariabilityPtr
New();
330typedef std::shared_ptr<PcpErrorInvalidPrimPath>
331 PcpErrorInvalidPrimPathPtr;
340 static PcpErrorInvalidPrimPathPtr
New();
366class PcpErrorInvalidAssetPathBase;
367typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
368 PcpErrorInvalidAssetPathBasePtr;
370class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
373 PCP_API ~PcpErrorInvalidAssetPathBase()
override;
382 std::string assetPath;
385 std::string resolvedAssetPath;
389 SdfLayerHandle sourceLayer;
394 std::string messages;
398 PcpErrorInvalidAssetPathBase(PcpErrorType
errorType);
405typedef std::shared_ptr<PcpErrorInvalidAssetPath>
406 PcpErrorInvalidAssetPathPtr;
415 static PcpErrorInvalidAssetPathPtr
New();
430typedef std::shared_ptr<PcpErrorMutedAssetPath>
431 PcpErrorMutedAssetPathPtr;
440 static PcpErrorMutedAssetPathPtr
New();
455typedef std::shared_ptr<PcpErrorTargetPathBase>
456 PcpErrorTargetPathBasePtr;
490typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
491 PcpErrorInvalidInstanceTargetPathPtr;
501 static PcpErrorInvalidInstanceTargetPathPtr
New();
516typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
517 PcpErrorInvalidExternalTargetPathPtr;
527 static PcpErrorInvalidExternalTargetPathPtr
New();
545typedef std::shared_ptr<PcpErrorInvalidTargetPath>
546 PcpErrorInvalidTargetPathPtr;
555 static PcpErrorInvalidTargetPathPtr
New();
570typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
571 PcpErrorInvalidSublayerOffsetPtr;
580 static PcpErrorInvalidSublayerOffsetPtr
New();
586 SdfLayerHandle layer;
587 SdfLayerHandle sublayer;
599typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
600 PcpErrorInvalidReferenceOffsetPtr;
609 static PcpErrorInvalidReferenceOffsetPtr
New();
641typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
642 PcpErrorInvalidSublayerOwnershipPtr;
651 static PcpErrorInvalidSublayerOwnershipPtr
New();
658 SdfLayerHandle layer;
659 SdfLayerHandleVector sublayers;
670typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
671 PcpErrorInvalidSublayerPathPtr;
680 static PcpErrorInvalidSublayerPathPtr
New();
686 SdfLayerHandle layer;
687 std::string sublayerPath;
688 std::string messages;
699typedef std::shared_ptr<PcpErrorRelocationBase>
700 PcpErrorRelocationBasePtr;
719typedef std::shared_ptr<PcpErrorInvalidAuthoredRelocation>
720 PcpErrorInvalidAuthoredRelocationPtr;
729 static PcpErrorInvalidAuthoredRelocationPtr
New();
755typedef std::shared_ptr<PcpErrorInvalidConflictingRelocation>
756 PcpErrorInvalidConflictingRelocationPtr;
765 static PcpErrorInvalidConflictingRelocationPtr
New();
792 TargetIsConflictSource,
793 SourceIsConflictTarget,
794 TargetIsConflictSourceDescendant,
795 SourceIsConflictSourceDescendant
809typedef std::shared_ptr<PcpErrorInvalidSameTargetRelocations>
810 PcpErrorInvalidSameTargetRelocationsPtr;
819 static PcpErrorInvalidSameTargetRelocationsPtr
New();
849typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
850 PcpErrorOpinionAtRelocationSourcePtr;
859 static PcpErrorOpinionAtRelocationSourcePtr
New();
865 SdfLayerHandle layer;
877typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
878 PcpErrorPrimPermissionDeniedPtr;
887 static PcpErrorPrimPermissionDeniedPtr
New();
907typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
908 PcpErrorPropertyPermissionDeniedPtr;
917 static PcpErrorPropertyPermissionDeniedPtr
New();
925 std::string layerPath;
936typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
945 static PcpErrorSublayerCyclePtr
New();
951 SdfLayerHandle layer;
952 SdfLayerHandle sublayer;
963typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
964 PcpErrorTargetPermissionDeniedPtr;
973 static PcpErrorTargetPermissionDeniedPtr
New();
988typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
989 PcpErrorUnresolvedPrimPathPtr;
998 static PcpErrorUnresolvedPrimPathPtr
New();
1028typedef std::shared_ptr<PcpErrorVariableExpressionError>
1029 PcpErrorVariableExpressionErrorPtr;
1037 static PcpErrorVariableExpressionErrorPtr New();
1069void PcpRaiseErrors(
const PcpErrorVector &errors);
1071PXR_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.
Arcs that were not made between PcpNodes because the target is a prohibited child prim of its parent ...
PcpSite targetSite
The target site of the invalid arc which is a prohibited child.
PcpSite site
The site where the invalid arc was expressed.
PCP_API ~PcpErrorArcToProhibitedChild() override
Destructor.
static PcpErrorArcToProhibitedChildPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
PcpArcType arcType
The type of arc.
PcpSite relocationSourceSite
The site of the node under targetSite that is a relocation source in its layer stack.
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.