IC8 Python API:RLPy RIFaceComponent

From Reallusion Wiki!
Jump to: navigation, search

Contents

Main article: iC8 Modules.
Last modified: 12/27/2022

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