Interface: LoadSaveAnimation

Interfaces > Core Interfaces > LoadSaveAnimation

 

   

Core Interfaces - Quick Navigation

The LoadSaveAnimation Core Interface provides access to the animation clip loading and saving feature.

Available in 3ds Max 8 and higher.

   

Interface: LoadSaveAnimation 

Methods:

<filename>LoadSaveAnimation.loadAnimationDlg()   

Opens the Load Animation dialog.

Returns the filename of the selected file, or undefined if the dialog was canceled.

   

<filename>LoadSaveAnimation.saveAnimationDlg() 

Opens the Save Animation dialog.

Returns the filename of the selected file, or undefined if the dialog was canceled.

   

<boolean>LoadSaveAnimation.saveAnimation <filename>fileName <&node array>nodes <&string array>userAttributes <&string array>userValues animatedTracks:<boolean> includeConstraints:<boolean> keyableTracks:<boolean> saveSegment:<boolean> segInterval:<interval by value> segKeyPerFrame:<boolean> 

nodes is In and Out parameter 
userAttributes is In and Out parameter 
userValues is In and Out parameter 
animatedTracks default value: true 
includeConstraints default value: true 
keyableTracks default value: false 
saveSegment default value: false 
segInterval default value: (interval 0f 0f) 
segKeyPerFrame default value: false 

Saves the animation of the nodes specified by the nodes by-reference array to the specified filename, adding the supplied user attributes and user values from the by-reference string arrays.

The optional keyword parameters correspond to the options found in the Save Animation dialog.

   

<boolean>LoadSaveAnimation.saveAnimationNodeAnim <filename>fileName <&Interface array>nodeAnims <&string array>userAttributes <&string array> userValues animatedTracks: <boolean> includeConstraints:<boolean> keyableTracks:<boolean> saveSegment:<boolean> segInterval:<inteval by value> segKeyPerFrame:<boolean> 

nodeAnims is In and Out parameter 
userAttributes is In and Out parameter 
userValues is In and Out parameter 
animatedTracks default value: true 
includeConstraints default value: true 
keyableTracks default value: false 
saveSegment default value: false 
segInterval default value: (interval 0f 0f) 
segKeyPerFrame default value: false 

Saves the animation of the node anims specified by the by-reference array of interfaces to the specified filename, adding the supplied user attributes and user values from the by-reference string arrays.

The optional keyword parameters correspond to the options found in the Save Animation dialog.

   

<boolean>LoadSaveAnimation.loadAnimation <filename>fileName <&node array>nodes relative:<boolean> insert:<boolean> insertTime:<time> stripLayers:<boolean> useMapFile:<boolean> mapFileName:<filename> 

nodes is In and Out parameter 
relative default value: true 
insert default value: false 
insertTime default value: 0f 
useMapFile default value: false 
mapFileName default value: undefined 

Loads the animation from the specified filename to the nodes specified by the nodeTab by-reference array.

The optional keyword parameters correspond to the options found in the Load Animation dialog.

   

<boolean>LoadSaveAnimation.loadAnimationNodeAnim <filename>fileName <&Interface array>nodeAnims relative:<boolean> insert:<boolean> insertTime:<time> useMapFile:<boolean> mapFileName:<filename> 

nodeAnims is In and Out parameter 
relative default value: true 
insert default value: false 
insertTime default value: 0f 
stripLayers default value: false 
useMapFile default value: false 
mapFileName default value: undefined 

Loads the animation from the specified filename to the nodeAnims specified by the by-reference array.

The optional keyword parameters correspond to the options found in the Load Animation dialog.

   

<boolean>LoadSaveAnimation.createMapFile <filename>fileName <&node array>nodes <filename>incomingAnimationFile <&string array>userAttributes <&string array>userValues <&Interface array>retargetData nodeMapType:<enum> matchControllerExactName:<boolean> matchControllerType:<boolean> stripLayers:<boolean> 

nodes is In and Out parameter 
userAttributes is In and Out parameter 
userValues is In and Out parameter 
retargetData is In and Out parameter 
nodeMapType enums: {#matchExactNodeName|#matchClosestNodeName|#matchNodeHierarchy} 
nodeMapType default value: #matchClosestNodeName 
matchControllerExactName default value: true 
matchControllerType default value: false 
stripLayers default value: false 

Creates a map file with the given filename using the nodes specified by the by-reference array.

   

<boolean>LoadSaveAnimation.createMapFileNodeAnim <filename>fileName <&Interface array>nodeAnims <filename>incomingAnimationFile <&string array>userAttributes <&string array>userValues <&Interface array>retargetData nodeMapType:<enum> matchControllerExactName:<boolean> matchControllerType:<boolean> 

nodeAnims is In and Out parameter 
userAttributes is In and Out parameter 
userValues is In and Out parameter 
retargetData is In and Out parameter 
nodeMapType enums: {#matchExactNodeName|#matchClosestNodeName|#matchNodeHierarchy} 
nodeMapType default value: #matchClosestNodeName 
matchControllerExactName default value: true 
matchControllerType default value: false 

Creates a map file with the given filename using the nodeAnims specified by the by-reference array of interfaces.

   

<Interface>LoadSaveAnimation.makeRetargetData() 

Returns a retargetData [Mixin Interface] which can be used in the LoadSaveAnimation.createMapFile() method. See bottom of this page for details.

   

<boolean>LoadSaveAnimation.getUserAttributes <filename>fileName <&TSTR array>userAttributes <&TSTR array>userValues 

userAttributes is In and Out parameter 
userValues is In and Out parameter 

Reads the user attributes and user values from the specified XAF file and writes them into the userAttributes and userValues by-reference string arrays. Returns true on success, false otherwise.

   

<string>LoadSaveAnimation.getAnimFileExtension() 

Returns the animation format's file extension as string. Default value returned is "xaf".

   

<string>LoadSaveAnimation.getAnimMapFileExtension() 

Returns the map format's file extension as string. Default value returned is "xmm".

   

<filename>LoadSaveAnimation.getAnimFileDirectory() 

Returns the animation files path as filename.

   

<void>LoadSaveAnimation.setAnimFileDirectory <filename>fileName 

Sets the animation files path to the given file name.

   

<filename>LoadSaveAnimation.getAnimMapFile() 

Returns the animation map file asfilename. Default return value is "Default".

   

<void>LoadSaveAnimation.setAnimMapFile <filename>fileName 

Sets the animation map file to the given file name.

   

<Interface by value array>LoadSaveAnimation.setUpAnimsForSave <&node array>nodesToSetup animatedTracks:<boolean> includeContraints:<boolean> keyable:<boolean> 

nodesToSetup is In and Out parameter 
animatedTracks default value: true 
includeContraints default value: true 
keyable default value: false 

Prepares the specified nodes for animation saving.

   

<Interface by value array>LoadSaveAnimation.setUpAnimsForLoad <&node array>nodesToSetup includePB2s:<boolean> stripLayers:<boolean> 

nodesToSetup is In and Out parameter 
includePB2s default value: false 
stripLayers default value: false 

Prepares the specified nodes for animation loading.

   

<Interface by value array>LoadSaveAnimation.setUpAnimsForMap <&node array>nodesToSetup stripLayers:<boolean> 

nodesToSetup is In and Out parameter 
stripLayers default value: false 

Prepares the specified nodes for mapping.

   

<boolean>LoadSaveAnimation.replaceAttributesInMapFile <filename>mapFileName <filename>newMapFileName <&TSTR array>oldStrings <&TSTR array>newStrings <boolean>mapName 

oldStrings is In and Out parameter 
newStrings is In and Out parameter 

Replaces attributes specified by oldStrings from the file mapFileName with the attributes specified by newStrings and creates a file named according to newMapFileName.

Available in 3ds Max 2008 and higher.

   

<boolean>LoadSaveAnimation.createDefaultMapFile <&node array>nodes <filename>mapFileName 

nodes is In and Out parameter 

Creates a default map file with the name provided as second argument out of the the nodes given as first argument.

Available in 3ds Max 2008 and higher.

   

<void>LoadSaveAnimation.createNodeAnimsForLoad <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims 

anims is In and Out parameter 
clients is In and Out parameter 
subNums is In and Out parameter 
nodeAnims is In and Out parameter 

Creates node anims for loading. Available in 3ds Max 2008 and higher.

   

<void>LoadSaveAnimation.createNodeAnimsForSave <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims 

anims is In and Out parameter 
clients is In and Out parameter 
subNums is In and Out parameter 
nodeAnims is In and Out parameter 

Creates node anims for saving. Available in 3ds Max 2008 and higher.

   

<void>LoadSaveAnimation.createNodeAnimsForMap <&maxObject array>anims <&maxObject array>clients <&maxObject array>subNums <&Interface array>nodeAnims 

anims is In and Out parameter 
clients is In and Out parameter 
subNums is In and Out parameter 
nodeAnims is In and Out parameter 

Creates node anims for mapping. Available in 3ds Max 2008 and higher.

   

<filename>LoadSaveAnimation.loadAnimationDlgFromAnims <&maxObject array>anims <&maxObject array>clients <&integer array>subNums 

anims is In and Out parameter 
clients is In and Out parameter 
subNums is In and Out parameter 

Opens a Load Animation Dialog using the provided Anims. Available in 3ds Max 2008 and higher.

   

<filename>LoadSaveAnimation.saveAnimationDlgFromAnims <&maxObject array>anims <&maxObject array>clients <&integer array>subNums 

anims is In and Out parameter 
clients is In and Out parameter 
subNums is In and Out parameter 

Opens a Save Animation Dialog using the provided Anims. Available in 3ds Max 2008 and higher.

The following [Mixin Interface] can be used to create the elements of the retarget data array required by the LoadSaveAnimation.createMapFile() method:

<MixinInterface:retargetData>

Interface: retargetData 

Properties:

<MixinInterface:retargetData>.currentNodeName : string : Read|Write 

Get/set the name of the current node.

   

<MixinInterface:retargetData>.incomingNodeName : string : Read|Write 

Get/set the name of the incoming node.

   

<MixinInterface:retargetData>.absolute : boolean : Read|Write 

Enable/disable absolute/relative retargeting.

   

<MixinInterface:retargetData>.scale : point3 : Read|Write 

Get/set the retarget scale.

   

<MixinInterface:retargetData>.currentBaseNodeName : string : Read|Write 

Get/set the name of the current base node.

   

<MixinInterface:retargetData>.incomingBaseNodeName : string : Read|Write 

Get/set the name of the incoming base node.

   

<MixinInterface:retargetData>.currentBaseChainNodeName : string : Read|Write 

Get/set the name of the current base chain node.

   

<MixinInterface:retargetData>.currentEndChainNodeName : string : Read|Write 

Get/set the name of the current end chain node.

   

<MixinInterface:retargetData>.incomingBaseChainNodeName : string : Read|Write 

Get/set the name of the incoming base chain node.

   

<MixinInterface:retargetData>.incomingEndChainNodeName : string : Read|Write 

Get/set the name of the incoming end chain node.

   

<MixinInterface:retargetData>.FKRetargetingEnabled : boolean : Read|Write 

Enable/disable FK Retargeting. When set to true, FK Retargeting will be enabled.

   

<MixinInterface:retargetData>.FKBaseChainNodeName : string : Read|Write 

Get/set the name of the FK base chain node.