Hi Justin,
I was looking at the use of `threading` while waiting for replies.
I tried the following:
import threading
from maya import cmds
t = None
def run_check():
global t
t = threading.Timer(5.0, run_check)
t.start()
get_panels()
def get_panels():
for pane in cmds.getPanel(visiblePanels=True):
print '>>> pane: ', pane
run_check()
It seems to be running and printing out the correct results on the first
run, but as soon as the next 5 seconds is up, instead of expecting the same
results, I got the following error:
# # Exception in thread Thread-8:
# Traceback (most recent call last):
# File
"/builds/python_maya/2.7.11/852a2c8c4f/lib/python2.7/threading.py", line
801, in __bootstrap_inner
# self.run()
# File
"/builds/python_maya/2.7.11/852a2c8c4f/lib/python2.7/threading.py", line
1073, in run
# self.function(*self.args, **self.kwargs)
# File "<maya console>", line 11, in run_check
# File "<maya console>", line 29, in test
TypeError: Flag 'visiblePanels' must be passed a boolean argument
Pretty sure that I am passing a boolean argument into `visiblePanels`...
Any ideas?
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/64f6fd49-3a5e-4e03-a612-7bfda5bc786e%40googlegroups.com.