I want to create a remote camera / camera linking over IP system using the built in python in Maya 8.5
I need to use threading for the camera 'server' to run within maya.
If I call this:
import thread
import maya.cmds
cam_p = maya.cmds.camera('persp', q=True, p=True)
print cam_p
I get
[8.4017873142238102, 18.186533479473226, 40.095635297704753]
Which is fine, but if I create a thread and call it:
import thread
import maya.cmds
def remCamera_run(name):
thread.start_new_thread(remCamera_run, ( 'persp', ))
I get this:
Argument to query flag must be a boolean: # TypeError# File "", line 4, in nexCamera_run
# Traceback (most recent call last):
# Unhandled exception in thread started by
Starting persp
If I use e=True to set the value, it works, its just q=True in a thread that barfs.
Any thoughts on this are welcome - including a completely different approach if nescacsarry - I am using threading so I can have a socket open, listening for camera requests, and it won't block maya.