Hello,
I am trying to move a camera in iClone (named "camera1"). Running the following script:
camera = RLPy.RScene.FindObject(RLPy.EObjectType_Camera, "camera1")
if not camera.IsValid():
log_label.setText("camera is not available")
else:
log_label.setText("camera is available")
control = camera.GetControl("Transform")
transform = RLPy.RTransform.IDENTITY
transform.T().x = -75.0
transform.T().y = -150.0
transform.T().z = 250.0
time = RLPy.RTime(0)
control.SetValue(time, transform)
# update after adding a key
camera.Update()
gives me the following error:
control.SetValue(time, transform)
AttributeError
'NoneType' object has no attribute 'SetValue'
What am I doing wrong?
Also, can I create a camera directly from the python script?
Tnx!