take a look at the pumpThread module in:

C:\Program Files\Autodesk\Maya2011\devkit\other\PyQtScripts\qt

It doesn't have to make lots of threads like that example, but it can
send one out the same way.
just make sure to use the maya.utils.executeInMainThreadWithResult
function to return any "finished" message back to Maya.
Also, have you thought about using multiprocessing module that is
included in 2.6?
The multiprocessing module will actually spawn off another python
instance to complete your task in - haven't tried this in Maya yet.

2010/3/5 Horvátth Szabolcs <[email protected]>:
> Hi,
>
> I'd like to execute a long running command from Maya using Python as a
> separate thread, to avoid blocking the UI . The command does not have to
> interact with Maya or
> use any of Maya's API or commands, although it would be nice to get the
> output in the output window. Are there any tricks for using threading in
> Maya?
>
> Thanks in advance.
>
> Cheers,
> Szabolcs
>
> --
> http://groups.google.com/group/python_inside_maya

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to