Interface: LoadSaveAnimation

The LoadSaveAnimation Core Interface provides access to the animation clip loading and saving feature. Available in 3ds Max 8 and higher.

 

Interface: LoadSaveAnimation

Methods:

<string>loadAnimationDlg()

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

<string>saveAnimationDlg()

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

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

nodeTab 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 nodeTab 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>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>loadAnimation <filename>fileName <&node array>nodeTab relative:<boolean> insert:<boolean> insertTime:<time> useMapFile:<boolean> mapFileName:<filename>

nodeTab 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>loadAnimationNodeAnim <filename>fileName <&node 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

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>createMapFile <filename>fileName <&node array>nodeTab <filename>incomingAnimationFile <&string array>userAttributes <&string array>userValues <&Interface array>retargetData nodeMapType:<enum> matchControllerExactName:<boolean> matchControllerType:<boolean>

nodeTab 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 nodes specified by the nodeTab by-reference array.

<boolean>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>makeRetargetData()

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

<boolean>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>getAnimFileExtension()

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

<string>getAnimMapFileExtension()

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

<filename>getAnimFileDirectory()

Returns the animation files path as filename.

<void>setAnimFileDirectory <filename>fileName

Sets the animation files path to the given file name.

<filename>getAnimMapFile()

Returns the animation map file as filename. Default return value is "Default".

<void>setAnimMapFile <filename>fileName

Sets the animation map file to the given file name.

<Interface by value array>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>setUpAnimsForLoad <&node array>nodesToSetup includePB2s:<boolean>

nodesToSetup is In and Out parameter

includePB2s default value: false

Prepares the specified nodes for animation loading.

<Interface by value array>setUpAnimsForMap <&node array>nodesToSetup

nodesToSetup is In and Out parameter

Prepares the specified nodes for mapping.

 

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

<MixinInterface:retargetData>

Interface: retargetData

Properties:

.currentNodeName : string : Read|Write

Get/set the name of the current node.

.incomingNodeName : string : Read|Write

Get/set the name of the incoming node.

.absolute : boolean : Read|Write

Enable/disable absolute/relative retargeting.

.scale : point3 : Read|Write

Get/set the retarget scale.

.currentBaseNodeName : string : Read|Write

Get/set the name of the current base node.

.incomingBaseNodeName : string : Read|Write

Get/set the name of the incoming base node.

.currentBaseChainNodeName : string : Read|Write

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

.currentEndChainNodeName : string : Read|Write

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

.incomingBaseChainNodeName : string : Read|Write

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

.incomingEndChainNodeName : string : Read|Write

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

.FKRetargetingEnabled : boolean : Read|Write

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

.FKBaseChainNodeName : string : Read|Write

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