RLPy.RIVisemeComponent has a function:
AddVisemeKey (self, kTime, eVisemeID, fWeight)
which will always give an error.<class 'TypeError'>This official api document must be different from the real api in iclone.
Even official example give an error.Try this:
import math, RLPy
#-- Get Characters from current scene --#
avatar_list = RLPy.RScene.GetAvatars()
#-- Get First Character --#
avatar = avatar_list[0]
viseme = avatar.GetVisemeComponent()
#add clip
viseme.AddVisemesClip(RLPy.RTime(0), "test", RLPy.RTime(1000))
# try to add a key but gives error: class 'TypeError'
viseme.AddVisemeKey(RLPy.RTime(100) , RLPy.EVisemeID_AH, 50);
Please review this official page:
http://manual.reallusion.com/iClone/script/python/class_r_l_py_1_1_r_i_viseme_component.html
Edited
5 Years Ago by
butaixianran