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,
60 PcpErrorType_InvalidSublayerAndOffsetCount
65typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
66typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
97typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
106 static PcpErrorArcCyclePtr
New();
123typedef std::shared_ptr<PcpErrorArcPermissionDenied>
124 PcpErrorArcPermissionDeniedPtr;
134 static PcpErrorArcPermissionDeniedPtr
New();
156typedef std::shared_ptr<PcpErrorArcToProhibitedChild>
157 PcpErrorArcToProhibitedChildPtr;
167 static PcpErrorArcToProhibitedChildPtr
New();
192typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
214class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
217 PCP_API ~PcpErrorInconsistentPropertyBase()
override;
220 std::string definingLayerIdentifier;
225 std::string conflictingLayerIdentifier;
231 PcpErrorInconsistentPropertyBase(PcpErrorType
errorType);
238typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
239 PcpErrorInconsistentPropertyTypePtr;
246 public PcpErrorInconsistentPropertyBase {
249 static PcpErrorInconsistentPropertyTypePtr
New();
269typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
270 PcpErrorInconsistentAttributeTypePtr;
277 public PcpErrorInconsistentPropertyBase {
280 static PcpErrorInconsistentAttributeTypePtr
New();
300typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
301 PcpErrorInconsistentAttributeVariabilityPtr;
308 public PcpErrorInconsistentPropertyBase {
311 static PcpErrorInconsistentAttributeVariabilityPtr
New();
331typedef std::shared_ptr<PcpErrorInvalidPrimPath>
332 PcpErrorInvalidPrimPathPtr;
341 static PcpErrorInvalidPrimPathPtr
New();
367class PcpErrorInvalidAssetPathBase;
368typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
369 PcpErrorInvalidAssetPathBasePtr;
371class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
374 PCP_API ~PcpErrorInvalidAssetPathBase()
override;
383 std::string assetPath;
386 std::string resolvedAssetPath;
390 SdfLayerHandle sourceLayer;
395 std::string messages;
399 PcpErrorInvalidAssetPathBase(PcpErrorType
errorType);
406typedef std::shared_ptr<PcpErrorInvalidAssetPath>
407 PcpErrorInvalidAssetPathPtr;
416 static PcpErrorInvalidAssetPathPtr
New();
431typedef std::shared_ptr<PcpErrorMutedAssetPath>
432 PcpErrorMutedAssetPathPtr;
441 static PcpErrorMutedAssetPathPtr
New();
456typedef std::shared_ptr<PcpErrorTargetPathBase>
457 PcpErrorTargetPathBasePtr;
491typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
492 PcpErrorInvalidInstanceTargetPathPtr;
502 static PcpErrorInvalidInstanceTargetPathPtr
New();
517typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
518 PcpErrorInvalidExternalTargetPathPtr;
528 static PcpErrorInvalidExternalTargetPathPtr
New();
546typedef std::shared_ptr<PcpErrorInvalidTargetPath>
547 PcpErrorInvalidTargetPathPtr;
556 static PcpErrorInvalidTargetPathPtr
New();
571typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
572 PcpErrorInvalidSublayerOffsetPtr;
581 static PcpErrorInvalidSublayerOffsetPtr
New();
587 SdfLayerHandle layer;
588 SdfLayerHandle sublayer;
600typedef std::shared_ptr<PcpErrorInvalidSublayerAndOffsetCount>
601 PcpErrorInvalidSublayerAndOffsetCountPtr;
610 static PcpErrorInvalidSublayerAndOffsetCountPtr
New();
616 SdfLayerHandle layer;
617 size_t sublayerCount = 0;
618 size_t offsetCount = 0;
629typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
630 PcpErrorInvalidReferenceOffsetPtr;
639 static PcpErrorInvalidReferenceOffsetPtr
New();
671typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
672 PcpErrorInvalidSublayerOwnershipPtr;
681 static PcpErrorInvalidSublayerOwnershipPtr
New();
688 SdfLayerHandle layer;
689 SdfLayerHandleVector sublayers;
700typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
701 PcpErrorInvalidSublayerPathPtr;
710 static PcpErrorInvalidSublayerPathPtr
New();
716 SdfLayerHandle layer;
717 std::string sublayerPath;
718 std::string messages;
729typedef std::shared_ptr<PcpErrorRelocationBase>
730 PcpErrorRelocationBasePtr;
749typedef std::shared_ptr<PcpErrorInvalidAuthoredRelocation>
750 PcpErrorInvalidAuthoredRelocationPtr;
759 static PcpErrorInvalidAuthoredRelocationPtr
New();
785typedef std::shared_ptr<PcpErrorInvalidConflictingRelocation>
786 PcpErrorInvalidConflictingRelocationPtr;
795 static PcpErrorInvalidConflictingRelocationPtr
New();
822 TargetIsConflictSource,
823 SourceIsConflictTarget,
824 TargetIsConflictSourceDescendant,
825 SourceIsConflictSourceDescendant
839typedef std::shared_ptr<PcpErrorInvalidSameTargetRelocations>
840 PcpErrorInvalidSameTargetRelocationsPtr;
849 static PcpErrorInvalidSameTargetRelocationsPtr
New();
879typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
880 PcpErrorOpinionAtRelocationSourcePtr;
889 static PcpErrorOpinionAtRelocationSourcePtr
New();
895 SdfLayerHandle layer;
907typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
908 PcpErrorPrimPermissionDeniedPtr;
917 static PcpErrorPrimPermissionDeniedPtr
New();
937typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
938 PcpErrorPropertyPermissionDeniedPtr;
947 static PcpErrorPropertyPermissionDeniedPtr
New();
955 std::string layerPath;
966typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
975 static PcpErrorSublayerCyclePtr
New();
981 SdfLayerHandle layer;
982 SdfLayerHandle sublayer;
993typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
994 PcpErrorTargetPermissionDeniedPtr;
1003 static PcpErrorTargetPermissionDeniedPtr
New();
1018typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
1019 PcpErrorUnresolvedPrimPathPtr;
1028 static PcpErrorUnresolvedPrimPathPtr
New();
1058typedef std::shared_ptr<PcpErrorVariableExpressionError>
1059 PcpErrorVariableExpressionErrorPtr;
1067 static PcpErrorVariableExpressionErrorPtr New();
1099void PcpRaiseErrors(
const PcpErrorVector &errors);
1101PXR_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.
Invalid sublayer and offset counts in a layer stack.
PCP_API ~PcpErrorInvalidSublayerAndOffsetCount() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidSublayerAndOffsetCountPtr New()
Returns a new error object.
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.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.
SdfSpecType
An enum that specifies the type of an object.
SdfVariability
An enum that identifies variability types for attributes.