This reference page is linked to from the following overview topics: MotionBuilder 2014, FBComponent - The Base Entity Class, FBCharacter - Characters, FBPose - Poses, Character animation, Motion Capture Devices.
A character is the link between a motion source and a character model.
These classes are under development and may change dramatically between versions. This class exposes part of the functionality associated with a Character. A character can possess a number of potential sources at the same time, such as an actor and another character, but with only one active at any given time. Before setting the InputType to the desired value, one must make sure to have previously set either the InputCharacter or the InputActor.
To obtain the list of characters present in a scene, you need to create an instance of class FBSystem, to obtain the current scene. The FBScene object holds the list of characters in the property Characters.
FBSystem lSystem; FBScene* lScene = lSystem.Scene; for( int lIdx = 0; lIdx < lScene->Characters.GetCount(); ++lIdx ) { FBTrace( "Character[%d]: '%s'\n", lIdx, (char*)lScene->Characters[lIdx] ); }
The current character selected in the Character tool can be obtained via the FBApplication object.
FBApplication lApplication; FBCharacter* lCharacter = lApplication.CurrentCharacter; if( lCharacter ) { FBTrace( "Current character is: '%s'\n", (char*)lCharacter->Name ); } else { FBTrace( "No character currently selected\n" ); }
Definition at line 1108 of file fbcharacter.h.
#include <fbcharacter.h>
Public Member Functions | |
FBCharacter (const char *pName, HIObject pObject=NULL) | |
Constructor. | |
IObject_Declare (K_IMPLEMENTATION) | |
virtual void | FBDelete () |
Actual Character destructor. | |
FBCharacter * | Clone () |
Clone the character. | |
void | AddCharacterExtension (FBCharacterExtension *pExt) |
AddCharacterExtension. | |
void | RemoveCharacterExtension (FBCharacterExtension *pExt) |
Get the model associated with each body part of the character. | |
FBModel * | GetModel (FBBodyNodeId pBodyNodeId) |
Get the model associated with each body part of the character. | |
void | GetSkinModelList (FBModelList &pSkinModelList) |
Get the skin model associated with character bones. | |
FBBodyNodeId | GetIndexByModel (FBModel *pModel) |
Get the index associated with Given Model. | |
FBModel * | GetCtrlRigModel (FBBodyNodeId pBodyNodeId) |
Get the model associated with each body part in the Control Rig of the character. | |
FBBodyNodeId | GetCtrlRigIndexByModel (FBModel *pModel) |
Get the index of the model associated with each body part in the Control Rig of the character. | |
FBModel * | GetEffectorModel (FBEffectorId pEffectorId, FBEffectorSetID pEffectorSetID=FBEffectorSetDefault) |
Get the model associated with each effector in the Control Rig of the character. | |
FBModel * | GetFloorContactModel (FBFloorContactID pMemberIndex) |
Get the model associated with the floor contact ID. | |
FBModel * | GetGoalModel (FBBodyNodeId pBodyNodeId) |
Get the goal model associated with each body part in the Character Marker Set of the character. | |
void | GetTOffset (FBBodyNodeId pBodyNodeId, FBTVector *pTVector) |
void | GetROffset (FBBodyNodeId pBodyNodeId, FBRVector *pRVector) |
void | GetSOffset (FBBodyNodeId pBodyNodeId, FBSVector *pSVector) |
void | GetTransformOffset (FBBodyNodeId pBodyNodeId, FBMatrix *pOffsetMatrix) |
void | GetParentROffset (FBBodyNodeId pBodyNodeId, FBRVector *pRVector) |
virtual bool | PlotAnimation (FBCharacterPlotWhere pPlotWhere, FBPlotOptions *pPlotOptions) |
Plot the animation of the character. | |
bool | ReadyForRetarget () |
Test if character is ready for the Retarget operation (basically, is it in character input ?). | |
void | Retarget (bool pOnBaseLayer) |
Retarget the animation from the input character to us. | |
void | CopyAnimation () |
Copy the animation from the input character to us. | |
virtual void | ResetProperties (FBCharacterResetProperties pType) |
Reset the properties of the character. | |
void | SelectModels (bool pSelect, bool pApplyToCharacter, bool pApplyToRig, bool pApplyToExtensions) |
Select the objects that make a character. | |
void | GoToStancePose (bool pPushUndo=false, bool pIncludeCharacterExtensions=true) |
Set the character in stance pose. | |
bool | SetCharacterizeOn (bool pSetAsBiped) |
Set the Characterize flag on. | |
const char * | GetCharacterizeError () |
Get error message for the previous SetCharacterizeOn operation. | |
void | SetCharacterizeOff () |
Set Characterize flag off. | |
bool | GetCharacterize () |
Get Characterize flag. | |
bool | CreateControlRig (bool pSetFKIK) |
Create the Control-Rig. | |
void | ConnectControlRig (FBControlSet *pControlSet, bool pUpdateLimit, bool pResetHierarchy) |
Connect a Control-Rig to the character. | |
void | DisconnectControlRig () |
Disconnect the Control-Rig from the character. | |
bool | CreateAuxiliary (FBEffectorId pEffectorId, bool pPivot, double pAuxReachT=100, double pAuxReachR=100) |
Create auxiliary on effector. | |
FBControlSet * | GetCurrentControlSet (bool pForce=false) |
Obtain Input ControlSet. | |
bool | CreateCharacterMarkerSet (bool pSetActive) |
Create the Character Marker Set. | |
FBCharacterMarkerSet * | GetCharacterMarkerSet (bool pForce=false) |
Obtain Input CharacterMarkerSet. | |
bool | IsParentNodeOffset (FBBodyNodeId pNodeId) |
Check if there is an offset on Parent. | |
FBCharacterSolver * | GetExternalSolver () |
Get a pointer to the external solver of a character, or NULL is no external solver is used on the character. | |
void | SetExternalSolver (int pIndex) |
Set character external solver. | |
void | SetExternalSolver (FBCharacterSolver *pSolver) |
Set character solver. | |
void | GetActiveBodyPart (bool *pActivePart) |
Get the active body part array. | |
bool | IsRotationPin (FBEffectorId pEffectorIndex) |
Return true if the object is Pinned in Rotation (Manipulation). | |
bool | IsTranslationPin (FBEffectorId pEffectorIndex) |
Return true if the object is Pinned in Translation (Manipulation). | |
bool | IsCtrlSetReady () |
Return true Ctrl Set is Ready to be used. | |
bool | IsPlottingActorToCtrlRig () |
Return true if the Actor is currently being plot to the Control Rig. | |
FBControlSetState * | GetControlSetEvaluationCache (FBEvaluateInfo *pEvaluateInfo) |
Return pointer to evaluation cache that is dedicated for control set and given pEvaluateInfo. | |
FBEffectorSetState * | GetEffectorEvaluationCache (FBEvaluateInfo *pEvaluateInfo) |
Return pointer to evaluation cache that is dedicated for effector set and given pEvaluateInfo. | |
Public Attributes | |
FBPropertyCharacterInputType | InputType |
Read Write Property: The input type for the character (ex: Actor). | |
FBPropertyCharacterKeyingMode | KeyingMode |
Read Write Property: The current keying mode. | |
FBPropertyActor | InputActor |
Read Write Property: The index of the actor used for the input. | |
FBPropertyCharacter | InputCharacter |
Read Write Property: The index of the character used for the input. | |
FBPropertyBool | ActiveInput |
Read Write Property: Is the character input active? | |
FBPropertyListCharacterExtension | CharacterExtensions |
List: Character Extensions in the character. | |
FBString | mCharacterizeError |
Used to store SetCharacterizeOn errors and warnings. | |
FBPropertyBool | MirrorMode |
Read Write Property: is in mirror mode. | |
FBPropertyAnimatableDouble | ShoulderCorrection |
Read Write Property: shoulder correction values. | |
FBPropertyBool | LeftKneeKillPitch |
Read Write Property: is Pitch used for Left knee. | |
FBPropertyBool | RightKneeKillPitch |
Read Write Property: is Pitch used for Right knee. | |
FBPropertyBool | LeftElbowKillPitch |
Read Write Property: is Pitch used for Left elbow. | |
FBPropertyBool | RightElbowKillPitch |
Read Write Property: is Pitch used for Right elbow. | |
FBPropertyCharacterHipsTranslationMode | HipsTranslationMode |
Read Write Property: Hips Translation Mode. | |
FBPropertyBool | WriteReference |
Read Write Property: are we writing back on reference. | |
FBPropertyBool | SyncMode |
Read Write Property: is character in sync mode. | |
FBPropertyBool | InverseLeftKnee |
Read Write Property: Is left knee inverted. | |
FBPropertyBool | InverseRightKnee |
Read Write Property: Is right knee inverted. | |
FBPropertyBool | InverseLeftElbow |
Read Write Property: Is left elbow inverted. | |
FBPropertyBool | InverseRightElbow |
Read Write Property: Is right elbow inverted. | |
FBPropertyCharacterRollSolver | RollSolver |
Read Write Property: Roll Solver selection. | |
FBPropertyCharacterContactBehaviour | ContactBehaviour |
Read Write Property: Contact Behavior selection. | |
FBPropertyAnimatableDouble | ScaleCompensation |
FBPropertyAnimatableDouble | HipsHeightCompensation |
FBPropertyAnimatableDouble | AnkleHeightCompensation |
FBPropertyAnimatableDouble | AnkleProximityCompensation |
FBPropertyBool | LockX |
Read Write Property: Lock character skeleton in place on X axis. | |
FBPropertyBool | LockY |
Read Write Property: Lock character skeleton in place on Y axis. | |
FBPropertyBool | LockZ |
Read Write Property: Lock character skeleton in place on Z axis. |
FBCharacter | ( | const char * | pName, |
HIObject | pObject = NULL |
||
) |
Constructor.
pName | Name of new character. |
pObject | For internal use only. This parameter does not need to be specified by the developer. |
IObject_Declare | ( | K_IMPLEMENTATION | ) |
Reimplemented from FBConstraint.
virtual void FBDelete | ( | ) | [virtual] |
Actual Character destructor.
This method is used to delete the actual character object represented by an instance of FBCharacter.
Reimplemented from FBComponent.
FBCharacter* Clone | ( | ) | [virtual] |
void AddCharacterExtension | ( | FBCharacterExtension * | pExt | ) |
AddCharacterExtension.
pExt | extension to be added to the character. |
void RemoveCharacterExtension | ( | FBCharacterExtension * | pExt | ) |
Get the model associated with each body part of the character.
pExt | extension to be removed to the character. |
FBModel* GetModel | ( | FBBodyNodeId | pBodyNodeId | ) |
Get the model associated with each body part of the character.
void GetSkinModelList | ( | FBModelList & | pSkinModelList | ) |
Get the skin model associated with character bones.
Could be deformable model connected to bone via cluster, or non deformable model parented directly under the bones.
pSkinModelList | List to be filled up. (will not be cleared) |
FBBodyNodeId GetIndexByModel | ( | FBModel * | pModel | ) |
Get the index associated with Given Model.
FBModel* GetCtrlRigModel | ( | FBBodyNodeId | pBodyNodeId | ) |
Get the model associated with each body part in the Control Rig of the character.
FBBodyNodeId GetCtrlRigIndexByModel | ( | FBModel * | pModel | ) |
Get the index of the model associated with each body part in the Control Rig of the character.
FBModel* GetEffectorModel | ( | FBEffectorId | pEffectorId, |
FBEffectorSetID | pEffectorSetID = FBEffectorSetDefault |
||
) |
Get the model associated with each effector in the Control Rig of the character.
pEffectorId | The effector ID. |
pEffectorSetID | Id of the ControlSet to obtain, if not specified the current one is taken. |
FBModel* GetFloorContactModel | ( | FBFloorContactID | pMemberIndex | ) |
Get the model associated with the floor contact ID.
pMemberIndex | Id of the floor contact |
FBModel* GetGoalModel | ( | FBBodyNodeId | pBodyNodeId | ) |
Get the goal model associated with each body part in the Character Marker Set of the character.
void GetTOffset | ( | FBBodyNodeId | pBodyNodeId, |
FBTVector * | pTVector | ||
) |
void GetROffset | ( | FBBodyNodeId | pBodyNodeId, |
FBRVector * | pRVector | ||
) |
void GetSOffset | ( | FBBodyNodeId | pBodyNodeId, |
FBSVector * | pSVector | ||
) |
void GetTransformOffset | ( | FBBodyNodeId | pBodyNodeId, |
FBMatrix * | pOffsetMatrix | ||
) |
void GetParentROffset | ( | FBBodyNodeId | pBodyNodeId, |
FBRVector * | pRVector | ||
) |
virtual bool PlotAnimation | ( | FBCharacterPlotWhere | pPlotWhere, |
FBPlotOptions * | pPlotOptions | ||
) | [virtual] |
Plot the animation of the character.
pPlotWhere | Where to plot a character, control rig or Skeleton |
pPlotOptions | Option parameters for plotting |
bool ReadyForRetarget | ( | ) |
Test if character is ready for the Retarget operation (basically, is it in character input ?).
void Retarget | ( | bool | pOnBaseLayer | ) |
Retarget the animation from the input character to us.
pOnBaseLayer | if true, keys corrections will be made on base layer; else they will be made on another layer. |
void CopyAnimation | ( | ) |
Copy the animation from the input character to us.
virtual void ResetProperties | ( | FBCharacterResetProperties | pType | ) | [virtual] |
Reset the properties of the character.
pType | Speficy which properties will be reset. |
void SelectModels | ( | bool | pSelect, |
bool | pApplyToCharacter, | ||
bool | pApplyToRig, | ||
bool | pApplyToExtensions | ||
) |
Select the objects that make a character.
pSelect | True to select, false to deselect. |
pApplyToCharacter | TSould the character contraint be selected ? |
pApplyToRig | should The rig (and its children) be selected ? |
pApplyToExtensions | Should the character extensions (and their children) be selected ? |
void GoToStancePose | ( | bool | pPushUndo = false , |
bool | pIncludeCharacterExtensions = true |
||
) |
Set the character in stance pose.
pPushUndo | Should we push an undo transaction on the undo stack? Don't push undo in non UI thread. |
pIncludeCharacterExtensions | Should the character extensions go to stance pose too? |
bool SetCharacterizeOn | ( | bool | pSetAsBiped | ) |
Set the Characterize flag on.
pSetAsBiped | true to use biped characterization or false to use quadruped. |
const char* GetCharacterizeError | ( | ) |
Get error message for the previous SetCharacterizeOn operation.
void SetCharacterizeOff | ( | ) |
Set Characterize flag off.
bool GetCharacterize | ( | ) |
bool CreateControlRig | ( | bool | pSetFKIK | ) |
Create the Control-Rig.
pSetFKIK | true to use FK/IK or false to use IK only. |
void ConnectControlRig | ( | FBControlSet * | pControlSet, |
bool | pUpdateLimit, | ||
bool | pResetHierarchy | ||
) |
Connect a Control-Rig to the character.
pControlSet | The control set to connect. NULL will disconnect the Control-Rig from the character. |
pUpdateLimit | Whether to update the models' limit for a character. E.g. the Pre rotation and post rotation. |
pResetHierarchy | Whether to reset hierarchy for a character. |
void DisconnectControlRig | ( | ) |
Disconnect the Control-Rig from the character.
bool CreateAuxiliary | ( | FBEffectorId | pEffectorId, |
bool | pPivot, | ||
double | pAuxReachT = 100 , |
||
double | pAuxReachR = 100 |
||
) |
Create auxiliary on effector.
pEffectorId | The effector ID. |
pPivot | Create effector or pivot (pivot offset should be set on IKPivot property, at creation default values are set). |
pAuxReachT | Default auxiliary effector reach for translation (IK Blend T since MotionBuilder 2013). |
pAuxReachR | Default auxiliary effector reach for rotation (IK Blend R since MotionBuilder 2013). |
FBControlSet* GetCurrentControlSet | ( | bool | pForce = false | ) |
Obtain Input ControlSet.
pForce | If True, will return the current ControlSet even if the character is not in ControlSet Input. |
bool CreateCharacterMarkerSet | ( | bool | pSetActive | ) |
Create the Character Marker Set.
pSetActive | True when new input should be set and active. |
FBCharacterMarkerSet* GetCharacterMarkerSet | ( | bool | pForce = false | ) |
Obtain Input CharacterMarkerSet.
pForce | If True, will return the current CharacterMarkerSet even if the character is not in CharacterMarkerSet Input. |
bool IsParentNodeOffset | ( | FBBodyNodeId | pNodeId | ) |
Check if there is an offset on Parent.
pNodeId | Node Id to Check. |
FBCharacterSolver* GetExternalSolver | ( | ) |
Get a pointer to the external solver of a character, or NULL is no external solver is used on the character.
void SetExternalSolver | ( | int | pIndex | ) |
Set character external solver.
pIndex | Index of external solver. |
void SetExternalSolver | ( | FBCharacterSolver * | pSolver | ) |
Set character solver.
pSolver | Character solver that will be used by the character. |
void GetActiveBodyPart | ( | bool * | pActivePart | ) |
Get the active body part array.
pActivePart | A pointer to an array of bool. On return, the index with a "true" value are active part. |
bool IsRotationPin | ( | FBEffectorId | pEffectorIndex | ) |
Return true if the object is Pinned in Rotation (Manipulation).
pEffectorIndex | Given Index to obtain Model |
bool IsTranslationPin | ( | FBEffectorId | pEffectorIndex | ) |
Return true if the object is Pinned in Translation (Manipulation).
pEffectorIndex | Given Index to obtain Model |
bool IsCtrlSetReady | ( | ) |
Return true Ctrl Set is Ready to be used.
bool IsPlottingActorToCtrlRig | ( | ) |
Return true if the Actor is currently being plot to the Control Rig.
FBControlSetState* GetControlSetEvaluationCache | ( | FBEvaluateInfo * | pEvaluateInfo | ) |
Return pointer to evaluation cache that is dedicated for control set and given pEvaluateInfo.
FBEffectorSetState* GetEffectorEvaluationCache | ( | FBEvaluateInfo * | pEvaluateInfo | ) |
Return pointer to evaluation cache that is dedicated for effector set and given pEvaluateInfo.
FBPropertyCharacterInputType InputType |
Read Write Property: The input type for the character (ex: Actor).
Definition at line 1130 of file fbcharacter.h.
FBPropertyCharacterKeyingMode KeyingMode |
Read Write Property: The current keying mode.
Definition at line 1131 of file fbcharacter.h.
FBPropertyActor InputActor |
Read Write Property: The index of the actor used for the input.
Definition at line 1132 of file fbcharacter.h.
FBPropertyCharacter InputCharacter |
Read Write Property: The index of the character used for the input.
Definition at line 1133 of file fbcharacter.h.
Read Write Property: Is the character input active?
Definition at line 1134 of file fbcharacter.h.
List: Character Extensions in the character.
Definition at line 1136 of file fbcharacter.h.
Used to store SetCharacterizeOn errors and warnings.
Definition at line 1379 of file fbcharacter.h.
Read Write Property: is in mirror mode.
Definition at line 1383 of file fbcharacter.h.
Read Write Property: shoulder correction values.
Definition at line 1384 of file fbcharacter.h.
Read Write Property: is Pitch used for Left knee.
Definition at line 1385 of file fbcharacter.h.
Read Write Property: is Pitch used for Right knee.
Definition at line 1386 of file fbcharacter.h.
Read Write Property: is Pitch used for Left elbow.
Definition at line 1387 of file fbcharacter.h.
Read Write Property: is Pitch used for Right elbow.
Definition at line 1388 of file fbcharacter.h.
FBPropertyCharacterHipsTranslationMode HipsTranslationMode |
Read Write Property: Hips Translation Mode.
Definition at line 1389 of file fbcharacter.h.
Read Write Property: are we writing back on reference.
Definition at line 1390 of file fbcharacter.h.
Read Write Property: is character in sync mode.
Definition at line 1391 of file fbcharacter.h.
Read Write Property: Is left knee inverted.
Definition at line 1392 of file fbcharacter.h.
Read Write Property: Is right knee inverted.
Definition at line 1393 of file fbcharacter.h.
Read Write Property: Is left elbow inverted.
Definition at line 1394 of file fbcharacter.h.
Read Write Property: Is right elbow inverted.
Definition at line 1395 of file fbcharacter.h.
FBPropertyCharacterRollSolver RollSolver |
Read Write Property: Roll Solver selection.
Definition at line 1396 of file fbcharacter.h.
FBPropertyCharacterContactBehaviour ContactBehaviour |
Read Write Property: Contact Behavior selection.
Definition at line 1397 of file fbcharacter.h.
Definition at line 1399 of file fbcharacter.h.
Definition at line 1400 of file fbcharacter.h.
Definition at line 1401 of file fbcharacter.h.
Definition at line 1402 of file fbcharacter.h.
Read Write Property: Lock character skeleton in place on X axis.
Definition at line 1404 of file fbcharacter.h.
Read Write Property: Lock character skeleton in place on Y axis.
Definition at line 1405 of file fbcharacter.h.
Read Write Property: Lock character skeleton in place on Z axis.
Definition at line 1406 of file fbcharacter.h.