AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Usd Maya

Modules

 Nodes
 The custom nodes are related classes that are used within the USD maya bridge.
 
 Commands
 A set of custom maya commands.
 
 File IO
 Classes that deal with the import/export of USD data into maya.
 

Classes

class  AL::usdmaya::Global
 This class wraps all of the global state/mechanisms needed to integrate USD and Maya. This mainly handles things such as onFileNew, preFileSave, etc. Hopefully the contents of the cpp file will be as minimal as possible. More...
 
class  AL::usdmaya::StageCache
 Maintains a cache of all active stages within maya. More...
 
class  AL::usdmaya::StageData
 This code is effectively copied from the pixar plugin. It's just used to pass the usd stage through the DG. More...
 
struct  AL::usdmaya::guid
 A type to store a UUID from a maya node. More...
 
struct  AL::usdmaya::guid_compare
 Less than comparison utility for sorting via 128bit guid. More...
 
struct  AL::usdmaya::MObjectMap
 A class that acts as a lookup table for dependency nodes. It works by storing a sorted map based on the uuid of each node. More...
 

Enumerations

enum  AL::usdmaya::UsdDataType : uint32_t {
  kBool, kUChar, kInt, kUInt,
  kInt64, kUInt64, kHalf, kFloat,
  kDouble, kString, kMatrix2d, kMatrix3d,
  kMatrix4d, kQuatd, kQuatf, kQuath,
  kVec2d, kVec2f, kVec2h, kVec2i,
  kVec3d, kVec3f, kVec3h, kVec3i,
  kVec4d, kVec4f, kVec4h, kVec4i,
  kToken, kAsset, kFrame4d, kUnknown
}
 A generalized set of USD attribute types that enable switch statements (instead of the if/else approach you require when using SdfValueTypeNames).
 
enum  AL::usdmaya::TransformOperation : uint8_t {
  kTranslate = 0, kPivot, kRotatePivotTranslate, kRotatePivot,
  kRotate, kRotateAxis, kRotatePivotInv, kScalePivotTranslate,
  kScalePivot, kShear, kScale, kScalePivotInv,
  kPivotInv, kTransform, kUnknownOp
}
 An enum describing the type of transformation found in a UsdGeomXformOp.
 

Functions

UsdDataType AL::usdmaya::getAttributeType (const UsdAttribute &usdAttr)
 A method to quickly return the data type of a USD attribute. More...
 
UsdDataType AL::usdmaya::getAttributeType (const SdfValueTypeName &typeName)
 A method to quickly return the data type of a USD attribute. More...
 
template<typename AFnPlugin >
MStatus AL::usdmaya::registerPlugin (AFnPlugin &plugin)
 This method is basically the main initializePlugin routine. The reason for it being a template is simply a historical artifact. More...
 
template<typename AFnPlugin >
MStatus AL::usdmaya::unregisterPlugin (AFnPlugin &plugin)
 This method is basically the main uninitializePlugin routine. The reason for it being a template is simply a historical artifact. More...
 
TransformOperation AL::usdmaya::xformOpToEnum (const std::string &opName)
 Convert the textual name of a transformation operation into an easier to handle enum value. More...
 
bool AL::usdmaya::matchesMayaProfile (std::vector< UsdGeomXformOp >::const_iterator it, std::vector< UsdGeomXformOp >::const_iterator end, std::vector< TransformOperation >::iterator output)
 a function to check to see if the incoming transform operations are compatible with the maya transform types. More...
 
void AL::usdmaya::mapUsdPrimToMayaNode (const UsdPrim &usdPrim, const MObject &mayaObject, const MDagPath *const proxyShapeNode=nullptr)
 Captures the mapping of UsdPrim -> Maya Object and stores it into the session layer. usdMayaShapeNode is an optional argument, if it is passed and the passed in mayaObject's path couldnt be determined, then the corresponding maya path is determined using this AL::usdmaya::nodes::ProxyShape and the usdPrim path. It is to get around the delayed creation of nodes using a Modifier. More...
 
void AL::usdmaya::matrixToSRT (GfMatrix4d &value, double S[3], MEulerRotation &R, double T[3])
 convert a 4x4 matrix to an SRT transformation. Assumes that there is no shearing. More...
 
MString AL::usdmaya::convert (const std::string &str)
 convert string types More...
 
std::string AL::usdmaya::convert (const MString &str)
 convert string types More...
 

Detailed Description

Function Documentation

MString AL::usdmaya::convert ( const std::string &  str)
inline

convert string types

Parameters
strthe std::string to convert to an MString
Returns
the MString
std::string AL::usdmaya::convert ( const MString &  str)
inline

convert string types

Parameters
strthe MString to convert to a std::string
Returns
the std::string
UsdDataType AL::usdmaya::getAttributeType ( const UsdAttribute &  usdAttr)

A method to quickly return the data type of a USD attribute.

Parameters
usdAttrthe usd attribute to query
Returns
the attribute type
UsdDataType AL::usdmaya::getAttributeType ( const SdfValueTypeName &  typeName)

A method to quickly return the data type of a USD attribute.

Parameters
typeNamethe type name of the usd attribute to query
Returns
the attribute type
void AL::usdmaya::mapUsdPrimToMayaNode ( const UsdPrim &  usdPrim,
const MObject &  mayaObject,
const MDagPath *const  proxyShapeNode = nullptr 
)

Captures the mapping of UsdPrim -> Maya Object and stores it into the session layer. usdMayaShapeNode is an optional argument, if it is passed and the passed in mayaObject's path couldnt be determined, then the corresponding maya path is determined using this AL::usdmaya::nodes::ProxyShape and the usdPrim path. It is to get around the delayed creation of nodes using a Modifier.

Parameters
usdPrimthe prim to map to the mayaObject
mayaObjectthe maya node to map
proxyShapeNodepointer to the daga path for the proxy shape
bool AL::usdmaya::matchesMayaProfile ( std::vector< UsdGeomXformOp >::const_iterator  it,
std::vector< UsdGeomXformOp >::const_iterator  end,
std::vector< TransformOperation >::iterator  output 
)

a function to check to see if the incoming transform operations are compatible with the maya transform types.

Parameters
itthe start of the transform operations
endthe end of the transform operations
outputa simpler set of sorted enums, which are used later as a quicker way to index the transform ops.
Returns
true if the type is compatible with maya
void AL::usdmaya::matrixToSRT ( GfMatrix4d &  value,
double  S[3],
MEulerRotation &  R,
double  T[3] 
)

convert a 4x4 matrix to an SRT transformation. Assumes that there is no shearing.

Parameters
valuethe 4x4 matrix to extract the TRS values from
Sthe returned scale value
Rthe returned euler rotation values
Tthe returned translation values
template<typename AFnPlugin >
MStatus AL::usdmaya::registerPlugin ( AFnPlugin &  plugin)

This method is basically the main initializePlugin routine. The reason for it being a template is simply a historical artifact.

Parameters
pluginthe MFnPlugin
Todo:
Move this code into initializePlugin
template<typename AFnPlugin >
MStatus AL::usdmaya::unregisterPlugin ( AFnPlugin &  plugin)

This method is basically the main uninitializePlugin routine. The reason for it being a template is simply a historical artifact.

Parameters
pluginthe MFnPlugin
Todo:
Move this code into uninitializePlugin
TransformOperation AL::usdmaya::xformOpToEnum ( const std::string &  opName)

Convert the textual name of a transformation operation into an easier to handle enum value.

Parameters
opName
Returns
the transform op enum