usdrt::UsdSkelAnimation

Defined in usdrt/scenegraph/usd/usdSkel/animation.h

class UsdSkelAnimation : public usdrt::UsdTyped

Describes a skel animation, where joint animation is stored in a vectorized form.

See the extended Skel Animation documentation for more information.

Subclassed by usdrt::UsdSkelPackedJointAnimation

Public Functions

inline explicit UsdSkelAnimation(const UsdPrim &prim = UsdPrim())

Construct a UsdSkelAnimation on UsdPrim prim. Equivalent to UsdSkelAnimation::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit UsdSkelAnimation(const UsdSchemaBase &schemaObj)

Construct a UsdSkelAnimation on the prim held by schemaObj . Should be preferred over UsdSkelAnimation(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~UsdSkelAnimation()

Destructor.

inline UsdAttribute GetJointsAttr() const

Array of tokens identifying which joints this animation’s data applies to. The tokens for joints correspond to the tokens of Skeleton primitives. The order of the joints as listed here may vary from the order of joints on the Skeleton itself.

Declaration

uniform token[] joints

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

inline UsdAttribute CreateJointsAttr() const

See GetJointsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetTranslationsAttr() const

Joint-local translations of all affected joints. Array length should match the size of the joints attribute.

Declaration

float3[] translations

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Float3Array

inline UsdAttribute CreateTranslationsAttr() const

See GetTranslationsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetRotationsAttr() const

Joint-local unit quaternion rotations of all affected joints, in 32-bit precision. Array length should match the size of the joints attribute.

Declaration

quatf[] rotations

C++ Type

VtArray<GfQuatf>

Usd Type

SdfValueTypeNames->QuatfArray

inline UsdAttribute CreateRotationsAttr() const

See GetRotationsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetScalesAttr() const

Joint-local scales of all affected joints, in 16 bit precision. Array length should match the size of the joints attribute.

Declaration

half3[] scales

C++ Type

VtArray<GfVec3h>

Usd Type

SdfValueTypeNames->Half3Array

inline UsdAttribute CreateScalesAttr() const

See GetScalesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetBlendShapesAttr() const

Array of tokens identifying which blend shapes this animation’s data applies to. The tokens for blendShapes correspond to the tokens set in the skel:blendShapes binding property of the UsdSkelBindingAPI.

Declaration

uniform token[] blendShapes

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

inline UsdAttribute CreateBlendShapesAttr() const

See GetBlendShapesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetBlendShapeWeightsAttr() const

Array of weight values for each blend shape. Each weight value is associated with the corresponding blend shape identified within the blendShapes token array, and therefore must have the same length as *blendShapes.

Declaration

float[] blendShapeWeights

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateBlendShapeWeightsAttr() const

See GetBlendShapeWeightsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

Return the SdfPath to this schema object’s held prim.

inline explicit operator bool() const

Check if this schema object is compatible with it’s held prim and that the prim is valid.

A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on prim.IsA().

An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on prim.HasAPI.

This method invokes polymorphic behaviour.

Returns

True if the help prim is valid, and the schema object is compatible with its held prim.

Public Static Functions

static inline UsdSkelAnimation Define(const UsdStageRefPtr &stage, const SdfPath &path)

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped

Compile time constant representing what kind of schema this class is.

See also

UsdSchemaType

Protected Functions

inline virtual bool _IsCompatible() const

Helper for subclasses to do specific compatibility checking with the given prim. Subclassess may override _isCompatible to for example check type compatibility or value compatibility on the prim.

Overrides exist for UsdTyped and UsdAPISchemaBase.

This check is called when clients invoke the bool operator.

Returns

True if the schema object is compatible with its held prim.

inline const TfToken _GetType() const

Helper for subclasses to get this schema’s type token.

Note

This diverges from Usd and returns a TfToken, since we don’t implements TfType.

Returns

The token representing the schema’s TfType.