IC Python API:RLPy RVisemeSmoothOption

From Reallusion Wiki!
Jump to: navigation, search
Main article: Modules.

Description

This class is responsible for recording viseme smooth and strength settings for parts of the mouth: jaw, lips and tongue. These settings can be fed into a RIVisemeComponent using RIVisemeComponent.AddVisemeOptionClip().

 1 # Get avatar viseme component
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 viseme_component = avatar.GetVisemeComponent()
 5 
 6 # Add viseme option clip
 7 smooth_option = RLPy.RVisemeSmoothOption()
 8 smooth_option.SetStrengthEnable(True, True, True)
 9 smooth_option.SetStrengthValue(0, 0, 1)
10 start_time = RLPy.RGlobal.GetTime()
11 clip_name = "Default"
12 result = viseme_component.AddVisemeOptionClip(smooth_option, start_time, clip_name)

Member Functions

SetStrengthEnable ( self, bJawEnable, bLipsEnable, bTongueEnable )

Enable/disable viseme strengthening for parts of the mouth.

See Also: SetStrengthValue

Parameters

bJawEnable [IN] Enable/disable jaw strength - bool
bLipsEnable [IN] Enable/disable lips strength - bool
bTongueEnable [IN] Enable/disable tongue strength - bool
1 # Set strength enable
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 jaw_enable = True
4 lips_enble = False
5 tongue_enble = True
6 viseme_smooth_option.SetStrengthEnable(jaw_enable, lips_enble, tongue_enble)

SetStrengthValue ( self, fJaw, fLips, fTongue )

Set the viseme strength values for parts of the mouth.

Parameters

fJaw [IN] Strength value of jaw - float [0.0,1.0]
fLips [IN] Strength value of lips - float [0.0,1.0]
fTongue [IN] Strength value of tongue - float [0.0,1.0]
1 # Set strength value
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 jaw_value = 0.4
4 lips_value = 0.5
5 tongue_value = 0.6
6 viseme_smooth_option.SetStrengthValue(jaw_value, lips_value, tongue_value)

SetSmoothEnable ( self, bJawEnable, bLipsEnable, bTongueEnable )

Enable/disable viseme smoothing for parts of the mouth.

Parameters

bJawEnable [IN] Enable/disable jaw smoothing - bool
bLipsEnable [IN] Enable/disable lips smoothing - bool
bTongueEnable [IN] Enable/disable tongue smoothing - bool
1 # Set smooth enable
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 jaw_enable = False
4 lips_enble = True
5 tongue_enble = False
6 viseme_smooth_option.SetSmoothEnable(jaw_enable, lips_enble, tongue_enble)

SetSmoothValue ( self, fJaw, fLips, fTongue )

Set the viseme smoothing values for parts of the mouth.

See Also: SetSmoothEnable

Parameters

fJaw [IN] Smooth value for the jaw - float [0.0,1.0]
fLips [IN] Smooth value for the lips - float [0.0,1.0]
fTongue [IN] Smooth value for the tongue - float [0.0,1.0]
1 # Set strength value
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 jaw_value = 0.4
4 lips_value = 0.2
5 tongue_value = 0.7
6 viseme_smooth_option.SetSmoothValue(jaw_value, lips_value, tongue_value)

GetStrengthEnableSetting ( self )

Get all the viseme strengthening states for the mouth parts.

See Also: GetStrengthValueSetting

Returns

Viseme trengthening states for the jaw, lips and tongue - bool list

1 # Get strength enable state
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 enable_list = viseme_smooth_option.GetStrengthEnableSetting()
4 print(enable_list[0])  # Jaw strength enable status
5 print(enable_list[1])  # Lips strength enable status
6 print(enable_list[2])  # Tongue strength enable status

GetSmoothEnableSetting ( self )

Get all the viseme smoothing states for the mouth parts.

See Also: GetSmoothValueSetting

Returns

Viseme smoothing states for the jaw, lips and tongue - bool list

1 # Get smooth enable state
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 enable_list = viseme_smooth_option.GetSmoothEnableSetting()
4 print(enable_list[0])  # Jaw smooth enable status
5 print(enable_list[1])  # Lips smooth enable status
6 print(enable_list[2])  # Tongue smooth enable status

GetStrengthValueSetting ( self )

Get all the viseme strength values for the mouth parts.

See Also: GetStrengthEnableSetting

Returns

Strength values for the jaw, lips and tongue - float list

1 # Get strength values
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 value_list = viseme_smooth_option.GetStrengthValueSetting()
4 print(value_list[0])  # Jaw strength value
5 print(value_list[1])  # Lips strength value
6 print(value_list[2])  # Tongue strength value

GetSmoothValueSetting ( self )

Get all the viseme smoothing values for the mouth parts.

See Also: GetSmoothEnableSetting

Returns

Smoothing values for the jaw, lips and tongue - float list

1 # Get smooth values
2 viseme_smooth_option = RLPy.RVisemeSmoothOption()
3 value_list = viseme_smooth_option.GetSmoothValueSetting()
4 print(value_list[0])  # Jaw smooth value
5 print(value_list[1])  # Lips smooth value
6 print(value_list[2])  # Tongue smooth value