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<PcpErrorInvalidPrimPath>
323 PcpErrorInvalidPrimPathPtr;
332 static PcpErrorInvalidPrimPathPtr
New();
336 PCP_API
virtual std::string
ToString()
const;
358 class PcpErrorInvalidAssetPathBase;
359 typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
360 PcpErrorInvalidAssetPathBasePtr;
362 class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
365 PCP_API ~PcpErrorInvalidAssetPathBase();
374 std::string assetPath;
377 std::string resolvedAssetPath;
381 SdfLayerHandle sourceLayer;
386 std::string messages;
390 PcpErrorInvalidAssetPathBase(
TfEnum errorType);
397 typedef std::shared_ptr<PcpErrorInvalidAssetPath>
398 PcpErrorInvalidAssetPathPtr;
407 static PcpErrorInvalidAssetPathPtr
New();
411 PCP_API
virtual std::string
ToString()
const;
422 typedef std::shared_ptr<PcpErrorMutedAssetPath>
423 PcpErrorMutedAssetPathPtr;
432 static PcpErrorMutedAssetPathPtr
New();
436 PCP_API
virtual std::string
ToString()
const;
447 typedef std::shared_ptr<PcpErrorTargetPathBase>
448 PcpErrorTargetPathBasePtr;
482 typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
483 PcpErrorInvalidInstanceTargetPathPtr;
493 static PcpErrorInvalidInstanceTargetPathPtr
New();
497 PCP_API
virtual std::string
ToString()
const;
508 typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
509 PcpErrorInvalidExternalTargetPathPtr;
519 static PcpErrorInvalidExternalTargetPathPtr
New();
523 PCP_API
virtual std::string
ToString()
const;
537 typedef std::shared_ptr<PcpErrorInvalidTargetPath>
538 PcpErrorInvalidTargetPathPtr;
547 static PcpErrorInvalidTargetPathPtr
New();
551 PCP_API
virtual std::string
ToString()
const;
562 typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
563 PcpErrorInvalidSublayerOffsetPtr;
572 static PcpErrorInvalidSublayerOffsetPtr
New();
576 PCP_API
virtual std::string
ToString()
const;
578 SdfLayerHandle layer;
579 SdfLayerHandle sublayer;
591 typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
592 PcpErrorInvalidReferenceOffsetPtr;
601 static PcpErrorInvalidReferenceOffsetPtr
New();
605 PCP_API
virtual std::string
ToString()
const;
633 typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
634 PcpErrorInvalidSublayerOwnershipPtr;
643 static PcpErrorInvalidSublayerOwnershipPtr
New();
647 PCP_API
virtual std::string
ToString()
const;
650 SdfLayerHandle layer;
651 SdfLayerHandleVector sublayers;
662 typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
663 PcpErrorInvalidSublayerPathPtr;
672 static PcpErrorInvalidSublayerPathPtr
New();
676 PCP_API
virtual std::string
ToString()
const;
678 SdfLayerHandle layer;
679 std::string sublayerPath;
680 std::string messages;
691 typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
692 PcpErrorOpinionAtRelocationSourcePtr;
701 static PcpErrorOpinionAtRelocationSourcePtr
New();
705 PCP_API
virtual std::string
ToString()
const;
707 SdfLayerHandle layer;
719 typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
720 PcpErrorPrimPermissionDeniedPtr;
729 static PcpErrorPrimPermissionDeniedPtr
New();
733 PCP_API
virtual std::string
ToString()
const;
749 typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
750 PcpErrorPropertyPermissionDeniedPtr;
759 static PcpErrorPropertyPermissionDeniedPtr
New();
763 PCP_API
virtual std::string
ToString()
const;
767 std::string layerPath;
778 typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
787 static PcpErrorSublayerCyclePtr
New();
791 PCP_API
virtual std::string
ToString()
const;
793 SdfLayerHandle layer;
794 SdfLayerHandle sublayer;
805 typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
806 PcpErrorTargetPermissionDeniedPtr;
815 static PcpErrorTargetPermissionDeniedPtr
New();
819 PCP_API
virtual std::string
ToString()
const;
830 typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
831 PcpErrorUnresolvedPrimPathPtr;
840 static PcpErrorUnresolvedPrimPathPtr
New();
844 PCP_API
virtual std::string
ToString()
const;
868 void PcpRaiseErrors(
const PcpErrorVector &errors);
870 PXR_NAMESPACE_CLOSE_SCOPE
872 #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.
static PcpErrorInvalidSublayerPathPtr New()
Returns a new error object.
PcpSite privateSite
The private, invalid target of the arc.
virtual PCP_API std::string ToString() const
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.
SdfSpecType definingSpecType
The type of the defining spec.
PCP_API ~PcpErrorCapacityExceeded()
Destructor.
Exceeded the capacity for composition arcs at a single site.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
Arcs that were not made between PcpNodes because of permission restrictions.
static PcpErrorOpinionAtRelocationSourcePtr New()
Returns a new error object.
virtual PCP_API std::string ToString() const
Converts error to string message.
PCP_API ~PcpErrorInvalidSublayerOwnership()
Destructor.
SdfLayerHandle targetLayer
The target layer of the arc.
PCP_API ~PcpErrorPrimPermissionDenied()
Destructor.
PcpSiteStr site
The site where the invalid arc was expressed.
static PcpErrorInvalidReferenceOffsetPtr New()
Returns a new error object.
static PcpErrorArcCyclePtr New()
Returns a new error object.
PCP_API ~PcpErrorInvalidPrimPath()
Destructor.
static PcpErrorCapacityExceededPtr New(PcpErrorType errorType)
Returns a new error object.
PcpSite site
The site where the invalid arc was expressed.
PcpCache is the context required to make requests of the Pcp composition algorithm and cache the resu...
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
TfToken definingValueType
The value type from the defining spec.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
Properties that have specs with conflicting definitions.
SdfLayerOffset offset
The invalid layer offset expressed on the arc.
virtual PCP_API std::string ToString() const
Converts error to string message.
static PcpErrorInvalidExternalTargetPathPtr New()
Returns a new error object.
Opinions were found at a relocation source path.
static PcpErrorInvalidTargetPathPtr New()
Returns a new error object.
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.
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.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
PCP_API ~PcpErrorInvalidTargetPath()
Destructor.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
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.
SdfPath primPath
The target prim path of the arc that is invalid.
virtual PCP_API std::string ToString() const
Converts error to string message.
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.
static PcpErrorInconsistentPropertyTypePtr New()
Returns a new error object.
Sibling layers that have the same owner.
PCP_API ~PcpErrorMutedAssetPath()
Destructor.
virtual PCP_API std::string ToString() const
Converts error to string message.
SdfPath targetPath
Target prim path 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.
Layers with illegal opinions about private properties.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
PCP_API ~PcpErrorOpinionAtRelocationSource()
Destructor.
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.
SdfLayerHandle sourceLayer
The source layer of the spec that caused this arc to be introduced.
PCP_API ~PcpErrorInvalidSublayerOffset()
Destructor.
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.
SdfVariability definingVariability
The variability of the defining spec.
PCP_API ~PcpErrorArcPermissionDenied()
Destructor.
SdfPath unresolvedPath
The prim path that cannot be resolved on the target layer stack.
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.
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.
virtual PCP_API std::string ToString() const
Converts error to string message.
Base class for all error types.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.