IC8 Python API:RLPy RIFaceComponent
Contents
- 1 Description
- 2 Class Methods
- 2.1 RLPy.RIFaceComponent.AddClip(self, kTime, strName, kLength)
- 2.2 RLPy.RIFaceComponent.AddExpressionKeys(self, kTime, kExpressions, kStrengths, kInterval)
- 2.3 RLPy.RIFaceComponent.AddExpressivenessKey(self, kTime, fWeight)
- 2.4 RLPy.RIFaceComponent.BeginKeyEditing(self)
- 2.5 RLPy.RIFaceComponent.BreakClip(self, kTime)
- 2.6 RLPy.RIFaceComponent.DeleteClip(self, spClip)
- 2.7 RLPy.RIFaceComponent.EndKeyEditing(self)
- 2.8 RLPy.RIFaceComponent.GetAutoBlinkName(self)
- 2.9 RLPy.RIFaceComponent.GetAutoBlinkNames(self)
- 2.10 RLPy.RIFaceComponent.GetClip(self, uIndex)
- 2.11 RLPy.RIFaceComponent.GetClipByTime(self, kHitTime)
- 2.12 RLPy.RIFaceComponent.GetClipCount(self)
- 2.13 RLPy.RIFaceComponent.GetExpressionGroups(self)
- 2.14 RLPy.RIFaceComponent.GetExpressionNames(self, strType, bMocapOrder = False)
- 2.15 RLPy.RIFaceComponent.GetExpressionSetUid(self)
- 2.16 RLPy.RIFaceComponent.GetExpressionStatuses(self, strType)
- 2.17 RLPy.RIFaceComponent.GetExpressionWeights(self, args)
- 2.18 RLPy.RIFaceComponent.GetExpressiveness(self, kTime)
- 2.19 RLPy.RIFaceComponent.GetStrength(self)
- 2.20 RLPy.RIFaceComponent.SetAutoBlinkName(self, strName)
- 3 Description
- 4 Constructor & Destructor
- 5 Member Functions
- 5.1 AddClip (self, kTime, strName, kLength)
- 5.2 AddExpressionKeys (self, kTime, kExpressions, kStrengths, kInterval)
- 5.3 AddExpressivenessKey (self, kTime, fWeight)
- 5.4 BeginKeyEditing (self)
- 5.5 BreakClip (self, kTime)
- 5.6 DeleteClip (self, spClip)
- 5.7 EndKeyEditing (self)
- 5.8 GetAutoBlinkName (self)
- 5.9 GetAutoBlinkNames (self)
- 5.10 GetClip (self, uIndex)
- 5.11 GetClipByTime (self, kHitTime)
- 5.12 GetClipCount (self)
- 5.13 GetExpressionBoneRotation (self, strBoneName, strExpression)
- 5.14 GetExpressionGroups (self)
- 5.15 GetExpressionNames (self, strType, bMocapOrder=False)
- 5.16 GetExpressionSetUid (self)
- 5.17 GetExpressionStatuses (self, strType)
- 5.18 GetExpressionWeights (self, *args)
- 5.19 GetExpressiveness (self, kTime)
- 5.20 GetStrength (self)
- 5.21 ImportExpression (self, kSettings)
- 5.22 IsCurrentPoseMode (self)
- 5.23 SetAutoBlinkName (self, strName)
- 5.24 SetCurrentPoseMode (self)
- 6 Properties
- Main article: iC8 Modules.
- Last modified: 10/21/2026
Description
This class is mainly used to set up the character's facial and head controls. RIFaceComponent data include 12 facial bones, 60 facial morphs and 24 custom morphs. You can open the details panel in the Face Puppet interface and press Ctrl+F2 to display more detailed data. The numbered data in the front are the 60 morphs data, the next are 12 facial bones data, while the rest belong to the custom set. A few of the bones within the 12 facial bones have no effect. You can tell if it has no effect, therefore invalid, if the data name is marked "N/A". In addition, an expression clip needs to be set up in order to create expression keys.
Class Methods
RLPy.RIFaceComponent.AddClip(self, kTime, strName, kLength)
Add facial clip.
Experimental API
Parameters
- kTime[IN] The time at which to add the clip - RLPy.RLTime
- strName[IN] Clip name - string
- kLength[IN] Clip length - RLPy.RLTime
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 avatar_list = RLPy.RScene.GetAvatars()
2 avatar = avatar_list[0]
3 face_component = avatar.GetFaceComponent()
4
5 result = face_component.AddClip(RLPy.RTime(0), "Clip", RLPy.RTime(10))
6 print(result)
RLPy.RIFaceComponent.AddExpressionKeys(self, kTime, kExpressions, kStrengths, kInterval)
Add an expression key.
Experimental API
Parameters
- kTime[IN] The time at which to add the key - RLPy.RLTime
- kExpressions[IN] Name of the expressions - string
- kStrengths[IN] The strength of expressions. The size of the kStrengths must be a multiple of kExpressions - float
- kInterval[IN] Time interval. When kStrengths is greater than kExpressions, the key will be downloaded at this interval. ex. len( kExp)== 10, len( kStrengths)= 30, kTime = 1000, kInterval = 2000, the result will be: Add keys at the time = 1000, values are kStrengths[0~9], Add keys at the time = 1000 + 2000, values are kStrengths[10~19], Add keys at the time = 1000 + 2000 + 2000, values are kStrengths[20~29], - RLPy.RLTime
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 #No example
RLPy.RIFaceComponent.AddExpressivenessKey(self, kTime, fWeight)
Add an expressiveness key.
Experimental API
Parameters
- kTime[IN] The time at which to add the key - RLPy.RLTime
- fWeight[IN] The strength of expressiveness - float
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIFaceComponent.BeginKeyEditing(self)
Start to add expression key.
Experimental API
1 # No example
RLPy.RIFaceComponent.BreakClip(self, kTime)
Break the clip at that time according to the specified time.
Experimental API
Parameters
- kTime[IN] specified time - RLPy.RLTime
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIFaceComponent.DeleteClip(self, spClip)
delete the clip.
Experimental API
Parameters
- kTimespClip[IN] specified clip.
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 # No example
RLPy.RIFaceComponent.EndKeyEditing(self)
End to add expression key.
Experimental API
1 # No example
RLPy.RIFaceComponent.GetAutoBlinkName(self)
Get the current setting of auto-blink.
Experimental API
Returns
auto-blink dispaly name - string
1 # No example
RLPy.RIFaceComponent.GetAutoBlinkNames(self)
Get the display name list of auto-blink.
Experimental API
Returns
The name list of autoblink, ex: None, Normal, Nervous - string
1 # No example
RLPy.RIFaceComponent.GetClip(self, uIndex)
Get facial clip.
Parameters
- uIndex[IN] Index of the clip - int
Returns
Pointer to the clip - RLPy.RIClip
1 # No example
RLPy.RIFaceComponent.GetClipByTime(self, kHitTime)
Get facial clip.
Parameters
- kHitTime[IN] time during clip range - RLPy.RLTime
Returns
Pointer to the clip - RLPy.RIClip
1 # No example
RLPy.RIFaceComponent.GetClipCount(self)
Get number of facial clips.
Experimental API
Returns
Number of facial clips - int
1 # No example
RLPy.RIFaceComponent.GetExpressionGroups(self)
Get the name list of expression group.
Experimental API
Returns
facial group list ex:["Brow","Eye","Nose"....] - string
1 # No example
RLPy.RIFaceComponent.GetExpressionNames(self, strType, bMocapOrder = False)
Get the name list of expression.
Experimental API
Parameters
- strType[IN] type name. ex: "Custom", - string
- bMocapOrder[IN] if true, it will return the order of expression for facial mocap RIFacialDevice::ProcessData() - bool
Returns
The name list of expression - string
1 # No example
RLPy.RIFaceComponent.GetExpressionSetUid(self)
Get id of the expression set.
Experimental API
Returns
uid - string
1 # No example
RLPy.RIFaceComponent.GetExpressionStatuses(self, strType)
Get the status list of expression data.
Experimental API
Parameters
- strType[IN] type name. ex: "Custom" - string
Returns
The status list of facial expression data - list
1 # No example
RLPy.RIFaceComponent.GetExpressionWeights(self, args)
Get weights of the expression.
Experimental API
Parameters
- kTime[IN] The time at which to get the weight - RLPy.RLTime
- kHead[IN] The name list of the expression. it will return all expression weights while the input list is empty.
Returns
weightlist of the expression
1 # No example
RLPy.RIFaceComponent.GetExpressiveness(self, kTime)
Get weights of the expressiveness.
Experimental API
Parameters
- kTime[IN] The time at which to get the weight - RLPy.RLTime
Returns
weightof the expressiveness
1 # No example
RLPy.RIFaceComponent.GetStrength(self)
Get the strength of facial animation.
Experimental API
Returns
The value of strength - float
1 # No example
RLPy.RIFaceComponent.SetAutoBlinkName(self, strName)
Set the current setting of auto-blink.
Experimental API
Parameters
- nIndex[IN] auto-blink display name
Returns
- RLPy.RStatus.Success - Success
- RLPy.RStatus.Failure - Fail
1 # No example
Description
This class is mainly used to set up the character's facial and head controls. RIFaceComponent data include 12 facial bones, 60 facial morphs and 24 custom morphs. You can open the details panel in the Face Puppet interface and press Ctrl+F2 to display more detailed data. The numbered data in the front are the 60 morphs data, the next are 12 facial bones data, while the rest belong to the custom set. A few of the bones within the 12 facial bones have no effect. You can tell if it has no effect, therefore invalid, if the data name is marked "N/A". In addition, an expression clip needs to be set up in order to create expression keys.
Constructor & Destructor
__init__ (self, *args, **kwargs)
Initializes a new ri face component instance.
Parameters
- args
- kwargs
Member Functions
AddClip (self, kTime, strName, kLength)
Create a new expression clip. See Also: GetKey, AddEyeKey, AddHeadKey, AddExpressionKey
Parameters
- kTime
- strName
- kLength
AddExpressionKeys (self, kTime, kExpressions, kStrengths, kInterval)
Adds an expression key. This function must be called between BeginKeyEditing() and EndKeyEditing().
Parameters
- kTime
- kExpressions
- kStrengths
- kInterval
AddExpressivenessKey (self, kTime, fWeight)
Adds an expressiveness key. This function must be called between BeginKeyEditing() and EndKeyEditing().
Parameters
- kTime
- fWeight
BeginKeyEditing (self)
Start to add expression key.
BreakClip (self, kTime)
Break the clip at that time according to the specified time.
Parameters
- kTime
DeleteClip (self, spClip)
Deletes the clip.
Parameters
- spClip
EndKeyEditing (self)
Ends key editing.
GetAutoBlinkName (self)
Gets the current setting of auto-blink.
GetAutoBlinkNames (self)
Gets the display name list of auto-blink.
GetClip (self, uIndex)
Gets facial clip.
Parameters
- uIndex
GetClipByTime (self, kHitTime)
Gets facial clip.
Parameters
- kHitTime
GetClipCount (self)
Gets number of facial clips.
GetExpressionBoneRotation (self, strBoneName, strExpression)
Gets rotation of target bone expression.
Parameters
- strBoneName
- strExpression
GetExpressionGroups (self)
Gets the name list of expression group.
GetExpressionNames (self, strType, bMocapOrder=False)
Gets the name list of expression.
Parameters
- strType
- bMocapOrder (default: False)
GetExpressionSetUid (self)
Gets id of the expression set.
GetExpressionStatuses (self, strType)
Gets the status list of expression data. if the animation target is ready of the expression animation, the corresponding element of the list will be set to True.
Parameters
- strType
GetExpressionWeights (self, *args)
Gets weights of the expression.
Parameters
- args
GetExpressiveness (self, kTime)
Gets weights of the expressiveness.
Parameters
- kTime
GetStrength (self)
Gets the strength of facial animation.
ImportExpression (self, kSettings)
Imports a new expression or update an old one with source and target list.
Parameters
- kSettings
IsCurrentPoseMode (self)
Gets Status of the Current Pose Mode (only in CC).
SetAutoBlinkName (self, strName)
Sets the current setting of auto-blink.
Parameters
- strName
SetCurrentPoseMode (self)
Enter Current Pose Mode (only in CC).
Properties
thisown
Indicates whether this SWIG proxy owns the underlying C++ object.