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"
41 PXR_NAMESPACE_OPEN_SCOPE
51 PcpErrorType_ArcCycle,
52 PcpErrorType_ArcPermissionDenied,
53 PcpErrorType_IndexCapacityExceeded,
54 PcpErrorType_ArcCapacityExceeded,
55 PcpErrorType_ArcNamespaceDepthCapacityExceeded,
56 PcpErrorType_InconsistentPropertyType,
57 PcpErrorType_InconsistentAttributeType,
58 PcpErrorType_InconsistentAttributeVariability,
59 PcpErrorType_InternalAssetPath,
60 PcpErrorType_InvalidPrimPath,
61 PcpErrorType_InvalidAssetPath,
62 PcpErrorType_InvalidInstanceTargetPath,
63 PcpErrorType_InvalidExternalTargetPath,
64 PcpErrorType_InvalidTargetPath,
65 PcpErrorType_InvalidReferenceOffset,
66 PcpErrorType_InvalidSublayerOffset,
67 PcpErrorType_InvalidSublayerOwnership,
68 PcpErrorType_InvalidSublayerPath,
69 PcpErrorType_InvalidVariantSelection,
70 PcpErrorType_MutedAssetPath,
71 PcpErrorType_OpinionAtRelocationSource,
72 PcpErrorType_PrimPermissionDenied,
73 PcpErrorType_PropertyPermissionDenied,
74 PcpErrorType_SublayerCycle,
75 PcpErrorType_TargetPermissionDenied,
76 PcpErrorType_UnresolvedPrimPath
81 typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
82 typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
93 virtual std::string
ToString()
const = 0;
110 return errorType == PcpErrorType_IndexCapacityExceeded ||
111 errorType == PcpErrorType_ArcCapacityExceeded ||
112 errorType == PcpErrorType_ArcNamespaceDepthCapacityExceeded;
124 typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
133 static PcpErrorArcCyclePtr
New();
137 PCP_API
virtual std::string
ToString()
const;
150 typedef std::shared_ptr<PcpErrorArcPermissionDenied>
151 PcpErrorArcPermissionDeniedPtr;
161 static PcpErrorArcPermissionDeniedPtr
New();
165 PCP_API
virtual std::string
ToString()
const;
183 typedef std::shared_ptr<PcpErrorCapacityExceeded> PcpErrorCapacityExceededPtr;
192 static PcpErrorCapacityExceededPtr
New(PcpErrorType
errorType);
196 PCP_API
virtual std::string
ToString()
const;
205 class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
208 PCP_API
virtual ~PcpErrorInconsistentPropertyBase();
211 std::string definingLayerIdentifier;
216 std::string conflictingLayerIdentifier;
222 PcpErrorInconsistentPropertyBase(
TfEnum errorType);
229 typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
230 PcpErrorInconsistentPropertyTypePtr;
237 public PcpErrorInconsistentPropertyBase {
240 static PcpErrorInconsistentPropertyTypePtr
New();
244 PCP_API
virtual std::string
ToString()
const;
260 typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
261 PcpErrorInconsistentAttributeTypePtr;
268 public PcpErrorInconsistentPropertyBase {
271 static PcpErrorInconsistentAttributeTypePtr
New();
275 PCP_API
virtual std::string
ToString()
const;
291 typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
292 PcpErrorInconsistentAttributeVariabilityPtr;
299 public PcpErrorInconsistentPropertyBase {
302 static PcpErrorInconsistentAttributeVariabilityPtr
New();
306 PCP_API
virtual std::string
ToString()
const;
322 typedef std::shared_ptr<PcpErrorInternalAssetPath>
323 PcpErrorInternalAssetPathPtr;
332 static PcpErrorInternalAssetPathPtr
New();
336 PCP_API
virtual std::string
ToString()
const;
341 std::string assetPath;
342 std::string resolvedAssetPath;
354 typedef std::shared_ptr<PcpErrorInvalidPrimPath>
355 PcpErrorInvalidPrimPathPtr;
364 static PcpErrorInvalidPrimPathPtr
New();
368 PCP_API
virtual std::string
ToString()
const;
383 class PcpErrorInvalidAssetPathBase;
384 typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
385 PcpErrorInvalidAssetPathBasePtr;
387 class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
390 PCP_API ~PcpErrorInvalidAssetPathBase();
395 std::string assetPath;
396 std::string resolvedAssetPath;
398 SdfLayerHandle layer;
399 std::string messages;
403 PcpErrorInvalidAssetPathBase(
TfEnum errorType);
410 typedef std::shared_ptr<PcpErrorInvalidAssetPath>
411 PcpErrorInvalidAssetPathPtr;
420 static PcpErrorInvalidAssetPathPtr
New();
424 PCP_API
virtual std::string
ToString()
const;
435 typedef std::shared_ptr<PcpErrorMutedAssetPath>
436 PcpErrorMutedAssetPathPtr;
445 static PcpErrorMutedAssetPathPtr
New();
449 PCP_API
virtual std::string
ToString()
const;
460 typedef std::shared_ptr<PcpErrorTargetPathBase>
461 PcpErrorTargetPathBasePtr;
495 typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
496 PcpErrorInvalidInstanceTargetPathPtr;
506 static PcpErrorInvalidInstanceTargetPathPtr
New();
510 PCP_API
virtual std::string
ToString()
const;
521 typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
522 PcpErrorInvalidExternalTargetPathPtr;
532 static PcpErrorInvalidExternalTargetPathPtr
New();
536 PCP_API
virtual std::string
ToString()
const;
550 typedef std::shared_ptr<PcpErrorInvalidTargetPath>
551 PcpErrorInvalidTargetPathPtr;
560 static PcpErrorInvalidTargetPathPtr
New();
564 PCP_API
virtual std::string
ToString()
const;
575 typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
576 PcpErrorInvalidSublayerOffsetPtr;
585 static PcpErrorInvalidSublayerOffsetPtr
New();
589 PCP_API
virtual std::string
ToString()
const;
591 SdfLayerHandle layer;
592 SdfLayerHandle sublayer;
604 typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
605 PcpErrorInvalidReferenceOffsetPtr;
614 static PcpErrorInvalidReferenceOffsetPtr
New();
618 PCP_API
virtual std::string
ToString()
const;
620 SdfLayerHandle layer;
622 std::string assetPath;
635 typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
636 PcpErrorInvalidSublayerOwnershipPtr;
645 static PcpErrorInvalidSublayerOwnershipPtr
New();
649 PCP_API
virtual std::string
ToString()
const;
652 SdfLayerHandle layer;
653 SdfLayerHandleVector sublayers;
664 typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
665 PcpErrorInvalidSublayerPathPtr;
674 static PcpErrorInvalidSublayerPathPtr
New();
678 PCP_API
virtual std::string
ToString()
const;
680 SdfLayerHandle layer;
681 std::string sublayerPath;
682 std::string messages;
693 typedef std::shared_ptr<PcpErrorInvalidVariantSelection>
694 PcpErrorInvalidVariantSelectionPtr;
703 static PcpErrorInvalidVariantSelectionPtr
New();
707 PCP_API
virtual std::string
ToString()
const;
709 std::string siteAssetPath;
711 std::string vset, vsel;
722 typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
723 PcpErrorOpinionAtRelocationSourcePtr;
732 static PcpErrorOpinionAtRelocationSourcePtr
New();
736 PCP_API
virtual std::string
ToString()
const;
738 SdfLayerHandle layer;
750 typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
751 PcpErrorPrimPermissionDeniedPtr;
760 static PcpErrorPrimPermissionDeniedPtr
New();
764 PCP_API
virtual std::string
ToString()
const;
780 typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
781 PcpErrorPropertyPermissionDeniedPtr;
790 static PcpErrorPropertyPermissionDeniedPtr
New();
794 PCP_API
virtual std::string
ToString()
const;
798 std::string layerPath;
809 typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
818 static PcpErrorSublayerCyclePtr
New();
822 PCP_API
virtual std::string
ToString()
const;
824 SdfLayerHandle layer;
825 SdfLayerHandle sublayer;
836 typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
837 PcpErrorTargetPermissionDeniedPtr;
846 static PcpErrorTargetPermissionDeniedPtr
New();
850 PCP_API
virtual std::string
ToString()
const;
861 typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
862 PcpErrorUnresolvedPrimPathPtr;
871 static PcpErrorUnresolvedPrimPathPtr
New();
875 PCP_API
virtual std::string
ToString()
const;
889 void PcpRaiseErrors(
const PcpErrorVector &errors);
891 PXR_NAMESPACE_CLOSE_SCOPE
893 #endif // PXR_USD_PCP_ERRORS_H
static PcpErrorInvalidInstanceTargetPathPtr New()
Returns a new error object.
PcpSite site
The site where the invalid arc was expressed.
virtual PCP_API std::string ToString() const
Converts error to string message.
Invalid asset paths used by references or payloads.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorInvalidSublayerPathPtr New()
Returns a new error object.
PcpSite privateSite
The private, invalid target of the arc.
SdfPath owningPath
The path to the property where the target was authored.
SdfLayerHandle layer
The layer containing the property where the target was authored.
SdfSpecType definingSpecType
The type of the defining spec.
PCP_API ~PcpErrorCapacityExceeded()
Destructor.
Exceeded the capacity for composition arcs at a single site.
Sublayers 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.
Arcs that were not made between PcpNodes because of permission restrictions.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorOpinionAtRelocationSourcePtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
PCP_API ~PcpErrorInvalidSublayerOwnership()
Destructor.
PCP_API ~PcpErrorPrimPermissionDenied()
Destructor.
PcpSiteStr site
The site where the invalid arc was expressed.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorInvalidReferenceOffsetPtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorArcCyclePtr New()
Returns a new error object.
PCP_API ~PcpErrorInvalidPrimPath()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorCapacityExceededPtr New(PcpErrorType errorType)
Returns a new error object.
PcpSite site
The site where the invalid arc was expressed.
virtual PCP_API std::string ToString() const
Converts error to string message.
PcpCache is the context required to make requests of the Pcp composition algorithm and cache the resu...
PCP_API ~PcpErrorInvalidVariantSelection()
Destructor.
A site specifies a path in a layer stack of scene description.
static PcpErrorMutedAssetPathPtr New()
Returns a new error object.
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...
PCP_API ~PcpErrorTargetPathBase()
Destructor.
An enum class that records both enum type and enum value.
Layers that recursively sublayer themselves.
Asset paths that could not be both resolved and loaded.
Invalid variant selections.
static PcpErrorInternalAssetPathPtr New()
Returns a new error object.
TfToken definingValueType
The value type from the defining spec.
Layers with illegal opinions about private prims.
static PcpErrorPrimPermissionDeniedPtr New()
Returns a new error object.
PCP_API ~PcpErrorTargetPermissionDenied()
Destructor.
static PcpErrorInvalidPrimPathPtr New()
Returns a new error object.
static PcpErrorUnresolvedPrimPathPtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
Properties that have specs with conflicting definitions.
static PcpErrorInvalidExternalTargetPathPtr New()
Returns a new error object.
Opinions were found at a relocation source path.
static PcpErrorInvalidTargetPathPtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
Token for efficient comparison, assignment, and hashing of known strings.
A "string-based" version of PcpSite.
PCP_API ~PcpErrorSublayerCycle()
Destructor.
Sublayers that use invalid layer offsets.
PCP_API ~PcpErrorInconsistentAttributeType()
Destructor.
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.
const TfEnum errorType
The error code.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorArcPermissionDeniedPtr New()
Returns a new error object.
Base class for composition errors related to target or connection paths.
PCP_API ~PcpErrorUnresolvedPrimPath()
Destructor.
Invalid target or connection path.
PCP_API ~PcpErrorInvalidReferenceOffset()
Destructor.
Invalid target or connection path in some scope that points to an object outside of that scope...
static PcpErrorInconsistentAttributeTypePtr New()
Returns a new error object.
static PcpErrorInconsistentAttributeVariabilityPtr New()
Returns a new error object.
Invalid prim paths used by references or payloads.
PcpSite site
The site where the invalid arc was expressed.
PcpArcType arcType
The type of arc.
PCP_API ~PcpErrorInconsistentPropertyType()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
TfToken conflictingValueType
The value type from the conflicting spec.
Muted asset paths used by references or payloads.
virtual PCP_API std::string ToString() const
Converts error to string message.
PCP_API ~PcpErrorInvalidTargetPath()
Destructor.
PCP_API ~PcpErrorInvalidSublayerPath()
Destructor.
A path value used to locate objects in layers or scenegraphs.
static PcpErrorInvalidAssetPathPtr New()
Returns a new error object.
PcpSiteStr rootSite
The site of the composed prim or property being computed when the error was encountered.
PcpSiteStr site
The site where the invalid arc was expressed.
static PcpErrorSublayerCyclePtr New()
Returns a new error object.
static PcpErrorTargetPermissionDeniedPtr New()
Returns a new error object.
Asset paths that could not be both resolved and loaded.
PcpErrorBase(TfEnum errorType)
Constructor.
SdfVariability
An enum that identifies variability types for attributes.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorInconsistentPropertyTypePtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
Sibling layers that have the same owner.
virtual PCP_API std::string ToString() const
Converts error to string message.
PCP_API ~PcpErrorMutedAssetPath()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
virtual PCP_API std::string ToString() const
Converts error to string message.
Layers with illegal opinions about private properties.
PCP_API ~PcpErrorInternalAssetPath()
Destructor.
PCP_API ~PcpErrorArcCycle()
Destructor.
SdfSpecType
An enum that specifies the type of an object.
Attributes that have specs with conflicting definitions.
virtual PCP_API ~PcpErrorBase()
Destructor.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
PCP_API ~PcpErrorOpinionAtRelocationSource()
Destructor.
static PcpErrorInvalidVariantSelectionPtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
virtual PCP_API std::string ToString() const
Converts error to string message.
bool ShouldReportAtMostOnce() const
Return true if this type of error should be reported at most once for a given prim.
PCP_API ~PcpErrorInvalidExternalTargetPath()
Destructor.
PCP_API ~PcpErrorPropertyPermissionDenied()
Destructor.
Arcs between PcpNodes that form a cycle.
SdfPath composedTargetPath
The target or connection path in the composed scene.
PCP_API ~PcpErrorInconsistentAttributeVariability()
Destructor.
PCP_API ~PcpErrorInvalidSublayerOffset()
Destructor.
Error about an arc that is prohibited due to being internal to an asset.
Represents a time offset and scale between layers.
SdfVariability conflictingVariability
The variability of the conflicting spec.
PCP_API ~PcpErrorInvalidInstanceTargetPath()
Destructor.
PcpSiteStr privateSite
The private, invalid target of the arc.
virtual PCP_API std::string ToString() const
Converts error to string message.
virtual PCP_API std::string ToString() const
Converts error to string message.
SdfVariability definingVariability
The variability of the defining spec.
PCP_API ~PcpErrorArcPermissionDenied()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
PCP_API ~PcpErrorInvalidAssetPath()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.