Python Reference Guide
 
Loading...
Searching...
No Matches
FBCharacterFace Class Reference

Animates a character face using an actor as input. More...

#include <pyfbsdk_generated.h>

Inheritance diagram for FBCharacterFace:

Public Member Functions

 FBCharacterFace (str pName)
 Constructor.
 
int ClusterGroupAdd (FBModelList pList, str pName=None)
 Add a cluster group to the character face.
 
int ClusterGroupFindByName (str pName)
 Find a cluster group by name.
 
int ClusterGroupGetCount ()
 Retrieve the total number of cluster groups.
 
str ClusterGroupGetName (int pClusterGrpId)
 Retrieve the name of a cluster group.
 
bool ClusterGroupRemove (int pClusterGrpId)
 Remove a cluster group from the character face.
 
bool ClusterGroupSetName (int pClusterGrpId, str pName)
 Set the name of a cluster group.
 
bool ClusterGroupSnapRest (int pClusterGrpId)
 Set a cluster group's rest pose to the current pose.
 
int ClusterShapeAdd (int pClusterGrpId, str pName=None)
 Add a cluster shape to a cluster group.
 
int ClusterShapeFindByName (int pClusterGrpId, str pName)
 Find a cluster shape in a cluster group by name.
 
int ClusterShapeGetCount (int pClusterGrpId)
 Retrieve the total number of shapes in a cluster group.
 
str ClusterShapeGetName (int pClusterGrpId, int pClusterShapeId)
 Retrieve the name of a shape in a cluster group.
 
bool ClusterShapeRemove (int pClusterGrpId, int pClusterShapeId)
 Remove a cluster shape from a cluster group.
 
bool ClusterShapeSetName (int pClusterGrpId, int pClusterShapeId, str pName)
 Set the name of a shape in a cluster group.
 
bool ClusterShapeSnap (int pClusterGrpId, int pClusterShapeId)
 Record the current pose of the cluster group to a cluster shape.
 
int ExpressionAdd (str pName)
 Add an expression to the face.
 
int ExpressionFindByName (str pName)
 Find an expression on the face by name.
 
int ExpressionGetCount ()
 Retrieve the total number of expressions on the face.
 
str ExpressionGetName (int pExpressionId)
 Retrieve the name of an expression.
 
float ExpressionGetShapeWeight (int pExpressionId, int pGrpId, int pShapeId)
 Retrieve the weight of a shape to an expression.
 
bool ExpressionRemove (int pExpressionId)
 Remove an expression from the face.
 
bool ExpressionSetName (int pExpressionId, str pName)
 Set the name of an expression.
 
bool ExpressionSetShapeWeight (int pExpressionId, int pGrpId, int pShapeId, float pValue=0.0f)
 Assign the weight of a shape to an expression.
 
 FBDelete ()
 Actual Character Face destructor.
 
 GotoRest ()
 Set the character face back to its rest shape.
 
bool PlotAnimation ()
 Plot the animation of the character face.
 
int ShapeFindByName (int pShapeGrpId, str pName)
 Find a shape in a blendshape group by name.
 
int ShapeGetCount (int pShapeGrpId)
 Retrieve the total number of shapes in a blendshape group.
 
str ShapeGetName (int pShapeGrpId, int pShapeId)
 Retrieve the name of the shape in a blendshape group.
 
bool ShapeGroupAdd (FBModelList pList, str pName=None)
 Add a blendshape model group for each input model.
 
int ShapeGroupFindByName (str pName)
 Find a blendshape group by name.
 
int ShapeGroupGetCount ()
 Retrieve the total number of blendshape groups on this character face.
 
str ShapeGroupGetName (int pShapeGrpId)
 Retrieve the name of a blendshape group.
 
bool ShapeGroupRemove (int pShapeGrpId)
 Remove a blendshape model group.
 
bool ShapeGroupSetName (int pShapeGrpId, str pName)
 Set the name of a blendshape group.
 
bool ShapeSetName (int pShapeGrpId, int pShapeId, str pName)
 Set the name of the shape in a blendshape group.
 
- Public Member Functions inherited from FBConstraint
 FBConstraint (str pName)
 Constructor.
 
FBAnimationNode AnimationNodeInCreate (kReference pUserId, FBModel pModel, str pAttribute)
 
FBAnimationNode AnimationNodeInCreate (kReference pUserId, FBProperty pProperty)
 Animation Node Creations (IN).
 
FBAnimationNode AnimationNodeOutCreate (kReference pUserId, FBModel pModel, str pAttribute)
 Animation Node Creations (IN/OUT).
 
FBConstraint Clone ()
 Clone the constraint.
 
bool DeformerBind (FBModel pModel)
 Bind/Unbind pModel to deformation constraint.
 
bool DeformerUnBind (FBModel pModel)
 
bool Disable (FBModel pModel)
 Disable constraint on pModel.
 
 FreezeSRT (FBModel pModel, bool pS, bool pR, bool pT)
 Freeze current model state.
 
 FreezeSuggested ()
 Suggest 'freeze'.
 
bool ReferenceAdd (int pGroupIndex, FBModel pModel)
 Add a reference to a specified group.
 
FBModel ReferenceGet (int pGroupIndex, int pItemIndex=0)
 Get a reference.
 
int ReferenceGetCount (int pGroupIndex)
 Get number of references in a specified group.
 
int ReferenceGroupAdd (str pGroupName, int pMaxItemCount)
 Add a group of references.
 
int ReferenceGroupGetCount ()
 Return the number of reference groups.
 
int ReferenceGroupGetMaxCount (int pGroupIndex)
 Get the maximum number of items that can exist in the reference group in question.
 
str ReferenceGroupGetName (int pGroupIndex)
 Get the name of the reference group.
 
bool ReferenceRemove (int pGroupIndex, FBModel pModel)
 Remove a reference to pModel from the group at pGroupIndex.
 
 RemoveAllAnimationNodes ()
 Remove animation nodes.
 
 RestoreModelState (FBModel pModel)
 Restore the saved model state onto pModel.
 
 SaveModelState (FBModel pModel, bool pS, bool pR, bool pT)
 Save current state of pModel.
 
 SetupAllAnimationNodes ()
 Setup animation nodes.
 
 SnapSuggested ()
 Suggest 'snap'.
 
- Public Member Functions inherited from FBBox
 FBBox (str pName)
 Constructor.
 
bool AnimationNodeDestroy (FBAnimationNode pAnimationNode)
 Destroy an animation node.
 
FBAnimationNode AnimationNodeInGet ()
 Get the (IN/OUT) animation node for this box.
 
bool AnimationNodeIsUserData (FBAnimationNode pAnimationNode)
 Is the animation node user data?
 
FBAnimationNode AnimationNodeOutGet ()
 
str FbxGetObjectSubType ()
 Returns the class sub type inherited by the class of an object, for example: 'Relations', 'Parent-Child', 'Number to Vector', 'Shot'.
 
str FbxGetObjectType ()
 Returns the class type inherited by the class of an object, for example: 'Box', 'Constraint', 'TimelineXTrack'.
 
FBAnimationNode GetInConnector (int pIndex)
 Get the animation node input associated with the given index.
 
int GetInConnectorCount ()
 Get the number of animation node inputs for this box.
 
FBAnimationNode GetOutConnector (int pIndex)
 Get the animation node output associated with the given index.
 
int GetOutConnectorCount ()
 Get the number of animation node outputs for this box.
 
- Public Member Functions inherited from FBComponent
 FBComponent ()
 Constructor.
 
str ClassName ()
 Get the class name.
 
 DisableObjectFlags (FBObjectFlag pFlags)
 Disable a specific Object Flags.
 
 EnableObjectFlags (FBObjectFlag pFlags)
 Enable a specific Object Flags.
 
bool FBCreate ()
 Open Reality Creation function.
 
 FBDelete ()
 Open Reality deletion function.
 
 FBDestroy ()
 Open Reality destruction function.
 
FBObjectFlag GetObjectFlags ()
 Get all Object Flags (concatenated).
 
bool GetObjectStatus (FBObjectStatus pStatus)
 Check to see if an object status is enabled.
 
FBFileReference GetOwnerFileReference (p0)
 Get the owner FileReference object.
 
 HardSelect ()
 HardSelect.
 
bool HasObjectFlags (FBObjectFlag pFlags)
 Check whether a specific object flag is enabled.
 
bool Is (int pTypeId)
 Returns true if object is of type TypeId.
 
bool ProcessNamespaceHierarchy (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessNamespaceHierarchy.
 
bool ProcessObjectNamespace (FBNamespaceAction pNamespaceAction, str pNamespaceName, str pReplaceTo=None, bool pAddRight=True)
 ProcessObjectNamespace.
 
int PropertyAdd (FBProperty pProperty)
 Add a property to the component's property manager.
 
bool PropertyAddReferenceProperty (FBProperty pReferenceProperty)
 Add a reference property to the component's property manager.
 
FBProperty PropertyCreate (str pName, FBType pType, str pDataType, bool pAnimatable, bool pIsUser=False, FBProperty pReferenceSource=None)
 Create user or dynamic property.
 
 PropertyGetModifiedList (FBArrayTemplate< FB > pPropList, FBPlugModificationFlag pModificationFlags)
 Get list of properties which have been modified since last loading.
 
 PropertyRemove (FBProperty pProperty)
 Remove a Property from the component's Property manager.
 
 SetObjectFlags (FBObjectFlag pFlags)
 SetObjectFlags.
 
 SetObjectStatus (FBObjectStatus pStatus, bool pValue)
 Enable/Disable a specific Object Status.
 

Public Attributes

bool ActiveInput
 Read Write Property: Is the character input active?

 
FBActorFace InputActorFace
 Read Write Property: The index of the actor used for the input.

 
- Public Attributes inherited from FBConstraint
bool Active
 Read Write Property: Active state.

 
bool Deformer
 Read Write Property: Is a deformer constraint?

 
str Description
 Read Write Property: Long description of constraint.

 
bool HasLayout
 Read Write Property: Does the constraint have a layout?

 
bool Lock
 Read Write Property: Lock state.

 
FBAction Snap
 Function Property: Snap constraint.

 
FBAnimatableDouble Weight
 Read Write Property: Weight of constraint.

 
- Public Attributes inherited from FBBox
bool Animatable
 Read Write Property: Is the box animatable.

 
bool Live
 Read Write Property: Is live?

 
bool RecordMode
 Read Write Property: Is recording?

 
str UniqueName
 internal Unique name.

 
- Public Attributes inherited from FBComponent
FBListComponent Components
 List: List of components.

 
str LongName
 Read Write Property: Name and namespace for object.

 
str Name
 Read Write Property: Unique name of object. See sample: RemoveSuffixFromNameOfSceneElements.py.
 
FBListComponent Parents
 List: Parents.

 
FBManager PropertyList
 Read Only Property: Manages all of the properties for the component.

 
bool Selected
 Read Write Property: Selected property.

 
int TypeInfo
 Contains the Type information of the object.

 
- Public Attributes inherited from FBPlug
str ClassGroupName
 ClassGroupName of the object.

 
int TypeInfo
 TypeInfo.

 

Detailed Description

Animates a character face using an actor as input.


These classes are under development and may change dramatically between versions.

Constructor & Destructor Documentation

◆ FBCharacterFace()

FBCharacterFace ( str  pName)

Constructor.

Parameters
pNameName of new character.

Member Function Documentation

◆ ClusterGroupAdd()

int ClusterGroupAdd ( FBModelList  pList,
str  pName = None 
)

Add a cluster group to the character face.

Parameters
pListList of clusters to add to this group.
pNameOptional name to assign to this cluster group.
Returns
Index of the new cluster group -1 if the operation failed to complete.

◆ ClusterGroupFindByName()

int ClusterGroupFindByName ( str  pName)

Find a cluster group by name.

Parameters
pNameName to search for on the face.
Returns
Index of the matching cluster group. -1 if not found.

◆ ClusterGroupGetCount()

int ClusterGroupGetCount ( )

Retrieve the total number of cluster groups.

Returns
Number of cluster groups on the face.

◆ ClusterGroupGetName()

str ClusterGroupGetName ( int  pClusterGrpId)

Retrieve the name of a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to query.
Returns
Name of the specified cluster group.

◆ ClusterGroupRemove()

bool ClusterGroupRemove ( int  pClusterGrpId)

Remove a cluster group from the character face.

Parameters
pClusterGrpIdIndex of the cluster group to remove.
Returns
True if the operation completed successfully.

◆ ClusterGroupSetName()

bool ClusterGroupSetName ( int  pClusterGrpId,
str  pName 
)

Set the name of a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to modify.
pNameNew name for the cluster group.
Returns
True of the operation completed successfully.

◆ ClusterGroupSnapRest()

bool ClusterGroupSnapRest ( int  pClusterGrpId)

Set a cluster group's rest pose to the current pose.

Parameters
pClusterGrpIdIndex of the cluster group to modify.
Returns
True if the operation completed succesfully.

◆ ClusterShapeAdd()

int ClusterShapeAdd ( int  pClusterGrpId,
str  pName = None 
)

Add a cluster shape to a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to modify.
pNameOptional name to assign to the shape.
Returns
Index of the new shape. -1 if the operation failed to complete.

◆ ClusterShapeFindByName()

int ClusterShapeFindByName ( int  pClusterGrpId,
str  pName 
)

Find a cluster shape in a cluster group by name.

Parameters
pClusterGrpIdIndex of the cluster group to search.
pNameName to search for in the cluster group.
Returns
Index of the matching shape. -1 if not found.

◆ ClusterShapeGetCount()

int ClusterShapeGetCount ( int  pClusterGrpId)

Retrieve the total number of shapes in a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to query.
Returns
Number of shapes in the specified cluster group.

◆ ClusterShapeGetName()

str ClusterShapeGetName ( int  pClusterGrpId,
int  pClusterShapeId 
)

Retrieve the name of a shape in a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to query.
pClusterShapeIdIndex of the cluster shape to query.
Returns
Name of the specified shape.

◆ ClusterShapeRemove()

bool ClusterShapeRemove ( int  pClusterGrpId,
int  pClusterShapeId 
)

Remove a cluster shape from a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to modify.
pClusterShapeIdIndex of the shape in the cluster group to remove.
Returns
True of the operation completed succesfully.

◆ ClusterShapeSetName()

bool ClusterShapeSetName ( int  pClusterGrpId,
int  pClusterShapeId,
str  pName 
)

Set the name of a shape in a cluster group.

Parameters
pClusterGrpIdIndex of the cluster group to modify.
pClusterShapeIdIndex of the cluster shape to modify.
pNameName to assign to the cluster shape.
Returns
True if the operation completed successfully.

◆ ClusterShapeSnap()

bool ClusterShapeSnap ( int  pClusterGrpId,
int  pClusterShapeId 
)

Record the current pose of the cluster group to a cluster shape.

Parameters
pClusterGrpIdIndex of the cluster group to record.
pClusterShapeIdIndex of the cluster shape to record the pose.
Returns
True if the operation completed successfully.

◆ ExpressionAdd()

int ExpressionAdd ( str  pName)

Add an expression to the face.

Parameters
pNameOptional name to assign to the new expression.
Returns
Index of the new expression. -1 if the operation failed to complete.

◆ ExpressionFindByName()

int ExpressionFindByName ( str  pName)

Find an expression on the face by name.

Parameters
pNameName of the expression to search for.
Returns
Index of the matching expression. -1 if not found.

◆ ExpressionGetCount()

int ExpressionGetCount ( )

Retrieve the total number of expressions on the face.

Returns
Number of expressions on the face.

◆ ExpressionGetName()

str ExpressionGetName ( int  pExpressionId)

Retrieve the name of an expression.

Parameters
pExpressionIdIndex of the expression to query.
Returns
Name of the specified expression.

◆ ExpressionGetShapeWeight()

float ExpressionGetShapeWeight ( int  pExpressionId,
int  pGrpId,
int  pShapeId 
)

Retrieve the weight of a shape to an expression.

Parameters
pExpressionIdIndex of the expression.
pGrpIdIndex of the blendshape or cluster group containing the shape of interest.
pShapeIdIndex of the blendshape or cluster shape.
Returns
Weight of the desired shape to an expression. A weight of 0.0 represents 0%, while a weight of 1.0 represents 100%. Returns 0.0 if the weight cannot be found.

◆ ExpressionRemove()

bool ExpressionRemove ( int  pExpressionId)

Remove an expression from the face.

Parameters
pExpressionIdIndex of the expression to remove.
Returns
True if the operation completed successfully.

◆ ExpressionSetName()

bool ExpressionSetName ( int  pExpressionId,
str  pName 
)

Set the name of an expression.

Parameters
pExpressionIdIndex of the expression to modify.
pNameName to assign to the expression.
Returns
True if the operation completed successfully.

◆ ExpressionSetShapeWeight()

bool ExpressionSetShapeWeight ( int  pExpressionId,
int  pGrpId,
int  pShapeId,
float  pValue = 0.0f 
)

Assign the weight of a shape to an expression.

Parameters
pExpressionIdIndex of the expression to modify.
pGrpIdIndex of the blendshape or cluster group containing the shape of interest.
pShapeIdIndex of the blendshape or cluster shape to weight.
pValueWeight of the shape to assign to this expression. A weight of 0.0 represents 0%, while a weight of 1.5 represents 150%. The weight cannot be less than 0.0; if so, the weight will be clamped to 0.0.
Returns
True if the operation completed successfully.

◆ FBDelete()

FBDelete ( )

Actual Character Face destructor.

This method is used to delete the actual character face object represented by an instance of FBCharacterFace.

See sample: DeleteHierarchy.py.

◆ GotoRest()

GotoRest ( )

Set the character face back to its rest shape.

◆ PlotAnimation()

bool PlotAnimation ( )

Plot the animation of the character face.

Returns
True if the operation completed successfully.

◆ ShapeFindByName()

int ShapeFindByName ( int  pShapeGrpId,
str  pName 
)

Find a shape in a blendshape group by name.

Parameters
pShapeGrpIdIndex of the blendshape group to search.
pNameName to search for.
Returns
Index of the shape, -1 if not found.

◆ ShapeGetCount()

int ShapeGetCount ( int  pShapeGrpId)

Retrieve the total number of shapes in a blendshape group.

Parameters
pShapeGrpIdIndex of the blendshape group to query.
Returns
Number of shapes in the specified blendshape group.

◆ ShapeGetName()

str ShapeGetName ( int  pShapeGrpId,
int  pShapeId 
)

Retrieve the name of the shape in a blendshape group.

Parameters
pShapeGrpIdIndex of the blendshape group to query.
pShapeIdIndex of the shape in the blendshape group to query.
Returns
Name of the specified shape.

◆ ShapeGroupAdd()

bool ShapeGroupAdd ( FBModelList  pList,
str  pName = None 
)

Add a blendshape model group for each input model.

Parameters
pListList of models to create a blendshape model group.
pNameUnused. Instead, use the ShapeGroupGetName member function to set the name of each added blendshape model group individually.
Returns
True if the operation completed successfully, false otherwise.

◆ ShapeGroupFindByName()

int ShapeGroupFindByName ( str  pName)

Find a blendshape group by name.

Parameters
pNameName to search for.
Returns
Index of the blendshape group, -1 if not found.

◆ ShapeGroupGetCount()

int ShapeGroupGetCount ( )

Retrieve the total number of blendshape groups on this character face.

Returns
Number of blendshape groups on this character face.

◆ ShapeGroupGetName()

str ShapeGroupGetName ( int  pShapeGrpId)

Retrieve the name of a blendshape group.

Parameters
pShapeGrpIdIndex of the blendshape group to query.
Returns
Name of the blendshape group.

◆ ShapeGroupRemove()

bool ShapeGroupRemove ( int  pShapeGrpId)

Remove a blendshape model group.

Parameters
pShapeGrpIdIndex of the blendshape group to remove.
Returns
True if the operation completed successfully.

◆ ShapeGroupSetName()

bool ShapeGroupSetName ( int  pShapeGrpId,
str  pName 
)

Set the name of a blendshape group.

Parameters
pShapeGrpIdIndex of the blendshape group to modify.
pNameName to set on the blendshape group.
Returns
True if the operation completed successfully.

◆ ShapeSetName()

bool ShapeSetName ( int  pShapeGrpId,
int  pShapeId,
str  pName 
)

Set the name of the shape in a blendshape group.

Parameters
pShapeGrpIdIndex of the blendshape group to query.
pShapeIdIndex of the shape in the blendshape group to set.
pNameName to set on the shape.
Returns
True if the operation completed successfully.

Member Data Documentation

◆ ActiveInput

bool ActiveInput

Read Write Property: Is the character input active?

◆ InputActorFace

FBActorFace InputActorFace

Read Write Property: The index of the actor used for the input.