2 #include "AL/usdmaya/fileio/translators/DgNodeTranslator.h"
4 #include "maya/MPlug.h"
8 #include "pxr/usd/usd/stage.h"
14 typedef std::pair<MPlug, UsdAttribute> PlugAttrPair;
15 typedef std::vector<PlugAttrPair> PlugAttrVector;
16 typedef std::pair<PlugAttrPair, float> PlugAttrScaledPair;
17 typedef std::vector<PlugAttrScaledPair> PlugAttrScaledVector;
31 static bool isAnimated(
const MObject& node,
const MObject& attr,
const bool assumeExpressionIsAnimated =
true)
32 {
return isAnimated(MPlug(node, attr), assumeExpressionIsAnimated); }
39 static bool isAnimated(MPlug attr,
bool assumeExpressionIsAnimated =
true);
46 inline void addPlug(
const MPlug& plug,
const UsdAttribute& attribute,
const bool assumeExpressionIsAnimated)
48 if(
isAnimated(plug, assumeExpressionIsAnimated))
49 m_animatedPlugs.emplace_back(std::make_pair(plug, attribute));
58 inline void addPlug(
const MPlug& plug,
const UsdAttribute& attribute,
const float scale,
const bool assumeExpressionIsAnimated)
60 if(
isAnimated(plug, assumeExpressionIsAnimated))
61 m_scaledAnimatedPlugs.emplace_back(std::make_pair(std::make_pair(plug, attribute), scale));
69 PlugAttrVector m_animatedPlugs;
70 PlugAttrScaledVector m_scaledAnimatedPlugs;
parameters for the exporter. These parameters are constructed by any command or file translator that ...
Definition: ExportParams.h:17
static bool isAnimated(const MObject &node, const MObject &attr, const bool assumeExpressionIsAnimated=true)
returns true if the attribute is animated
Definition: AnimationTranslator.h:31
void exportAnimation(const ExporterParams ¶ms)
After the scene has been exported, call this method to export the animation data on various attribute...
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)
Definition: AnimationTranslator.h:58
void addPlug(const MPlug &plug, const UsdAttribute &attribute, const bool assumeExpressionIsAnimated)
add a plug to the animation translator (if the plug is animated)
Definition: AnimationTranslator.h:46
A utility class to help with exporting animated plugs from maya.
Definition: AnimationTranslator.h:23