AL_USDMaya  0.16.6
USD to Maya Bridge
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AL::usdmaya::fileio::AnimationTranslator Struct Reference

A utility class to help with exporting animated plugs from maya. More...

#include <AnimationTranslator.h>

Public Member Functions

void addPlug (const MPlug &plug, const UsdAttribute &attribute, const bool assumeExpressionIsAnimated)
 add a plug to the animation translator (if the plug is animated) More...
 
void addPlug (const MPlug &plug, const UsdAttribute &attribute, const float scale, const bool assumeExpressionIsAnimated)
 add a plug to the animation translator (if the plug is animated) More...
 
void exportAnimation (const ExporterParams &params)
 After the scene has been exported, call this method to export the animation data on various attributes. More...
 

Static Public Member Functions

static bool isAnimated (const MObject &node, const MObject &attr, const bool assumeExpressionIsAnimated=true)
 returns true if the attribute is animated More...
 
static bool isAnimated (MPlug attr, bool assumeExpressionIsAnimated=true)
 returns true if the attribute is animated More...
 

Detailed Description

A utility class to help with exporting animated plugs from maya.

Member Function Documentation

void AL::usdmaya::fileio::AnimationTranslator::addPlug ( const MPlug &  plug,
const UsdAttribute &  attribute,
const bool  assumeExpressionIsAnimated 
)
inline

add a plug to the animation translator (if the plug is animated)

Parameters
plugthe maya attribute to test
attributethe corresponding maya attribute to write the anim data into if the plug is animated
assumeExpressionIsAnimatedif we encounter an expression, assume that the attribute is animated (true) or static (false).
void AL::usdmaya::fileio::AnimationTranslator::addPlug ( const MPlug &  plug,
const UsdAttribute &  attribute,
const float  scale,
const bool  assumeExpressionIsAnimated 
)
inline

add a plug to the animation translator (if the plug is animated)

Parameters
plugthe maya attribute to test
attributethe corresponding maya attribute to write the anim data into if the plug is animated
scalea scale to apply to convert units if needed
assumeExpressionIsAnimatedif we encounter an expression, assume that the attribute is animated (true) or static (false).
void AL::usdmaya::fileio::AnimationTranslator::exportAnimation ( const ExporterParams params)

After the scene has been exported, call this method to export the animation data on various attributes.

Parameters
paramsthe export options
static bool AL::usdmaya::fileio::AnimationTranslator::isAnimated ( const MObject &  node,
const MObject &  attr,
const bool  assumeExpressionIsAnimated = true 
)
inlinestatic

returns true if the attribute is animated

Parameters
nodethe node which contains the attribute to test
attrthe attribute handle
assumeExpressionIsAnimatedif we encounter an expression, assume that the attribute is animated (true) or static (false).
Returns
true if the attribute was found to be animated
static bool AL::usdmaya::fileio::AnimationTranslator::isAnimated ( MPlug  attr,
bool  assumeExpressionIsAnimated = true 
)
static

returns true if the attribute is animated

Parameters
attrthe attribute to test
assumeExpressionIsAnimatedif we encounter an expression, assume that the attribute is animated (true) or static (false).
Returns
true if the attribute was found to be animated

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