Import and export animation curves in .anim format

 
 
 

Maya provides a plug-in for importing and exporting animation to a separate file. This facilitates copying animation from one scene to another. For example, you could animate a scene with a lightweight representation of a character and then transfer the animation to the final rendered version of the character in another file.

NoteFor best results, it's recommended that you import and export animation using the .atom format. See ATOM animation file format and Import and export with ATOM file format.

Import animation curves

Internally, the plug-in imports and exports to the API clipboard. As part of the import and export process, the plug-in executes the copyKey or pasteKey MEL commands to transfer the anim curves from the API clipboard to the Maya objects. Using the plug-in will not change the contents of the Maya animation clipboard.

Import lets you set the same options as Edit > Keys > Paste Keys which are used when the animation is applied to the selected object(s).

To import anim curves

  1. Make sure the animImportExport plug-in is loaded.
  2. Select the Maya objects to be animated.
  3. Select File > Import.
  4. Select the .anim file to import.

Export animation curves

Exporting anim curves uses the copyKey MEL command to copy the keys to the API clipboard and then exports the clipboard contents to the anim file. The entire operation is contained in the file export.

Note

Since MEL commands are used, any limitations they have are also limitations of the plug-in. For example, if an anim curve is upstream from an attribute, but there are blend nodes in-between the attribute and the anim curve, the export command will not work.

The File > Export Selection options window lets you set the same options as Edit > Keys > Copy Keys which are used to export the animation from the selected object(s).

When an anim file is exported, any information previously on the API clipboard is replaced with the new anim curves after the file export.

To export anim curves

  1. Load the animImportExport plug-in.
  2. Select the Maya objects to export animation from.
  3. Select File > Export All or File > Export Selection.
  4. Set the file type to animExport.
  5. Enter or select the .anim file to export.

Related topics