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; HFBScene 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; HFBCharacter lCharacter = lApplication.CurrentCharacter; if( lCharacter ) { FBTrace( "Current character is: '%s'\n", (char*)lCharacter->Name ); } else { FBTrace( "No character currently selected\n" ); }
See samples: EnableGameModeOnSelectedCharacters_Z.py, MirrorPoseOverTime.py, PlotNonSelectedCharStoryTracks.py, PlotSelectedCharStoryTracks.py.
Public Member Functions |
|
FBCharacter (str pName) | |
Constructor. |
|
AddCharacterExtension (FBCharacterExtension pExt) | |
AddCharacterExtension. |
|
FBCharacter | Clone () |
Clone the character. |
|
CopyAnimation () | |
Copy the animation from the input character
to us. |
|
bool | CreateControlRig (bool pSetFKIK) |
Create the Control-Rig. |
|
FBDelete () | |
Actual Character destructor. |
|
GetActiveBodyPart (bool pActivePart) | |
Get the active body part array. |
|
bool | GetCharacterize () |
Get Characterize flag. |
|
str | GetCharacterizeError () |
Get error message for the previous
SetCharacterizeOn operation. |
|
FBModel | GetCtrlRigModel (FBBodyNodeId pBodyNodeId) |
Get the model associated with each body part
in the Control Rig of the character. |
|
FBControlSet | GetCurrentControlSet (bool pForce=False) |
Obtain Input ControlSet. |
|
FBModel | GetEffectorModel (FBEffectorId pEffectorId, FBEffectorSetID pEffectorSetID=FBEffectorSetDefault) |
Get the model associated with each effector
in the Control Rig of the character. |
|
FBCharacterSolver | GetExternalSolver () |
Get a pointer to the external solver of a
character, or NULL is no external solver is used on the character.
|
|
FBModel | GetFloorContactModel (FBFloorContactID pMemberIndex) |
Get the model associated with the floor
contact ID. |
|
FBBodyNodeId | GetIndexByModel (FBModel pModel) |
Get the index associated with Given Model.
|
|
FBModel | GetModel (FBBodyNodeId pBodyNodeId) |
Get the model associated with each body part
of the character. |
|
GetParentROffset (FBBodyNodeId pBodyNodeId, FBRVector pRVector) | |
GetROffset (FBBodyNodeId pBodyNodeId, FBRVector pRVector) | |
GetSOffset (FBBodyNodeId pBodyNodeId, FBSVector pSVector) | |
GetTOffset (FBBodyNodeId pBodyNodeId, FBTVector pTVector) | |
GetTransformOffset (FBBodyNodeId pBodyNodeId, FBMatrix pOffsetMatrix) | |
GoToStancePose (bool pPushUndo=False, bool pIncludeCharacterExtensions=True) | |
Set the character in stance pose. |
|
bool | IsParentNodeOffset (FBBodyNodeId pNodeId) |
Check if there is an offset on Parent.
|
|
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 | 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 ?). |
|
RemoveCharacterExtension (FBCharacterExtension pExt) | |
Get the model associated with each body part
of the character. |
|
ResetProperties (FBCharacterResetProperties pType) | |
Reset the properties of the character.
|
|
Retarget (bool pOnBaseLayer) | |
Retarget the animation from the input
character to us. |
|
SelectModels (bool pSelect, bool pApplyToCharacter, bool pApplyToRig, bool pApplyToExtensions) | |
Select the objects that make a character.
|
|
SetCharacterizeOff () | |
Set Characterize flag off. |
|
bool | SetCharacterizeOn (bool pSetAsBiped) |
Set the Characterize flag on. |
|
SetExternalSolver (int pIndex) | |
Set character external solver. |
|
SetExternalSolver (FBCharacterSolver pSolver) | |
Set character solver. |
|
Public Attributes |
|
bool | ActiveInput |
Read Write Property: Is the character
input active? |
|
FBListCharacterExtension | CharacterExtensions |
List: Character Extensions in the
character. |
|
FBCharacterContactBehaviour | ContactBehaviour |
Read Write Property: Contact Behavior
selection. |
|
FBCharacterHipsTranslationMode | HipsTranslationMode |
Read Write Property: Hips Translation
Mode. |
|
FBActor | InputActor |
Read Write Property: The index of the
actor used for the input. |
|
FBCharacter | InputCharacter |
Read Write Property: The index of the
character used for the input. |
|
FBCharacterInputType | InputType |
Read Write Property: The input type
for the character (ex: Actor). |
|
bool | InverseLeftElbow |
Read Write Property: Is left elbow
inverted. |
|
bool | InverseLeftKnee |
Read Write Property: Is left knee
inverted. |
|
bool | InverseRightElbow |
Read Write Property: Is right elbow
inverted. |
|
bool | InverseRightKnee |
Read Write Property: Is right knee
inverted. |
|
FBCharacterKeyingMode | KeyingMode |
Read Write Property: The current
keying mode. |
|
bool | LeftElbowKillPitch |
Read Write Property: is Pitch used
for Left elbow. |
|
bool | LeftKneeKillPitch |
Read Write Property: is Pitch used
for Left knee. |
|
bool | MirrorMode |
Read Write Property: is in mirror
mode. |
|
bool | RightElbowKillPitch |
Read Write Property: is Pitch used
for Right elbow. |
|
bool | RightKneeKillPitch |
Read Write Property: is Pitch used
for Right knee. |
|
FBCharacterRollSolver | RollSolver |
Read Write Property: Roll Solver
selection. |
|
FBAnimatableDouble | ShoulderCorrection |
Read Write Property: shoulder
correction values. |
|
bool | SyncMode |
Read Write Property: is character in
sync mode. |
|
bool | WriteReference |
Read Write Property: are we writing
back on reference. |
FBCharacter | ( | str | pName | ) |
Constructor.
pName | Name of new character. |
AddCharacterExtension | ( | FBCharacterExtension | pExt | ) |
AddCharacterExtension.
pExt | extension to be added to the character. |
FBCharacter Clone | ( | ) |
Clone the character.
Reimplemented from FBConstraint.
CopyAnimation | ( | ) |
Copy the animation from the input character to us.
Create the Control-Rig.
pSetFKIK | true to use FK/IK or false to use IK only. |
FBDelete | ( | ) |
Actual Character destructor.
This method is used to delete the actual character object represented by an instance of FBCharacter.
See sample: DeleteHierarchy.py.
Reimplemented from FBComponent.
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 GetCharacterize | ( | ) |
Get Characterize flag.
str GetCharacterizeError | ( | ) |
Get error message for the previous SetCharacterizeOn operation.
FBModel GetCtrlRigModel | ( | FBBodyNodeId | pBodyNodeId | ) |
Get the model associated with each body part in the Control Rig of the character.
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. |
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. |
FBCharacterSolver GetExternalSolver | ( | ) |
Get a pointer to the external solver of a character, or NULL is no external solver is used on the character.
FBModel GetFloorContactModel | ( | FBFloorContactID | pMemberIndex | ) |
Get the model associated with the floor contact ID.
pMemberIndex | Id of the floor contact |
FBBodyNodeId GetIndexByModel | ( | FBModel | pModel | ) |
Get the index associated with Given Model.
FBModel GetModel | ( | FBBodyNodeId | pBodyNodeId | ) |
Get the model associated with each body part of the character.
GetParentROffset | ( | FBBodyNodeId | pBodyNodeId, | |
FBRVector | pRVector | |||
) |
GetROffset | ( | FBBodyNodeId | pBodyNodeId, | |
FBRVector | pRVector | |||
) |
GetSOffset | ( | FBBodyNodeId | pBodyNodeId, | |
FBSVector | pSVector | |||
) |
GetTOffset | ( | FBBodyNodeId | pBodyNodeId, | |
FBTVector | pTVector | |||
) |
GetTransformOffset | ( | FBBodyNodeId | pBodyNodeId, | |
FBMatrix | pOffsetMatrix | |||
) |
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 IsParentNodeOffset | ( | FBBodyNodeId | pNodeId | ) |
Check if there is an offset on Parent.
pNodeId | Node Id to Check. |
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 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 ?).
RemoveCharacterExtension | ( | FBCharacterExtension | pExt | ) |
Get the model associated with each body part of the character.
pExt | extension to be removed to the character. |
ResetProperties | ( | FBCharacterResetProperties | pType | ) |
Reset the properties of the character.
pType | Speficy which properties will be reset. |
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. |
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 ? |
SetCharacterizeOff | ( | ) |
Set Characterize flag off.
Set the Characterize flag on.
pSetAsBiped | true to use biped characterization or false to use quadruped. |
SetExternalSolver | ( | int | pIndex | ) |
Set character external solver.
pIndex | Index of external solver. |
SetExternalSolver | ( | FBCharacterSolver | pSolver | ) |
Set character solver.
pSolver | Character solver that will be used by the character. |
Read Write Property: Is the character input active?
FBListCharacterExtension CharacterExtensions |
List: Character Extensions in the character.
Read Write Property: Contact Behavior selection.
Read Write Property: Hips Translation Mode.
Read Write Property: The index of the actor used for the input.
Read Write Property: The index of the character used for the input.
Read Write Property: The input type for the character (ex: Actor).
Read Write Property: Is left elbow inverted.
Read Write Property: Is left knee inverted.
Read Write Property: Is right elbow inverted.
Read Write Property: Is right knee inverted.
Read Write Property: The current keying mode.
Read Write Property: is Pitch used for Left elbow.
Read Write Property: is Pitch used for Left knee.
Read Write Property: is in mirror mode.
Read Write Property: is Pitch used for Right elbow.
Read Write Property: is Pitch used for Right knee.
Read Write Property: Roll Solver selection.
FBAnimatableDouble ShoulderCorrection |
Read Write Property: shoulder correction values.
Read Write Property: are we writing back on reference.