Optical Device setup with Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am writing a Python script to move an Optical Device into my scene and properly set it up. Here is what I have so far:
from pyfbsdk import *
from pyfbsdk_additions import *
def FindDevice( pName 😞
lResult = None
for lDevice in FBSystem().Scene.Devices:
if lDevice.Name == pName:
lResult = lDevice
break
return lResult
op = FBModelOptical("OP")
lTC = FBCreateObject("Browsing/Templates/Devices","Device Name", "Device Name")
FBSystem().Scene.Devices.append(lTC)
d = FindDevice("Device Name")
So far this script creates an optical model and puts my optical device in the scene. I can use commands like "d.Online = True" and it will work, however I cannot seem to be able to set the optical model for this device.
I have tried:
d.OpticalModel = op
d.SetOpticalModel = op
I'm sure that I am just not using the proper assignment for this object. If anyone has any information on this it would be greatly appreciated.
Thanks
-Chris