All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdShadeCoordSysAPI Class Reference

#include <coordSysAPI.h>

+ Inheritance diagram for UsdShadeCoordSysAPI:


struct  Binding

Public Member Functions

 UsdShadeCoordSysAPI (const UsdPrim &prim=UsdPrim())
 UsdShadeCoordSysAPI (const UsdSchemaBase &schemaObj)
virtual USDSHADE_API ~UsdShadeCoordSysAPI ()
 Destructor. More...
USDGEOM_API bool HasLocalBindings () const
USDGEOM_API std::vector< BindingGetLocalBindings () const
USDGEOM_API std::vector< BindingFindBindingsWithInheritance () const
USDGEOM_API bool Bind (const TfToken &name, const SdfPath &path) const
USDGEOM_API bool ClearBinding (const TfToken &name, bool removeSpec) const
USDGEOM_API bool BlockBinding (const TfToken &name) const
- Public Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim=UsdPrim())
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj)
virtual USD_API ~UsdAPISchemaBase ()=0
 Destructor. More...
- Public Member Functions inherited from UsdSchemaBase
bool IsConcrete () const
bool IsTyped () const
bool IsAPISchema () const
 Returns whether this is an API schema or not. More...
bool IsAppliedAPISchema () const
bool IsMultipleApplyAPISchema () const
UsdSchemaType GetSchemaType () const
USD_API UsdSchemaBase (const UsdPrim &prim=UsdPrim())
 Construct and store prim as the held prim. More...
USD_API UsdSchemaBase (const UsdSchemaBase &otherSchema)
 Construct and store for the same prim held by otherSchema. More...
virtual USD_API ~UsdSchemaBase ()
 Destructor. More...
USD_API operator bool () const
UsdPrim GetPrim () const
 Return this schema object's held prim. More...
SdfPath GetPath () const
 Shorthand for GetPrim()->GetPath(). More...
USD_API const UsdPrimDefinitionGetSchemaClassPrimDefinition () const

Static Public Member Functions

static USDSHADE_API const
GetSchemaAttributeNames (bool includeInherited=true)
Get (const UsdStagePtr &stage, const SdfPath &path)
static USDGEOM_API TfToken GetCoordSysRelationshipName (const std::string &coordSysName)
- Static Public Member Functions inherited from UsdAPISchemaBase
static USD_API const
GetSchemaAttributeNames (bool includeInherited=true)
- Static Public Member Functions inherited from UsdSchemaBase
static const TfTokenVectorGetSchemaAttributeNames (bool includeInherited=true)

Static Public Attributes

static const UsdSchemaType schemaType = UsdSchemaType::NonAppliedAPI
- Static Public Attributes inherited from UsdAPISchemaBase
static const UsdSchemaType schemaType = UsdSchemaType::AbstractBase
- Static Public Attributes inherited from UsdSchemaBase
static const UsdSchemaType schemaType = UsdSchemaType::AbstractBase

Protected Member Functions

USDSHADE_API UsdSchemaType _GetSchemaType () const override
- Protected Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim, const TfToken &instanceName)
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj, const TfToken &instanceName)
const TfToken_GetInstanceName () const
USD_API bool _IsCompatible () const override
- Protected Member Functions inherited from UsdSchemaBase
const TfType_GetType () const
USD_API UsdAttribute _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const


class UsdSchemaRegistry

Additional Inherited Members

- Static Protected Member Functions inherited from UsdAPISchemaBase
template<typename APISchemaType >
static APISchemaType _ApplyAPISchema (const UsdPrim &prim, const TfToken &apiSchemaName)
template<typename APISchemaType >
static APISchemaType _MultipleApplyAPISchema (const UsdPrim &prim, const TfToken &apiSchemaName, const TfToken &instanceName)

Detailed Description

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.

Definition at line 79 of file coordSysAPI.h.

Constructor & Destructor Documentation

UsdShadeCoordSysAPI::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

Definition at line 91 of file coordSysAPI.h.

UsdShadeCoordSysAPI::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.

Definition at line 99 of file coordSysAPI.h.

virtual USDSHADE_API UsdShadeCoordSysAPI::~UsdShadeCoordSysAPI ( )


Member Function Documentation

USDSHADE_API UsdSchemaType UsdShadeCoordSysAPI::_GetSchemaType ( ) const

Returns the type of schema this class belongs to.

See Also

Reimplemented from UsdAPISchemaBase.

USDGEOM_API bool UsdShadeCoordSysAPI::Bind ( const TfToken name,
const SdfPath path 
) const

Bind the name to the given path. The prim at the given path is expected to be UsdGeomXformable, in order for the binding to be succesfully resolved.

USDGEOM_API bool UsdShadeCoordSysAPI::BlockBinding ( const TfToken name) const

Block the indicated coordinate system binding on this prim by blocking targets on the underlying relationship.

USDGEOM_API bool UsdShadeCoordSysAPI::ClearBinding ( const TfToken name,
bool  removeSpec 
) const

Clear the indicated coordinate system binding on this prim from the current edit target.

Only remove the spec if removeSpec is true (leave the spec to preserve meta-data we may have intentionally authored on the relationship)

USDGEOM_API std::vector<Binding> UsdShadeCoordSysAPI::FindBindingsWithInheritance ( ) const

Find the list of coordinate system bindings that apply to this prim, including inherited bindings.

This computation examines this prim and ancestors for the strongest binding for each name. A binding expressed by a child prim supercedes bindings on ancestors.

Note that this API does not validate the prims at the target paths; they may be of incorrect type, or missing entirely.

Binding relationships with no resolved targets are skipped.

static USDSHADE_API UsdShadeCoordSysAPI UsdShadeCoordSysAPI::Get ( const UsdStagePtr &  stage,
const SdfPath path 

Return a UsdShadeCoordSysAPI holding the prim adhering to this schema at path on stage. If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

static USDGEOM_API TfToken UsdShadeCoordSysAPI::GetCoordSysRelationshipName ( const std::string coordSysName)

Returns the fully namespaced coordinate system relationship name, given the coordinate system name.

USDGEOM_API std::vector<Binding> UsdShadeCoordSysAPI::GetLocalBindings ( ) const

Get the list of coordinate system bindings local to this prim. This does not process inherited bindings. It does not validate that a prim exists at the indicated path. If the binding relationship has multiple targets, only the first is used.

static USDSHADE_API const TfTokenVector& UsdShadeCoordSysAPI::GetSchemaAttributeNames ( bool  includeInherited = true)

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved.

USDGEOM_API bool UsdShadeCoordSysAPI::HasLocalBindings ( ) const

Returns true if the prim has local coordinate system binding opinions. Note that the resulting binding list may still be empty.

Friends And Related Function Documentation

friend class UsdSchemaRegistry

Definition at line 138 of file coordSysAPI.h.

Member Data Documentation

const UsdSchemaType UsdShadeCoordSysAPI::schemaType = UsdSchemaType::NonAppliedAPI

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

See Also

Definition at line 85 of file coordSysAPI.h.

The documentation for this class was generated from the following file: