A utility class to help with exporting animated plugs from maya.
More...
#include <AnimationTranslator.h>
|
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 | addTransformPlug (const MPlug &plug, const UsdAttribute &attribute, const bool assumeExpressionIsAnimated) |
| add a transform plug to the animation translator (if the plug is animated) More...
|
|
void | forceAddTransformPlug (const MPlug &plug, const UsdAttribute &attribute) |
| add a transform plug to the animation translator (if the plug is animated) More...
|
|
void | forceAddPlug (const MPlug &plug, const UsdAttribute &attribute, const float scale) |
| add a scaled plug to the animation translator (if the plug is animated) More...
|
|
void | forceAddPlug (const MPlug &plug, const UsdAttribute &attribute) |
| add an animated plug to the animation translator (if the plug is animated) More...
|
|
void | addMesh (const MDagPath &path, const UsdAttribute &attribute) |
| add a mesh to the animation translator More...
|
|
AL_USDMAYA_PUBLIC void | exportAnimation (const ExporterParams ¶ms) |
| After the scene has been exported, call this method to export the animation data on various attributes. More...
|
|
void | addCustomAnimNode (translators::TranslatorBase *translator, MDagPath dagPath, UsdPrim usdPrim) |
| insert a prim into the anim translator for custom anim export. More...
|
|
|
static bool | isAnimated (const MObject &node, const MObject &attr, const bool assumeExpressionIsAnimated=true) |
| returns true if the attribute is animated More...
|
|
static AL_USDMAYA_PUBLIC bool | isAnimated (MPlug attr, bool assumeExpressionIsAnimated=true) |
| returns true if the attribute is animated More...
|
|
static AL_USDMAYA_PUBLIC bool | isAnimatedMesh (const MDagPath &mesh) |
| returns true if the mesh is animated More...
|
|
static AL_USDMAYA_PUBLIC bool | isAnimatedTransform (const MObject &transformNode) |
| returns true if the transform node is animated More...
|
|
A utility class to help with exporting animated plugs from maya.
void AL::usdmaya::fileio::AnimationTranslator::addCustomAnimNode |
( |
translators::TranslatorBase * |
translator, |
|
|
MDagPath |
dagPath, |
|
|
UsdPrim |
usdPrim |
|
) |
| |
|
inline |
insert a prim into the anim translator for custom anim export.
- Parameters
-
translator | the plugin translator to handle the export of anim data for the node |
dagPath | the maya dag path for the maya object to export |
usdPrim | the prim to write the data into |
void AL::usdmaya::fileio::AnimationTranslator::addMesh |
( |
const MDagPath & |
path, |
|
|
const UsdAttribute & |
attribute |
|
) |
| |
|
inline |
add a mesh to the animation translator
- Parameters
-
path | the path to the animated maya mesh |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated |
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
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated |
assumeExpressionIsAnimated | if 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
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated |
scale | a scale to apply to convert units if needed |
assumeExpressionIsAnimated | if we encounter an expression, assume that the attribute is animated (true) or static (false). |
void AL::usdmaya::fileio::AnimationTranslator::addTransformPlug |
( |
const MPlug & |
plug, |
|
|
const UsdAttribute & |
attribute, |
|
|
const bool |
assumeExpressionIsAnimated |
|
) |
| |
|
inline |
add a transform plug to the animation translator (if the plug is animated)
- Parameters
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated attribute can't be handled by generic DgNodeTranslator |
assumeExpressionIsAnimated | if we encounter an expression, assume that the attribute is animated (true) or static (false). |
AL_USDMAYA_PUBLIC 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
-
void AL::usdmaya::fileio::AnimationTranslator::forceAddPlug |
( |
const MPlug & |
plug, |
|
|
const UsdAttribute & |
attribute, |
|
|
const float |
scale |
|
) |
| |
|
inline |
add a scaled plug to the animation translator (if the plug is animated)
- Parameters
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated attribute can't be handled by generic DgNodeTranslator |
scale | a scale to apply to convert units if needed |
void AL::usdmaya::fileio::AnimationTranslator::forceAddPlug |
( |
const MPlug & |
plug, |
|
|
const UsdAttribute & |
attribute |
|
) |
| |
|
inline |
add an animated plug to the animation translator (if the plug is animated)
- Parameters
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated attribute can't be handled by generic DgNodeTranslator |
void AL::usdmaya::fileio::AnimationTranslator::forceAddTransformPlug |
( |
const MPlug & |
plug, |
|
|
const UsdAttribute & |
attribute |
|
) |
| |
|
inline |
add a transform plug to the animation translator (if the plug is animated)
- Parameters
-
plug | the maya attribute to test |
attribute | the corresponding maya attribute to write the anim data into if the plug is animated attribute can't be handled by generic DgNodeTranslator |
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
-
node | the node which contains the attribute to test |
attr | the attribute handle |
assumeExpressionIsAnimated | if we encounter an expression, assume that the attribute is animated (true) or static (false). |
- Returns
- true if the attribute was found to be animated This test only covers the situation that your attribute is actually animated by some types of nodes, e.g. animCurves or expression, or source attribute's full-name match a certain string. But in reality the control network might be really complicated and heavily customized thus it might go far beyond the situation we can cover here.
static AL_USDMAYA_PUBLIC bool AL::usdmaya::fileio::AnimationTranslator::isAnimated |
( |
MPlug |
attr, |
|
|
bool |
assumeExpressionIsAnimated = true |
|
) |
| |
|
static |
returns true if the attribute is animated
- Parameters
-
attr | the attribute to test |
assumeExpressionIsAnimated | if we encounter an expression, assume that the attribute is animated (true) or static (false). |
- Returns
- true if the attribute was found to be animated This test only covers the situation that your attribute is actually animated by some types of nodes, e.g. animCurves or expression, or source attribute's full-name match a certain string. But in reality the control network might be really complicated and heavily customized thus it might go far beyond the situations we can cover here.
static AL_USDMAYA_PUBLIC bool AL::usdmaya::fileio::AnimationTranslator::isAnimatedMesh |
( |
const MDagPath & |
mesh | ) |
|
|
static |
returns true if the mesh is animated
- Parameters
-
- Returns
- true if the mesh was found to be animated This test only covers the situation that your node / upstream nodes are actually animated by animCurves. But in reality the control network might be really complicated and heavily customized thus it might go far beyond the situations we can cover here.
static AL_USDMAYA_PUBLIC bool AL::usdmaya::fileio::AnimationTranslator::isAnimatedTransform |
( |
const MObject & |
transformNode | ) |
|
|
static |
returns true if the transform node is animated
- Parameters
-
transformNode | the transform node to test |
- Returns
- true if the transform was found to be animated It roughly tests a list of common transform attributes, translate, rotate, rotateOrder and scale, if any of those attributes is connected as destination, we take the transform node as animated. This test will be performed recursively up to parent hierarchies, unless the inheritsTransform attribute is turned off.
The documentation for this class was generated from the following file: