OK Just had a tinkle with this and came up with the following.
import os, RLPy
from winreg import *
print("--- script begin ---")
# 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])
# print(ic_template_path)
cam = None
def loadCamera():
global cam
#RLPy.RFileIO.LoadFile(ic_template_path + "//iClone Template//Camera//Dolly Pan.iCam")
print("adding camera")
cam = RLPy.RScene.FindObject(RLPy.EObjectType_Camera, "Camera")
if cam != None:
print("ok")
else:
print("failed")
def setCamera():
global cam
print(cam)
ts_c = cam.GetControl("Transform")
print(ts_c)
loadCamera()
setCamera()
print("--- script end ---")
and the output in Iclone.
As you can see it is now seems to be working as it should?
I have substituted the Dolly Pan for a normal standard camera and commented out the load camera options.
If I try a Dolly Pan Cam it will not work? it will only work with the standard camera? from the Create Menu/ Camera?
Hope this helps to point in the right direction.
Chris.
Edited
5 Years Ago by
videodv