PDA

View Full Version : Open file in new maya instance


Willer00
10-29-2011, 11:34 AM
Hello,

I am building a script which will make a window with a couple of buttons. Pressing the buttons must open specific scenes. That works, but it opens the scene in the current maya instance if I do it like this:

maya.cmds.file( 'D:/Projects/pythonTest/scenes/testScene.mb', o=True, f=True)

But I want maya to open a new maya instance and then open the scene in the new maya instance.
How can I achieve this? I think starting maya.exe with this file. But I cant get it to work.

Thank you,
Boyo

zoharl
11-01-2011, 04:04 AM
Try

import os
os.system(cmd)

where cmd points to maya exe with command line arguments to open a file.

berniebernie
11-02-2011, 04:04 PM
if your default editor is the right maya for .mb and .ma you should simply be able to call os.system(filepath)

CGTalk Moderation
11-02-2011, 04:04 PM
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.