Difference between revisions of "IC Python API:RLPy RVisemeKey"
From Reallusion Wiki!
Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} {{last_modified}} == Description == RVisemeKey is used to store the Viseme ID and Weight (influence over the the m...") |
Chuck (RL) (Talk | contribs) m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOC}} | {{TOC}} | ||
{{Parent|IC_Python_API:RL_Python_Modules|Modules}} | {{Parent|IC_Python_API:RL_Python_Modules|Modules}} | ||
− | |||
== Description == | == Description == | ||
− | RVisemeKey is used to store the Viseme ID and Weight (influence over | + | RVisemeKey is used to store the Viseme ID and Weight (influence over the motion). |
Available VisemeIDs: | Available VisemeIDs: | ||
Line 64: | Line 63: | ||
==== Parameters ==== | ==== Parameters ==== | ||
− | :eID | + | :'''eID''' [IN] Viseme ID - [[IC_Python_API:Enums#RLPy.EVisemeID|RLPy.EVisemeID]] |
− | :fWeight[IN] Viseme motion influence value - float | + | :'''fWeight''' [IN] Viseme motion influence value - float |
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> |
Latest revision as of 18:02, 9 November 2020
Contents
- Main article: Modules.
Description
RVisemeKey is used to store the Viseme ID and Weight (influence over the motion).
Available VisemeIDs:
NONE = 0, EE = 1, ER = 2, IH = 3, AH = 4, OH = 5, W_OO = 6, S_Z = 7, CH_J = 8, F_V = 9, TH = 10, T_L_D_N = 11, B_M_P = 12, AE = 14, R = 15, K_G_H_NG = 13
See also: RIVisemeComponent
Inheritance
RKey > RVisemeKey
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 key
7 key = RLPy.RVisemeKey()
8 key.SetID(RLPy.EVisemeID_AE)
9 key.SetWeight(50)
10 key.SetTime(RLPy.RTime(10))
11 result = viseme_component.AddVisemeKey(key)
Constructor
__init__ (self)
Create a new Viseme Key.
1 key = RLPy.RVisemeKey()
__init__ (self, args)
Create a new Viseme Key from an existing Key.
1 key = RLPy.RVisemeKey()
2 key.SetID(RLPy.EVisemeID_AE)
3 key.SetWeight(50)
4 key.SetTime(RLPy.RTime(10))
5 key2 = RLPy.RVisemeKey(key)
Parameters
- kRhs [IN] An existing RVisemeKeyobject - RLPy.RVisemeKey
__init__ (self, eID, fWeight)
Create a new Viseme Key and initialize with a specific Key Weight.
Parameters
- eID [IN] Viseme ID - RLPy.EVisemeID
- fWeight [IN] Viseme motion influence value - float
1 key = RLPy.RVisemeKey(RLPy.EVisemeID_AE,50)
Member Functions
Clone ( self )
Duplicate the Key data and return a new object.
GetID( self )
Get the Key's ID.
Returns
- The part type of the viseme ID - RLPy.EVisemeID
1 key = RLPy.RVisemeKey(RLPy.EVisemeID_AE,50)
2 type = key.GetID()
SetID( self, eID )
Set viseme ID of the key.
Parameters
- eID [IN] Viseme ID of the key - RLPy.EVisemeID
1 key = RLPy.RVisemeKey()
2 key.SetID(RLPy.EVisemeID_OH )
GetWeight( self )
Get viseme weight of the key.
Return
Weight of the key - float
1 key = RLPy.RVisemeKey(RLPy.EVisemeID_AE,50)
2 weight = key.GetWeight()
SetWeight( self, fWeight )
Set weight of the key.
Parameters
- fWeight [IN] Viseme weight of the key. - float (ranges from 0.0 to 100.0).
1 key = RLPy.RVisemeKey()
2 key.SetWeight(50)