All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
adaptor.h File Reference
+ Include dependency graph for adaptor.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UsdMayaAdaptor
 The UsdMayaAdaptor transparently adapts the interface for a Maya object to a UsdPrim-like interface, allowing you to get and set Maya attributes as VtValues. More...
 
class  UsdMayaAdaptor::AttributeAdaptor
 The AttributeAdaptor stores a mapping between a USD schema attribute and a Maya plug, enabling conversions between the two. More...
 
class  UsdMayaAdaptor::SchemaAdaptor
 The SchemaAdaptor is a wrapper around a Maya object associated with a particular USD schema. More...
 

Macros

#define PXRUSDMAYA_REGISTER_ADAPTOR_SCHEMA(mayaTypeName, schemaType)
 Registers the given mayaTypeName with the given USD schemaType so that those Maya nodes can be used with the given typed schema in the adaptor system. More...
 
#define PXRUSDMAYA_REGISTER_ADAPTOR_ATTRIBUTE_ALIAS(attrName, alias)
 Registers an alias string for the given attrName token or string. More...
 

Macro Definition Documentation

#define PXRUSDMAYA_REGISTER_ADAPTOR_ATTRIBUTE_ALIAS (   attrName,
  alias 
)
Value:
{\
}
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:89
static PXRUSDMAYA_API void RegisterAttributeAlias(const TfToken &attributeName, const std::string &alias)
For backwards compatibility only: when upgrading any pre-existing code to use the adaptor mechanism...
The UsdMayaAdaptor transparently adapts the interface for a Maya object to a UsdPrim-like interface...
Definition: adaptor.h:136
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

Registers an alias string for the given attrName token or string.

You should invoke this macro in the same place that you invoke any PXRUSDMAYA_REGISTER_ADAPTOR_SCHEMA macros for your type. This will ensure that all the aliases are registered at the correct time.

See Also
UsdMayaAdaptor::RegisterAttributeAlias()

Definition at line 619 of file adaptor.h.

#define PXRUSDMAYA_REGISTER_ADAPTOR_SCHEMA (   mayaTypeName,
  schemaType 
)
Value:
{\
#mayaTypeName, TfType::Find<schemaType>());\
}
static PXRUSDMAYA_API void RegisterTypedSchemaConversion(const std::string &nodeTypeName, const TfType &usdType)
Registers the given Maya plugin type with a USD typed schema.
The UsdMayaAdaptor transparently adapts the interface for a Maya object to a UsdPrim-like interface...
Definition: adaptor.h:136
#define TF_REGISTRY_FUNCTION(KEY_TYPE)
Define a function that is called on demand by TfRegistryManager.

Registers the given mayaTypeName with the given USD schemaType so that those Maya nodes can be used with the given typed schema in the adaptor system.

mayaTypeName is a Maya node name. Each fnOrPluginType is mapped to a single schemaType; the last registration wins.

The convention in the UsdMaya library is to place the registration macro in the prim writer that exports mayaTypeName nodes as schemaType prims. This will ensure that the registrations are properly invoked by the UsdMaya adaptor system.

Example usage:

* PXRUSDMAYA_REGISTER_ADAPTOR_SCHEMA(myTypeName, MySchemaType);
*
See Also
UsdMayaAdaptor::RegisterTypedSchemaConversion()

Definition at line 605 of file adaptor.h.