Maya : open Reference in new instance of Maya.

Ever work with lots of references in a scene and you keep opening new instances of Maya to tweak a referenced file as a workaround trying to avoid using the save reference edits because of the (well justified) fear of wrecking a perfectly good referenced asset?

Well, no more, here’s a way to add a new feature to the RMB menu and File menu in the Reference Editor that opens the currently selected reference in a new instance of Maya.

Before you start doing this, know that it involves changing the MAYA_LOCATION/scripts/other/referenceEditorPanel.mel file that is an essential part of Maya, so, BACKUP referenceEditorPanel.mel BEFORE PROCEEDING.

If you screw up files that are an integral part of Maya and you don’t have extra workstations with Maya installs that can be used to restore those files should you screw up, there’s only one way to restore those files, and that is a reinstall of Maya.

The procedure is very simple,
Open up the MAYA_LOCATION/scripts/other/referenceEditorPanel.mel file in your favourite script editor.
Go to the end of line 214 (Maya 2009 and 2010, x86 and x64 on Windows) and create a new line.
Copy the folowing piece of code.

		// in Maya 2010 add at the end of line 214 of referenceEditorPanel.mel
		menuItem -divider true;

			-label ("Edit in New instance")
			-annotation ("Opens a new instance of Maya with the file")
			-command ("string $referenceFile[] = `sceneEditor -q -si $gReferenceEditorPanel`;" + "system(\"start \\\"\" + getenv(\"MAYA_LOCATION\") + \"/bin/maya.exe\\\" \\\"\"+$referenceFile[0]+\"\\\"\");")



And paste it at the newly created line.
Save, start Maya, and you are ready to go.

That’s it.

edit : I just noticed that WordPress’ auto formatting screwed with the code, fixed it now (if you tried this and it didn’t work, WordPress was the reason as to why.



Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.