View Full Version : Open file in new maya instance

10 October 2011, 10:34 AM

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,

11 November 2011, 03:04 AM

import os

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

11 November 2011, 03: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 November 2011, 03: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.