MoFlow : MaxWrapper

This class can be used to access features in the Biped Motion Flow panel. An instance of this class is returned by the .motionFlow property of a Biped Body Controller.

Properties

<moflow>.scripts Array Default: #()

-- Read-only

An array of motion flow scripts (MoFlowScript values).

A Script is a list of clips (.bip files) that are executed sequentially to animate a character.

<moflow>.activeScript MoFlowScript Default:undefined

Get/set which MoFlowScript in scripts array is the active script. If the specified MoFlowScript is not in the scripts array, no action occurs.

<moflow>.snippets Array Default: #()

-- Read-only

An array of motion flow snippets (MoFlowSnippet values).

<moflow>.selSnippets BitArray Default: #{}

A bitarray specifying the motion flow snippets that are selected in the Motion Flow Graph.

<moflow>.startFrame Integer Default: 0

-- Read-only

The start frame of currently active motion flow script.

<moflow>.endFrame Integer Default: 0

-- Read-only

The last frame of currectly active motion flow script.

Methods

loadMoFlowFile <moflow> <file_name> [ quiet:<boolean> ]

Load a Motion Flow Editor file (.mfe). Motion Flow Editor files include:

Clips: references to biped animation files.

Transitions: The names, attributes, and connections between clips.

Scripts: different paths through a set of connected clips and transitions.

If quiet:true, which is the default, any warning message dialogs are suppressed.

saveMoFlowFile <moflow> <file_name>

Save a Motion Flow Editor file (.mfe).

Load/Save a motion flow (.MFE) file.

Note

The location of the referenced .bip files is saved in the .mfe file. If the .bip file cannot be found, the program looks to the motion flow directory specified in \plugcfg\biped.ini. By default, this setting is MoFlowDir=<maxdir>\cstudio\scripts

If a referenced .bip file cannot be found in its current location, you will need to move it to the specified Motion Flow directory. You can change the location of this directory at any time by editing your biped.ini file with a text editor. The new directory will be used the next time you restart 3ds Max. You can also add multiple search paths to your biped.ini file by repeating the MoFloDir= line multiple times. The program will search the directories in the order they appear and will use the first instance of the file that it finds.

loadSnippetFiles <moflow>

Loads the snippet files whose file names are assigned. This function should be called whenever new snippets are added.

Clips represent all or part of a .bip file.

addScript <moflow> <name>

Scripts represent different paths through the clips in the Motion Flow Graph.

Creates a new motion flow script with the given name and adds it to the motion flow. Returns the new MoFlowScript.

deleteScript <moflow> <MoFlowScript>

deleteScript <moflow> <index_integer>

Deletes the specified script. If the second argument is an integer, the script deleted is the indexed script in the motion flow’s .scripts array.

Note:

deleteScript sets the active script to the first script. To maintain the current active script store and set <motionflow>.activeScript around the call to deleteScript.

getScriptIndex <moflow> <MoFlowScript>

Given the script, returns its index in the script’s combobox.

getSnippetIndex <moflow> <MoFlowSnippet>

Given the snippet, returns its index in the in the motion flow’s .snippets array.

computeAnimation <moflow> [redraw:<true>] [incGlobals:<false>]

Computes the global flow network. This function has to be called to update any changes made to the motion flow network. redraw:true will redraw the viewports. incGlobals:true will also include the global motion flow network.

Related Methods

newSnippet <moflow> <filename> <point2_pos> <redraw:true> <load:true>

Adds a new MoFlowSnippet to the motion flow network, from the given .bip file. <point2_pos> is the position in windows coordinates where the origin is the top left of the snippet in the motion flow graph. Redraw:true will redraw the graph window. Load:true will immediately load the snippet

See also

Biped Controllers

MoFlowScript : MaxWrapper

MoFlowSnippet : MaxWrapper

Biped MAXScript Extensions

MAXScript Extensions in character studio