usdrt::UsdShadeCoordSysAPI

Defined in usdrt/scenegraph/usd/usdShade/coordSysAPI.h

Functions

Variables

class UsdShadeCoordSysAPI : public usdrt::UsdAPISchemaBase

UsdShadeCoordSysAPI provides a way to designate, name, and discover coordinate systems.

Coordinate systems are implicitly established by UsdGeomXformable prims, using their local space. That coordinate system may be bound (i.e., named) from another prim. The binding is encoded as a single-target relationship in the “coordSys:” namespace. Coordinate system bindings apply to descendants of the prim where the binding is expressed, but names may be re-bound by descendant prims.

Named coordinate systems are useful in shading workflows. An example is projection paint, which projects a texture from a certain view (the paint coordinate system). Using the paint coordinate frame avoids the need to assign a UV set to the object, and can be a concise way to project paint across a collection of objects with a single shared paint coordinate system.

This is a non-applied API schema.

Public Functions

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

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

inline explicit UsdShadeCoordSysAPI(const UsdSchemaBase &schemaObj)

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

inline virtual ~UsdShadeCoordSysAPI()

Destructor.

inline operator bool() const

Boolean operator.

Returns

Return true if the contained prim is has this api schema applied using HasAPI, and false otherwise.

UsdPrim GetPrim() const

Return this schema object’s held prim.

SdfPath GetPath() const

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

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::NonAppliedAPI

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

See also

UsdSchemaType

Protected Functions

inline const TfToken &_GetInstanceName() const

Returns the instance name of the API schema object belonging to a multiple-apply API schema.

The returned instance name will be empty for non-applied and single-apply API schemas.