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" 39 PXR_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
76 typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
77 typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
88 virtual std::string
ToString()
const = 0;
108 typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
117 static PcpErrorArcCyclePtr
New();
121 PCP_API std::string
ToString()
const override;
134 typedef std::shared_ptr<PcpErrorArcPermissionDenied>
135 PcpErrorArcPermissionDeniedPtr;
145 static PcpErrorArcPermissionDeniedPtr
New();
149 PCP_API std::string
ToString()
const override;
167 typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
176 static PcpErrorCapacityExceededPtr
New(PcpErrorType
errorType);
180 PCP_API std::string
ToString()
const override;
189 class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
192 PCP_API ~PcpErrorInconsistentPropertyBase()
override;
195 std::string definingLayerIdentifier;
200 std::string conflictingLayerIdentifier;
206 PcpErrorInconsistentPropertyBase(PcpErrorType errorType);
213 typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
214 PcpErrorInconsistentPropertyTypePtr;
221 public PcpErrorInconsistentPropertyBase {
224 static PcpErrorInconsistentPropertyTypePtr
New();
228 PCP_API std::string
ToString()
const override;
244 typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
245 PcpErrorInconsistentAttributeTypePtr;
252 public PcpErrorInconsistentPropertyBase {
255 static PcpErrorInconsistentAttributeTypePtr
New();
259 PCP_API std::string
ToString()
const override;
275 typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
276 PcpErrorInconsistentAttributeVariabilityPtr;
283 public PcpErrorInconsistentPropertyBase {
286 static PcpErrorInconsistentAttributeVariabilityPtr
New();
290 PCP_API std::string
ToString()
const override;
306 typedef std::shared_ptr<PcpErrorInvalidPrimPath>
307 PcpErrorInvalidPrimPathPtr;
316 static PcpErrorInvalidPrimPathPtr
New();
320 PCP_API std::string
ToString()
const override;
342 class PcpErrorInvalidAssetPathBase;
343 typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
344 PcpErrorInvalidAssetPathBasePtr;
346 class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
349 PCP_API ~PcpErrorInvalidAssetPathBase()
override;
358 std::string assetPath;
361 std::string resolvedAssetPath;
365 SdfLayerHandle sourceLayer;
370 std::string messages;
374 PcpErrorInvalidAssetPathBase(PcpErrorType errorType);
381 typedef std::shared_ptr<PcpErrorInvalidAssetPath>
382 PcpErrorInvalidAssetPathPtr;
391 static PcpErrorInvalidAssetPathPtr
New();
395 PCP_API std::string
ToString()
const override;
406 typedef std::shared_ptr<PcpErrorMutedAssetPath>
407 PcpErrorMutedAssetPathPtr;
416 static PcpErrorMutedAssetPathPtr
New();
420 PCP_API std::string
ToString()
const override;
431 typedef std::shared_ptr<PcpErrorTargetPathBase>
432 PcpErrorTargetPathBasePtr;
466 typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
467 PcpErrorInvalidInstanceTargetPathPtr;
477 static PcpErrorInvalidInstanceTargetPathPtr
New();
481 PCP_API std::string
ToString()
const override;
492 typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
493 PcpErrorInvalidExternalTargetPathPtr;
503 static PcpErrorInvalidExternalTargetPathPtr
New();
507 PCP_API std::string
ToString()
const override;
521 typedef std::shared_ptr<PcpErrorInvalidTargetPath>
522 PcpErrorInvalidTargetPathPtr;
531 static PcpErrorInvalidTargetPathPtr
New();
535 PCP_API std::string
ToString()
const override;
546 typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
547 PcpErrorInvalidSublayerOffsetPtr;
556 static PcpErrorInvalidSublayerOffsetPtr
New();
560 PCP_API std::string
ToString()
const override;
562 SdfLayerHandle layer;
563 SdfLayerHandle sublayer;
575 typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
576 PcpErrorInvalidReferenceOffsetPtr;
585 static PcpErrorInvalidReferenceOffsetPtr
New();
589 PCP_API std::string
ToString()
const override;
617 typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
618 PcpErrorInvalidSublayerOwnershipPtr;
627 static PcpErrorInvalidSublayerOwnershipPtr
New();
631 PCP_API std::string
ToString()
const override;
634 SdfLayerHandle layer;
635 SdfLayerHandleVector sublayers;
646 typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
647 PcpErrorInvalidSublayerPathPtr;
656 static PcpErrorInvalidSublayerPathPtr
New();
660 PCP_API std::string
ToString()
const override;
662 SdfLayerHandle layer;
663 std::string sublayerPath;
664 std::string messages;
675 typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
676 PcpErrorOpinionAtRelocationSourcePtr;
685 static PcpErrorOpinionAtRelocationSourcePtr
New();
689 PCP_API std::string
ToString()
const override;
691 SdfLayerHandle layer;
703 typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
704 PcpErrorPrimPermissionDeniedPtr;
713 static PcpErrorPrimPermissionDeniedPtr
New();
717 PCP_API std::string
ToString()
const override;
733 typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
734 PcpErrorPropertyPermissionDeniedPtr;
743 static PcpErrorPropertyPermissionDeniedPtr
New();
747 PCP_API std::string
ToString()
const override;
751 std::string layerPath;
762 typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
771 static PcpErrorSublayerCyclePtr
New();
775 PCP_API std::string
ToString()
const override;
777 SdfLayerHandle layer;
778 SdfLayerHandle sublayer;
789 typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
790 PcpErrorTargetPermissionDeniedPtr;
799 static PcpErrorTargetPermissionDeniedPtr
New();
803 PCP_API std::string
ToString()
const override;
814 typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
815 PcpErrorUnresolvedPrimPathPtr;
824 static PcpErrorUnresolvedPrimPathPtr
New();
828 PCP_API std::string
ToString()
const override;
852 void PcpRaiseErrors(
const PcpErrorVector &errors);
854 PXR_NAMESPACE_CLOSE_SCOPE
856 #endif // PXR_USD_PCP_ERRORS_H static PcpErrorInvalidInstanceTargetPathPtr New()
Returns a new error object.
PCP_API ~PcpErrorInvalidAssetPath() override
Destructor.
PcpSite site
The site where the invalid arc was expressed.
Invalid asset paths used by references or payloads.
static PcpErrorInvalidSublayerPathPtr New()
Returns a new error object.
PcpSite privateSite
The private, invalid target of the arc.
PCP_API std::string ToString() const override
Converts error to string message.
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 ~PcpErrorOpinionAtRelocationSource() override
Destructor.
SdfSpecType definingSpecType
The type of the defining spec.
PCP_API std::string ToString() const override
Converts error to string message.
Exceeded the capacity for composition arcs at a single site.
References or payloads that use invalid layer offsets.
static PcpErrorInvalidSublayerOwnershipPtr New()
Returns a new error object.
static PcpErrorPropertyPermissionDeniedPtr New()
Returns a new error object.
static PcpErrorInvalidSublayerOffsetPtr New()
Returns a new error object.
PcpSite rootSite
The site of the composed prim or property being computed when the error was encountered.
Arcs that were not made between PcpNodes because of permission restrictions.
static PcpErrorOpinionAtRelocationSourcePtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
SdfLayerHandle targetLayer
The target layer of the arc.
PCP_API ~PcpErrorPrimPermissionDenied() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorInvalidReferenceOffsetPtr New()
Returns a new error object.
static PcpErrorArcCyclePtr New()
Returns a new error object.
static PcpErrorCapacityExceededPtr New(PcpErrorType errorType)
Returns a new error object.
PcpSite site
The site where the invalid arc was expressed.
PCP_API ~PcpErrorInconsistentAttributeVariability() override
Destructor.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
A site specifies a path in a layer stack of scene description.
PCP_API ~PcpErrorInvalidTargetPath() override
Destructor.
static PcpErrorMutedAssetPathPtr New()
Returns a new error object.
PCP_API ~PcpErrorMutedAssetPath() override
Destructor.
Attributes that have specs with conflicting variability.
Invalid target or connection path authored in an inherited class that points to an instance of that c...
Layers that recursively sublayer themselves.
PCP_API std::string ToString() const override
Converts error to string message.
Asset paths that could not be both resolved and loaded.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorArcPermissionDenied() override
Destructor.
TfToken definingValueType
The value type from the defining spec.
PCP_API std::string ToString() const override
Converts error to string message.
Layers with illegal opinions about private prims.
static PcpErrorPrimPermissionDeniedPtr New()
Returns a new error object.
static PcpErrorInvalidPrimPathPtr New()
Returns a new error object.
static PcpErrorUnresolvedPrimPathPtr New()
Returns a new error object.
Properties that have specs with conflicting definitions.
PCP_API ~PcpErrorUnresolvedPrimPath() override
Destructor.
SdfLayerOffset offset
The invalid layer offset expressed on the arc.
PcpSite privateSite
The private, invalid target of the arc.
static PcpErrorInvalidExternalTargetPathPtr New()
Returns a new error object.
Opinions were found at a relocation source path.
static PcpErrorInvalidTargetPathPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
Token for efficient comparison, assignment, and hashing of known strings.
PCP_API ~PcpErrorInconsistentPropertyType() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
Sublayers that use invalid layer offsets.
PCP_API std::string ToString() const override
Converts error to string message.
PcpSite site
The site where the invalid arc was expressed.
Paths with illegal opinions about private targets.
virtual std::string ToString() const =0
Converts error to string message.
SdfPath targetPath
The invalid target or connection path that was authored.
PCP_API ~PcpErrorInvalidSublayerOwnership() override
Destructor.
static PcpErrorArcPermissionDeniedPtr New()
Returns a new error object.
Base class for composition errors related to target or connection paths.
Invalid target or connection path.
Invalid target or connection path in some scope that points to an object outside of that scope.
SdfPath sourcePath
The source path of the spec that caused this arc to be introduced.
static PcpErrorInconsistentAttributeTypePtr New()
Returns a new error object.
static PcpErrorInconsistentAttributeVariabilityPtr New()
Returns a new error object.
Invalid prim paths used by references or payloads.
PcpArcType arcType
The type of arc.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorInvalidSublayerOffset() override
Destructor.
TfToken conflictingValueType
The value type from the conflicting spec.
PCP_API ~PcpErrorInconsistentAttributeType() override
Destructor.
PCP_API ~PcpErrorTargetPermissionDenied() override
Destructor.
Muted asset paths used by references or payloads.
PCP_API std::string ToString() const override
Converts error to string message.
PcpErrorBase(PcpErrorType errorType)
Constructor.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
A path value used to locate objects in layers or scenegraphs.
static PcpErrorInvalidAssetPathPtr New()
Returns a new error object.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorSublayerCyclePtr New()
Returns a new error object.
PCP_API ~PcpErrorInvalidPrimPath() override
Destructor.
SdfPath primPath
The target prim path of the arc that is invalid.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API std::string ToString() const override
Converts error to string message.
static PcpErrorTargetPermissionDeniedPtr New()
Returns a new error object.
Asset paths that could not be both resolved and loaded.
SdfVariability
An enum that identifies variability types for attributes.
static PcpErrorInconsistentPropertyTypePtr New()
Returns a new error object.
PCP_API ~PcpErrorInvalidReferenceOffset() override
Destructor.
Sibling layers that have the same owner.
const PcpErrorType errorType
The error code.
PCP_API ~PcpErrorPropertyPermissionDenied() override
Destructor.
SdfPath targetPath
Target prim path of the arc.
Layers with illegal opinions about private properties.
SdfSpecType
An enum that specifies the type of an object.
Attributes that have specs with conflicting definitions.
PCP_API std::string ToString() const override
Converts error to string message.
virtual PCP_API ~PcpErrorBase()
Destructor.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API ~PcpErrorInvalidInstanceTargetPath() override
Destructor.
PCP_API ~PcpErrorInvalidExternalTargetPath() override
Destructor.
PCP_API std::string ToString() const override
Converts error to string message.
PCP_API std::string ToString() const override
Converts error to string message.
Arcs between PcpNodes that form a cycle.
PCP_API ~PcpErrorArcCycle() override
Destructor.
SdfPath composedTargetPath
The target or connection path in the composed scene.
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.
Represents a time offset and scale between layers.
PCP_API std::string ToString() const override
Converts error to string message.
SdfVariability conflictingVariability
The variability of the conflicting spec.
PCP_API ~PcpErrorSublayerCycle() override
Destructor.
PCP_API ~PcpErrorCapacityExceeded() override
Destructor.
PCP_API ~PcpErrorInvalidSublayerPath() override
Destructor.
SdfVariability definingVariability
The variability of the defining spec.
SdfPath unresolvedPath
The prim path that cannot be resolved on the target layer stack.
PCP_API ~PcpErrorTargetPathBase() override
Destructor.
PcpSite site
The site where the invalid arc was expressed.
std::string assetPath
Target asset path of the arc.
SdfSpecType conflictingSpecType
The type of the conflicting spec.
SdfSpecType ownerSpecType
The spec type of the property where the target was authored.
Base class for all error types.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.