Public Types

IBipMaster10 Class Reference

Search for all occurrences

Detailed Description

Interface into the biped master controller for Max 10.

This contains functions supporting new biped features in Max 10, in particular Xtras.

#include <Biped10Api.h>

Inheritance diagram for IBipMaster10:
Inheritance graph
[legend]

List of all members.

Public Types

enum   { kRETARGET_NONE = 1, kRETARGET_HEIGHT = 2, kRETARGET_LIMB = 3 }
enum   { kSAVE_NONE = 0, kSAVE_AUTOMATIC = 1, kSAVE_SPECIFIED = 2 }
enum   { kLOAD_NONE = 0, kLOAD_ALL = 1, kLOAD_SPECIFIED = 2 }

Public Member Functions

Xtras

Xtras are extra FK appendages on a biped.

You can have a maximum of MAXXTRAS Xtras. The following functions may be used to create, delete, and modify biped Xtras, and to paste Xtra copies.

virtual INode CreateXtra (int nlinks, const MCHAR *name)=0
  Creates an Xtra with the specified number of links and base name.
virtual INode CreateXtraOpposite (INode &xtra, bool doChildren)=0
  Creates Xtras which are the opposite of the specified Xtra and its children, if desired.
virtual INode GetXtraOpposite (INode &xtra)=0
  Gets the opposite Xtra.
virtual bool  DeleteXtra (INode &xtraBase)=0
  Deletes an Xtra.
virtual bool  AttachXtra (INode &xtraBase, INode &parent)=0
  Attaches an Xtra to a parent.
virtual void  SetXtraName (INode &xtraBase, const MCHAR *name)=0
  Sets the base name of an Xtra, and uses that to set the names of all the nodes in the Xtra.
virtual const MCHAR *  GetXtraName (INode &xtraBase)=0
  Gets the base name of an Xtra.
virtual bool  PastePostureToXtras (IBipedCopy *CP, INodeTab &nodes, int KeyPasteType)=0
  Pastes a copy of an Xtra posture onto each Xtra in the tab.
virtual bool  PasteTrackToXtras (IBipedCopy *CP, INodeTab &nodes)=0
  Pastes a copy of an Xtra track onto each Xtra in the tab.
Animation Layer I/O

The following functions may be used to load and save layers as BIP files.

virtual bool  SaveBipedAnimationLayer (const MCHAR *fname, int layerIndex)=0
  Saves a single layer of a biped animation.
virtual bool  LoadBipedAnimationLayer (const MCHAR *fname, int layerIndex)=0
  Loads a BIP file into a single layer of a biped animation.
virtual bool  SaveBipedBaseAnimationLayer (const MCHAR *fname, int saveMaxObjects, INodeTab *maxObjects, int saveControllers, Tab< SaveSubAnimInfo > *controllers)=0
  Saves the base layer of a biped animation.
virtual bool  LoadBipedBaseAnimationLayer (const MCHAR *fname, BOOL MatchFile, BOOL ZeroFootHeight, BOOL promptForDuplicates, int retargetType, BOOL scaleIKObjectSize, int loadMaxObjects, Tab< MCHAR * > *maxObjectNames, int loadControllers, Tab< LoadSubAnimInfo > *controllers)=0
  Loads a BIP file into the base layer of a biped animation.

Member Function Documentation

virtual INode* CreateXtra ( int  nlinks,
const MCHAR *  name 
) [pure virtual]

Creates an Xtra with the specified number of links and base name.

The base of the Xtra will be attached to the biped's center of mass.

Precondition:
must be in figure mode
See also:
BeginModes(BMODE_FIGURE)
Parameters:
[in] nlinks - the number of links in the new Xtra, between 1 and 25
[in] name - the base name of the Xtra. ! The name can be the empty string, and names do not have to be unique.
Returns:
the base node of the new Xtra if the creation was successful, NULL if the creation was unsuccessful
virtual INode* CreateXtraOpposite ( INode xtra,
bool  doChildren 
) [pure virtual]

Creates Xtras which are the opposite of the specified Xtra and its children, if desired.

The new Xtras will have the mirrored position, orientation, and hierarchy of the original Xtras. Xtras which already have opposites are ignored.

Precondition:
must be in figure mode
See also:
BeginModes(BMODE_FIGURE)
Parameters:
[in] xtra - an Xtra node
[in] doChildren - if true, opposites of all the Xtra's children are created in a matching hierarchy
Returns:
the base node of the opposite of the Xtra sent in if the creation was successful, NULL if the creation was unsuccessful
virtual INode* GetXtraOpposite ( INode xtra ) [pure virtual]

Gets the opposite Xtra.

Parameters:
[in] xtra - an Xtra node
Returns:
the opposite Xtra if there is one, NULL if there is no opposite
virtual bool DeleteXtra ( INode xtraBase ) [pure virtual]

Deletes an Xtra.

Precondition:
must be in figure mode
See also:
BeginModes(BMODE_FIGURE)
Parameters:
[in] xtrabase - the base node of the Xtra to delete
Returns:
true if the deletion was successful, false if not
virtual bool AttachXtra ( INode xtraBase,
INode parent 
) [pure virtual]

Attaches an Xtra to a parent.

Precondition:
must be in figure mode
See also:
BeginModes(BMODE_FIGURE)
Parameters:
[in] xtrabase - the base node of the Xtra to attach
[in] parent - the node which will become the Xtra's parent. The parent must be part of the same biped as the Xtra.
Returns:
true if the attach was successful, false if not
virtual void SetXtraName ( INode xtraBase,
const MCHAR *  name 
) [pure virtual]

Sets the base name of an Xtra, and uses that to set the names of all the nodes in the Xtra.

The first node in the Xtra will be called "name", the second "name01", the next "name02", and so forth.

Parameters:
[in] xtrabase - the base node of the Xtra
[in] name - the base name of the Xtra
virtual const MCHAR* GetXtraName ( INode xtraBase ) [pure virtual]

Gets the base name of an Xtra.

Parameters:
[in] xtrabase - the base node of the Xtra
Returns:
the base name of the Xtra
virtual bool PastePostureToXtras ( IBipedCopy CP,
INodeTab nodes,
int  KeyPasteType 
) [pure virtual]

Pastes a copy of an Xtra posture onto each Xtra in the tab.

Parameters:
[in] CP - a biped copy of type posture, which must be a copy of a single Xtra
[in] nodes - a tab of Xtras to paste to. The copied posture will be pasted onto the entire Xtra track, regardless of which links from the Xtra are in the tab.
[in] KeyPasteType - method to paste TCB/IK values, one of the following: PST_DEF (default), PST_COPY (copied), PST_INTERP (interpolated). KeyPasteType is only relevant if you are in auto key mode.
Returns:
true if the paste was successful, false if the paste was unsuccessful
virtual bool PasteTrackToXtras ( IBipedCopy CP,
INodeTab nodes 
) [pure virtual]

Pastes a copy of an Xtra track onto each Xtra in the tab.

Parameters:
[in] CP - a biped copy of type track, which must be a copy of a single Xtra
[in] nodes - a tab of Xtras to paste to. The copied track will be pasted onto the entire Xtra track, regardless of which links from the Xtra are in the tab.
Returns:
true if the paste was successful, false if the paste was unsuccessful
virtual bool SaveBipedAnimationLayer ( const MCHAR *  fname,
int  layerIndex 
) [pure virtual]

Saves a single layer of a biped animation.

Parameters:
[in] fname - the file name to save to - must be a valid path and filename
[in] layerIndex - the layer to save. The first layer is index one. A zero index will save the base layer without max objects or list controllers.
See also:
SaveBipedBaseAnimationLayer
Returns:
true if the save was successful, false if the save was unsuccessful
virtual bool LoadBipedAnimationLayer ( const MCHAR *  fname,
int  layerIndex 
) [pure virtual]

Loads a BIP file into a single layer of a biped animation.

If more than one layer is stored in the BIP file the load will be unsuccessful.

Precondition:
the layer must exist
Parameters:
[in] fname - the file to load - must be a valid path and filename
[in] layerIndex - the layer into which the animation will be loaded. The first layer is index one. A zero index will load into the base layer without max objects or list controllers.
See also:
LoadBipedBaseAnimationLayer
Returns:
true if the load was successful, false if the load was unsuccessful
virtual bool SaveBipedBaseAnimationLayer ( const MCHAR *  fname,
int  saveMaxObjects,
INodeTab maxObjects,
int  saveControllers,
Tab< SaveSubAnimInfo > *  controllers 
) [pure virtual]

Saves the base layer of a biped animation.

This is just like a regular BIP file save except that layers, if they exist, are not saved.

Parameters:
[in] fname - the file name to save to - must be a valid path and filename
[in] saveMaxObjects - When kSAVE_NONE, no max objects are saved. When kSAVE_AUTOMATIC, all IK, Head Target, and linked objects in the scene are saved, and the maxObjects array is ignored. When kSAVE_SPECIFIED, the max objects specified in the maxObjects array are saved.
[in] maxObjects - an array of nodes in the scene, to be saved only if saveMaxObjects equals SAVE_SPECIFIED. Biped nodes are always saved, regardless of whether they appear in this array or not.
[in] saveControllers - When kSAVE_NONE, no list controllers are saved. When kSAVE_AUTOMATIC, all animation controllers assigned to the biped are saved, and the controllers array is ignored. When kSAVE_SPECIFIED, the controllers specified in the controllers array are saved.
[in] controllers - an array of SaveSubAnimInfo specifying animation controllers, to be saved only if SaveListCntrls equals SAVE_SPECIFIED. Controllers not associated with Biped nodes are ignored.
Returns:
true if the save was successful, false if the save was unsuccessful
virtual bool LoadBipedBaseAnimationLayer ( const MCHAR *  fname,
BOOL  MatchFile,
BOOL  ZeroFootHeight,
BOOL  promptForDuplicates,
int  retargetType,
BOOL  scaleIKObjectSize,
int  loadMaxObjects,
Tab< MCHAR * > *  maxObjectNames,
int  loadControllers,
Tab< LoadSubAnimInfo > *  controllers 
) [pure virtual]

Loads a BIP file into the base layer of a biped animation.

If multiple layers are stored in the BIP file the load will be unsuccessful.

Parameters:
[in] fname - the file to load - must be a valid path and filename
[in] MatchFile - when true, the structure of the current biped is changed to match the structure in the BIP file
[in] ZeroFootHeight - when true, sets the lowest starting foot height to Z=0
[in] promptForDuplicates - When true, opens a Merge dialog for each object in the BIP file that has a duplicate in the scene. In this dialog, you can Merge, Skip, or Delete Old. If Prompt for Duplicates is off, the objects in your scene will be automatically overwritten.
[in] retargetType - method to retarget max objects to biped size, one of the following: RETARGET_NONE, RETARGET_HEIGHT, RETARGET_LIMB
See also:
RetargetType
Parameters:
[in] scaleIKObjectSize - when true, the imported objects are scaled in size to match the target biped
[in] loadMaxObjects - When kLOAD_NONE, no max objects are loaded. When kLOAD_ALL, all max objects stored in the BIP file are loaded, and the maxObjectNames array is ignored. When kLOAD_SPECIFIED, only the max objects specified in the maxObjectNames array and existing in the BIP file are loaded.
[in] maxObjectNames - an array of names of nodes stored in the BIP file
[in] loadControllers - When kLOAD_NONE, no list controllers are loaded. When kLOAD_ALL, all animation controllers stored in the BIP file are loaded, and the controllers array is ignored. When kLOAD_SPECIFIED, only the controllers specified in the controllers array and stored in the BIP file are loaded.
[in] controllers - an array of SaveSubAnimInfo specifying animation controllers stored in the BIP file
Returns:
true if the load was successful, false if the load was unsuccessful

IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10
IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10 IBipMaster10