|11 November 2010||#1|
Join Date: Apr 2005
Closing maya from cmd line after export
I've written a python script that iterates through a series of folders and exports all the files found within. The script launches Maya from the command line as below
I can't figure out how to close each Maya command line session after export.
I added quit -force to the end of the above command but that just closed Maya before it had a chance to export.
Is there a way I could get confirmation from Maya that it has exported then force the close?
p.s. I'm very inexperienced with MEL
Thanks in advance,
|11 November 2010||#2|
Join Date: Apr 2004
If you dont need the UI, you can do it with mayabatch which will be closed automatically after execution is done.
Or you write a temporaray mel script with a quit; at the end and you exectute this script instead of your -command 'file ....'
|11 November 2010||#4|
Join Date: Jun 2006
If you don't need the functionality of the UI or the viewport you can run maya through standalone inside the python script. long as maya is in the sys.path it should be able to load maya and execute your script. This is similar to the batch mode
Otherwise you could use
example from the docs
|Thread Closed share thread|