usdrt::UsdSchemaBase
Defined in usdrt/scenegraph/usd/usd/impl/usd_decl.h
Functions
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::UsdSchemaBase::UsdSchemaBase: Construct and store
prim
as the held prim.usdrt::UsdSchemaBase::UsdSchemaBase: Construct and store for the same prim held by
otherSchema
.usdrt::UsdSchemaBase::operator bool: Return true if the held prim is valid.
usdrt::UsdSchemaBase::~UsdSchemaBase: Destructor.
Variables
usdrt::UsdSchemaBase::schemaType: Compile time constant representing what kind of schema this class is.
-
class UsdSchemaBase
Base class for all Usd Schemas. Schema objects hold a UsdPrim m_prim and an SdfPath m_primPath and provide an additional layer of specific API.
Create vs Get Property Methods
For a UsdAttribute named “points” defined in a schema class, you will find two access methods in the schema class in C++ and python:
GetPointsAttr()
CreatePointsAttr()
CreatePointsAttr() returns a UsdAttribute, and also creates it on the prim if it doesn’t exist. There is no change if the attribute already exists.
TODO IsMultipleApplyAPISchema etc
Subclassed by usdrt::UsdAPISchemaBase, usdrt::UsdTyped
Public Functions
-
explicit UsdSchemaBase(const UsdPrim &prim = UsdPrim())
Construct and store
prim
as the held prim.- Parameters
prim – The help prim in this schema.
-
explicit UsdSchemaBase(const UsdSchemaBase &otherSchema)
Construct and store for the same prim held by
otherSchema
.- Parameters
otherSchema – Other schema to copy.
-
virtual ~UsdSchemaBase()
Destructor.
-
explicit operator bool() const
Return true if the held prim is valid.
See also
See UsdPrim::IsValid.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::AbstractBase
Compile time constant representing what kind of schema this class is.
See also
See UsdSchemaType in usd/common.h