28 #include "pxr/usd/pcp/api.h"
29 #include "pxr/usd/pcp/site.h"
30 #include "pxr/usd/pcp/types.h"
31 #include "pxr/usd/sdf/layer.h"
32 #include "pxr/usd/sdf/layerOffset.h"
33 #include "pxr/usd/sdf/path.h"
35 #include "pxr/base/tf/enum.h"
41 PXR_NAMESPACE_OPEN_SCOPE
51 PcpErrorType_ArcCycle,
52 PcpErrorType_ArcPermissionDenied,
53 PcpErrorType_InconsistentPropertyType,
54 PcpErrorType_InconsistentAttributeType,
55 PcpErrorType_InconsistentAttributeVariability,
56 PcpErrorType_InternalAssetPath,
57 PcpErrorType_InvalidPrimPath,
58 PcpErrorType_InvalidAssetPath,
59 PcpErrorType_InvalidInstanceTargetPath,
60 PcpErrorType_InvalidExternalTargetPath,
61 PcpErrorType_InvalidTargetPath,
62 PcpErrorType_InvalidReferenceOffset,
63 PcpErrorType_InvalidSublayerOffset,
64 PcpErrorType_InvalidSublayerOwnership,
65 PcpErrorType_InvalidSublayerPath,
66 PcpErrorType_InvalidVariantSelection,
67 PcpErrorType_MutedAssetPath,
68 PcpErrorType_OpinionAtRelocationSource,
69 PcpErrorType_PrimPermissionDenied,
70 PcpErrorType_PropertyPermissionDenied,
71 PcpErrorType_SublayerCycle,
72 PcpErrorType_TargetPermissionDenied,
73 PcpErrorType_UnresolvedPrimPath
78 typedef std::shared_ptr<PcpErrorBase> PcpErrorBasePtr;
79 typedef std::vector<PcpErrorBasePtr> PcpErrorVector;
90 virtual std::string
ToString()
const = 0;
110 typedef std::shared_ptr<PcpErrorArcCycle> PcpErrorArcCyclePtr;
119 static PcpErrorArcCyclePtr
New();
123 PCP_API
virtual std::string
ToString()
const;
136 typedef std::shared_ptr<PcpErrorArcPermissionDenied>
137 PcpErrorArcPermissionDeniedPtr;
147 static PcpErrorArcPermissionDeniedPtr
New();
151 PCP_API
virtual std::string
ToString()
const;
167 class PcpErrorInconsistentPropertyBase :
public PcpErrorBase {
170 PCP_API
virtual ~PcpErrorInconsistentPropertyBase();
173 std::string definingLayerIdentifier;
178 std::string conflictingLayerIdentifier;
184 PcpErrorInconsistentPropertyBase(
TfEnum errorType);
191 typedef std::shared_ptr<PcpErrorInconsistentPropertyType>
192 PcpErrorInconsistentPropertyTypePtr;
199 public PcpErrorInconsistentPropertyBase {
202 static PcpErrorInconsistentPropertyTypePtr
New();
206 PCP_API
virtual std::string
ToString()
const;
222 typedef std::shared_ptr<PcpErrorInconsistentAttributeType>
223 PcpErrorInconsistentAttributeTypePtr;
230 public PcpErrorInconsistentPropertyBase {
233 static PcpErrorInconsistentAttributeTypePtr
New();
237 PCP_API
virtual std::string
ToString()
const;
253 typedef std::shared_ptr<PcpErrorInconsistentAttributeVariability>
254 PcpErrorInconsistentAttributeVariabilityPtr;
261 public PcpErrorInconsistentPropertyBase {
264 static PcpErrorInconsistentAttributeVariabilityPtr
New();
268 PCP_API
virtual std::string
ToString()
const;
284 typedef std::shared_ptr<PcpErrorInternalAssetPath>
285 PcpErrorInternalAssetPathPtr;
294 static PcpErrorInternalAssetPathPtr
New();
298 PCP_API
virtual std::string
ToString()
const;
303 std::string assetPath;
304 std::string resolvedAssetPath;
316 typedef std::shared_ptr<PcpErrorInvalidPrimPath>
317 PcpErrorInvalidPrimPathPtr;
326 static PcpErrorInvalidPrimPathPtr
New();
330 PCP_API
virtual std::string
ToString()
const;
345 class PcpErrorInvalidAssetPathBase;
346 typedef std::shared_ptr<PcpErrorInvalidAssetPathBase>
347 PcpErrorInvalidAssetPathBasePtr;
349 class PcpErrorInvalidAssetPathBase :
public PcpErrorBase {
352 PCP_API ~PcpErrorInvalidAssetPathBase();
357 std::string assetPath;
358 std::string resolvedAssetPath;
360 SdfLayerHandle layer;
361 std::string messages;
365 PcpErrorInvalidAssetPathBase(
TfEnum errorType);
372 typedef std::shared_ptr<PcpErrorInvalidAssetPath>
373 PcpErrorInvalidAssetPathPtr;
382 static PcpErrorInvalidAssetPathPtr
New();
386 PCP_API
virtual std::string
ToString()
const;
397 typedef std::shared_ptr<PcpErrorMutedAssetPath>
398 PcpErrorMutedAssetPathPtr;
407 static PcpErrorMutedAssetPathPtr
New();
411 PCP_API
virtual std::string
ToString()
const;
422 typedef std::shared_ptr<PcpErrorTargetPathBase>
423 PcpErrorTargetPathBasePtr;
457 typedef std::shared_ptr<PcpErrorInvalidInstanceTargetPath>
458 PcpErrorInvalidInstanceTargetPathPtr;
468 static PcpErrorInvalidInstanceTargetPathPtr
New();
472 PCP_API
virtual std::string
ToString()
const;
483 typedef std::shared_ptr<PcpErrorInvalidExternalTargetPath>
484 PcpErrorInvalidExternalTargetPathPtr;
494 static PcpErrorInvalidExternalTargetPathPtr
New();
498 PCP_API
virtual std::string
ToString()
const;
512 typedef std::shared_ptr<PcpErrorInvalidTargetPath>
513 PcpErrorInvalidTargetPathPtr;
522 static PcpErrorInvalidTargetPathPtr
New();
526 PCP_API
virtual std::string
ToString()
const;
537 typedef std::shared_ptr<PcpErrorInvalidSublayerOffset>
538 PcpErrorInvalidSublayerOffsetPtr;
547 static PcpErrorInvalidSublayerOffsetPtr
New();
551 PCP_API
virtual std::string
ToString()
const;
553 SdfLayerHandle layer;
554 SdfLayerHandle sublayer;
566 typedef std::shared_ptr<PcpErrorInvalidReferenceOffset>
567 PcpErrorInvalidReferenceOffsetPtr;
576 static PcpErrorInvalidReferenceOffsetPtr
New();
580 PCP_API
virtual std::string
ToString()
const;
582 SdfLayerHandle layer;
584 std::string assetPath;
597 typedef std::shared_ptr<PcpErrorInvalidSublayerOwnership>
598 PcpErrorInvalidSublayerOwnershipPtr;
607 static PcpErrorInvalidSublayerOwnershipPtr
New();
611 PCP_API
virtual std::string
ToString()
const;
614 SdfLayerHandle layer;
615 SdfLayerHandleVector sublayers;
626 typedef std::shared_ptr<PcpErrorInvalidSublayerPath>
627 PcpErrorInvalidSublayerPathPtr;
636 static PcpErrorInvalidSublayerPathPtr
New();
640 PCP_API
virtual std::string
ToString()
const;
642 SdfLayerHandle layer;
643 std::string sublayerPath;
644 std::string messages;
655 typedef std::shared_ptr<PcpErrorInvalidVariantSelection>
656 PcpErrorInvalidVariantSelectionPtr;
665 static PcpErrorInvalidVariantSelectionPtr
New();
669 PCP_API
virtual std::string
ToString()
const;
671 std::string siteAssetPath;
673 std::string vset, vsel;
684 typedef std::shared_ptr<PcpErrorOpinionAtRelocationSource>
685 PcpErrorOpinionAtRelocationSourcePtr;
694 static PcpErrorOpinionAtRelocationSourcePtr
New();
698 PCP_API
virtual std::string
ToString()
const;
700 SdfLayerHandle layer;
712 typedef std::shared_ptr<PcpErrorPrimPermissionDenied>
713 PcpErrorPrimPermissionDeniedPtr;
722 static PcpErrorPrimPermissionDeniedPtr
New();
726 PCP_API
virtual std::string
ToString()
const;
742 typedef std::shared_ptr<PcpErrorPropertyPermissionDenied>
743 PcpErrorPropertyPermissionDeniedPtr;
752 static PcpErrorPropertyPermissionDeniedPtr
New();
756 PCP_API
virtual std::string
ToString()
const;
760 std::string layerPath;
771 typedef std::shared_ptr<PcpErrorSublayerCycle> PcpErrorSublayerCyclePtr;
780 static PcpErrorSublayerCyclePtr
New();
784 PCP_API
virtual std::string
ToString()
const;
786 SdfLayerHandle layer;
787 SdfLayerHandle sublayer;
798 typedef std::shared_ptr<PcpErrorTargetPermissionDenied>
799 PcpErrorTargetPermissionDeniedPtr;
808 static PcpErrorTargetPermissionDeniedPtr
New();
812 PCP_API
virtual std::string
ToString()
const;
823 typedef std::shared_ptr<PcpErrorUnresolvedPrimPath>
824 PcpErrorUnresolvedPrimPathPtr;
833 static PcpErrorUnresolvedPrimPathPtr
New();
837 PCP_API
virtual std::string
ToString()
const;
851 void PcpRaiseErrors(
const PcpErrorVector &errors);
853 PXR_NAMESPACE_CLOSE_SCOPE
855 #endif // 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.
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.
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.
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.
SdfSpecType
An enum that specifies the type of an object.
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.
std::vector< PcpSiteTrackerSegment > PcpSiteTracker
Represents a single path through the composition tree.
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.
SdfVariability
An enum that identifies variability types for attributes.
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.
PcpArcType
Describes the type of arc connecting two nodes in the prim index.
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.
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.
Attributes that have specs with conflicting definitions.
virtual PCP_API ~PcpErrorBase()
Destructor.
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.
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.