PDA

View Full Version : How to spawn a new process with MEL?


stunndman
07-05-2002, 11:17 AM
i'm looking for a way to spawn a new process with MEL - like fork in unix - e.g. opening an external editor without blocking maya


can't figure it out

stunndman
07-05-2002, 11:27 AM
yikes - sorry - just found it - MEL command "system" - this one should have been obvious

alexx
07-05-2002, 03:50 PM
carefull..

usually the external started process blocks maya as well.
if you want it to be started non-blocking, use:

system "start application";

this runs the application independent from maya

cheers

alexx

stunndman
07-05-2002, 04:01 PM
thanks for the hint - using "system start ..." works fine

another question - actually i'm launching a renderer from the script and i wonder whether i can keep listening to the output of the application i called via "system" - something like a buffer from stdout that can be read with MEL - or at least get informed when the process dies (with a return code maybe)

i know that's not very likely to happen - but maybe someone has already researched this one

alexx
07-05-2002, 04:47 PM
have a look:

system "start render > d:\\test.txt";

this will start the batch render process and write the results to the file d:\test.txt
that file you can open with mel and parse it if you like.

btw:
if you dont have too many render machines, have a look at muster (www.vvertex.com)
it comes with 2 free render machines and does all you try to do

cheers

alexx

stunndman
07-05-2002, 05:46 PM
Originally posted by alexx
have a look:

it comes with 2 free render machines and does all you try to do

cheers

alexx

nah, don't discourage me so fast :) - fortunately i'm not trying to write another network rendering tool

i'm writing this for a tighter integration of MayaMan/Entropy into Maya - like non-blocking rendering and rendered images being loaded in the normal render view editor

stunndman
07-05-2002, 06:37 PM
ok - another one - i'm trying to find a way to trigger a script at certain time invervals (like every 30 seconds) - there does not seem to be any any timer function in the standard MEL repertoire - i could attach a script job to the idleEvent but i would have to burn cycles with loops and that would defeat the purpose

any ideas?

CGTalk Moderation
01-13-2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.