![]() I’ve been meaning to get around to writing up a blog entry on my general framework for managing Maya background processes, but until then, try experimenting with it on your own! I’ve found the amount of processing that can be completed, all from within the confines of a nice Maya tool and without preventing your artists to continue work, is limitless when you take advantage of child processes. There’s a great introduction with example at this blog. ![]() Definitely familiarize yourself with the subprocess Python module. If you want your process to start in the background you can either use system () and call it in the same way your shell script did, or you can spawn it: import os os. The trick to running processes invisibly and “asynchronously” lies in the ability to generate background child processes of Maya. (As far as I’m aware it’s impossible to execute any maya.cmds commands from another thread.) You’ll quickly find yourself crashing Maya and getting all sorts of horrible print outs in the console log. ![]() ![]() I’ve not had a ton of luck with multithreading in Maya. The concept of allowing artists to continue working even while a tool is processing has been a guiding principal behind much of my Maya tool development. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |