|
The base class for all schema types in Usd. More...
#include <schemaBase.h>
Public Member Functions | |
bool | IsConcrete () const |
Returns whether or not this class corresponds to a concrete instantiable prim type in scene description. | |
bool | IsTyped () const |
Returns whether or not this class inherits from UsdTyped. | |
bool | IsAPISchema () const |
Returns whether this is an API schema or not. | |
bool | IsAppliedAPISchema () const |
Returns whether this is an applied API schema or not. | |
bool | IsMultipleApplyAPISchema () const |
Returns whether this is an applied API schema or not. | |
UsdSchemaKind | GetSchemaKind () const |
Returns the kind of schema this class is. | |
USD_API | UsdSchemaBase (const UsdPrim &prim=UsdPrim()) |
Construct and store prim as the held prim. | |
USD_API | UsdSchemaBase (const UsdSchemaBase &otherSchema) |
Construct and store for the same prim held by otherSchema . | |
virtual USD_API | ~UsdSchemaBase () |
Destructor. | |
Held prim access. | |
UsdPrim | GetPrim () const |
Return this schema object's held prim. | |
SdfPath | GetPath () const |
Shorthand for GetPrim()->GetPath(). | |
Static Public Attributes | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractBase |
Compile time constant representing what kind of schema this class is. | |
PrimDefinition access. | |
class | UsdSchemaRegistry |
USD_API const UsdPrimDefinition * | GetSchemaClassPrimDefinition () const |
Return the prim definition associated with this schema instance if one exists, otherwise return null. | |
USD_API | operator bool () const |
Return true if this schema object is compatible with its held prim, false otherwise. | |
static const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
virtual UsdSchemaKind | _GetSchemaKind () const |
Returns the kind of schema this class is. | |
virtual UsdSchemaKind | _GetSchemaType () const |
const TfType & | _GetType () const |
USD_API UsdAttribute | _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const |
virtual USD_API bool | _IsCompatible () const |
Subclasses may override _IsCompatible to do specific compatibility checking with the given prim, such as type compatibility or value compatibility. | |
The base class for all schema types in Usd.
Schema objects hold a UsdPrim internally and provide a layer of specific named API atop the underlying scene graph.
Schema objects are polymorphic but they are intended to be created as automatic local variables, so they may be passed and returned by-value. This leaves them subject to slicing. This means that if one passes a SpecificSchema
instance to a function that takes a UsdSchemaBase by-value, all the polymorphic behavior specific to SpecificSchema
is lost.
To avoid slicing, it is encouraged that functions taking schema object arguments take them by const &
if const access is sufficient, otherwise by non-const pointer.
Definition at line 39 of file schemaBase.h.
|
explicit |
Construct and store prim
as the held prim.
|
explicit |
Construct and store for the same prim held by otherSchema
.
|
virtual |
Destructor.
|
inlineprotectedvirtual |
Returns the kind of schema this class is.
Reimplemented in UsdAPISchemaBase, UsdClipsAPI, UsdCollectionAPI, UsdColorSpaceAPI, UsdColorSpaceDefinitionAPI, UsdModelAPI, UsdTyped, UsdGeomBasisCurves, UsdGeomBoundable, UsdGeomCamera, UsdGeomCapsule, UsdGeomCapsule_1, UsdGeomCone, UsdGeomCube, UsdGeomCurves, UsdGeomCylinder, UsdGeomCylinder_1, UsdGeomGprim, UsdGeomHermiteCurves, UsdGeomImageable, UsdGeomMesh, UsdGeomModelAPI, UsdGeomMotionAPI, UsdGeomNurbsCurves, UsdGeomNurbsPatch, UsdGeomPlane, UsdGeomPointBased, UsdGeomPointInstancer, UsdGeomPoints, UsdGeomPrimvarsAPI, UsdGeomScope, UsdGeomSphere, UsdGeomSubset, UsdGeomTetMesh, UsdGeomVisibilityAPI, UsdGeomXform, UsdGeomXformable, UsdGeomXformCommonAPI, UsdHydraGenerativeProceduralAPI, UsdLuxBoundableLightBase, UsdLuxCylinderLight, UsdLuxDiskLight, UsdLuxDistantLight, UsdLuxDomeLight, UsdLuxDomeLight_1, UsdLuxGeometryLight, UsdLuxLightAPI, UsdLuxLightFilter, UsdLuxLightListAPI, UsdLuxListAPI, UsdLuxMeshLightAPI, UsdLuxNonboundableLightBase, UsdLuxPluginLight, UsdLuxPluginLightFilter, UsdLuxPortalLight, UsdLuxRectLight, UsdLuxShadowAPI, UsdLuxShapingAPI, UsdLuxSphereLight, UsdLuxVolumeLightAPI, UsdMediaAssetPreviewsAPI, UsdMediaSpatialAudio, UsdMtlxMaterialXConfigAPI, UsdPhysicsArticulationRootAPI, UsdPhysicsCollisionAPI, UsdPhysicsCollisionGroup, UsdPhysicsDistanceJoint, UsdPhysicsDriveAPI, UsdPhysicsFilteredPairsAPI, UsdPhysicsFixedJoint, UsdPhysicsJoint, UsdPhysicsLimitAPI, UsdPhysicsMassAPI, UsdPhysicsMaterialAPI, UsdPhysicsMeshCollisionAPI, UsdPhysicsPrismaticJoint, UsdPhysicsRevoluteJoint, UsdPhysicsRigidBodyAPI, UsdPhysicsScene, UsdPhysicsSphericalJoint, UsdProcGenerativeProcedural, UsdRenderPass, UsdRenderProduct, UsdRenderSettings, UsdRenderSettingsBase, UsdRenderVar, UsdRiMaterialAPI, UsdRiRenderPassAPI, UsdRiSplineAPI, UsdRiStatementsAPI, UsdSemanticsLabelsAPI, UsdShadeConnectableAPI, UsdShadeCoordSysAPI, UsdShadeMaterial, UsdShadeMaterialBindingAPI, UsdShadeNodeDefAPI, UsdShadeNodeGraph, UsdShadeShader, UsdSkelAnimation, UsdSkelBindingAPI, UsdSkelBlendShape, UsdSkelRoot, UsdSkelSkeleton, UsdUIBackdrop, UsdUINodeGraphNodeAPI, UsdUISceneGraphPrimAPI, UsdVolField3DAsset, UsdVolFieldAsset, UsdVolFieldBase, UsdVolOpenVDBAsset, and UsdVolVolume.
Definition at line 156 of file schemaBase.h.
|
inlineprotectedvirtual |
Leaving this around for one more release as schema classes up until now have been generated with an override of this function. We don't want those classes to immediately not compile before a chance is given to regenerate the schemas.
Definition at line 168 of file schemaBase.h.
|
inlineprotected |
Definition at line 174 of file schemaBase.h.
|
protectedvirtual |
Subclasses may override _IsCompatible to do specific compatibility checking with the given prim, such as type compatibility or value compatibility.
This check is performed when clients invoke the explicit bool operator.
Reimplemented in UsdAPISchemaBase, UsdTyped, UsdGeomXformCommonAPI, and UsdShadeConnectableAPI.
|
inline |
Shorthand for GetPrim()->GetPath().
Definition at line 106 of file schemaBase.h.
|
inline |
Return this schema object's held prim.
Definition at line 103 of file schemaBase.h.
|
inlinestatic |
Definition at line 131 of file schemaBase.h.
USD_API const UsdPrimDefinition * GetSchemaClassPrimDefinition | ( | ) | const |
Return the prim definition associated with this schema instance if one exists, otherwise return null.
This does not use the held prim's type. To get the held prim instance's definition, use UsdPrim::GetPrimDefinition().
|
inline |
Returns the kind of schema this class is.
Definition at line 83 of file schemaBase.h.
|
inline |
Returns whether this is an API schema or not.
Definition at line 62 of file schemaBase.h.
|
inline |
Returns whether this is an applied API schema or not.
If this returns true this class will have an Apply() method
Definition at line 70 of file schemaBase.h.
|
inline |
Returns whether or not this class corresponds to a concrete instantiable prim type in scene description.
If this is true, GetStaticPrimDefinition() will return a valid prim definition with a non-empty typeName.
Definition at line 50 of file schemaBase.h.
|
inline |
Returns whether this is an applied API schema or not.
If this returns true the constructor, Get and Apply methods of this class will take in the name of the API schema instance.
Definition at line 78 of file schemaBase.h.
|
inline |
Returns whether or not this class inherits from UsdTyped.
Types which inherit from UsdTyped can impart a typename on a UsdPrim.
Definition at line 56 of file schemaBase.h.
|
inlineexplicit |
Return true if this schema object is compatible with its held prim, false otherwise.
For untyped schemas return true if the held prim is not expired, otherwise return false. For typed schemas return true if the held prim is not expired and its type is the schema's type or a subtype of the schema's type. Otherwise return false. This method invokes polymorphic behavior.
Definition at line 148 of file schemaBase.h.
|
friend |
Definition at line 194 of file schemaBase.h.
|
static |
Compile time constant representing what kind of schema this class is.
Definition at line 44 of file schemaBase.h.