Hi RL,
Therefore I did not find a way to set a key at frame 1...
Any hints ?
Here is the code:
import os, RLPy, math
from winreg import *
#-- Get iClone 7 default template path --#
Registry = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
RawKey = OpenKey(Registry, r"SOFTWARE\Reallusion\iClone\7.0")
ic_template_path = os.path.abspath(QueryValueEx(RawKey, "Template Data" )[0])
#-- Load Box_001.iProp --#
RLPy.RFileIO.LoadFile(ic_template_path + "//iClone Template//Props//3D Blocks//Box_001.iProp")
#-- Get Prop --#
prop = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box_001")
#-- Get Transform Control and Data --#
ts_control = prop.GetControl("Transform")
ts_data_block = ts_control.GetDataBlock()
#-- Set X transform Key to 100 at frame 1 --#
ts_data_block.SetData("Position/PositionX", RLPy.RTime.IndexedFrameTime(1, RLPy.RGlobal.GetFps()), RLPy.RVariant(100))