I don’t think I will ever truly know why, but for some reason my laptop ALWAYS loads Mental Ray. But at work it turns into a guessing game, an incredibly annoying guessing game. So what can you do when you never know if the Mental Ray plugin will load after you click that beautiful little Maya icon? The only good answer is FORCE Maya to load the plugin against it’s will. It ends up being super easy too, you just have to edit the userSetup.mel or userSetup.py. Basically what the userSetup file is… it is a text file, either utilizing MEL or Python, every time Maya starts up it finds the first(and this is an important point) userSetup file and runs every line in it. Maya does allow for two userSetup files, in that you can have one MEL version and one Python version. But other than that the first one of each it finds it will read and ignore the rest. If you are running Maya at home the easiest place to put/find your userSetup file is in Maya’s script path. I am still using Maya 2012 so my sample directories will point there, but if you’re using 2013 then switch the 2012 to a 2013.

Windows – C:\Users\USERNAME\Documents\maya\2012-x64\scripts
MacOSX – /Users/USERNAME/Library/Preferences/Autodesk/maya/maya2012x64/scripts

If a userSetup file doesn’t exist, either a MEL or Python variant, then open a text editor and build your own one. Just make sure you spell it correctly; userSetup. The S of setup must be capitalized. If it already exists then open it in a text editor and append the following lines. Obviously if you are creating a userSetup.py use Python, and if creating a userSetup.mel write it in MEL. For you’re convenience I have given you both just in case Python scares you and want to stay true to your MEL roots.

#-- Python --#
import maya.cmds as mc

if not (mc.pluginInfo("Mayatomr",q=True,loaded=True)):
	mc.loadPlugin("Mayatomr")
else:
	pass

#-- MEL --#
int $checkMR = `pluginInfo -query -loaded -name "Mayatomr"`;
if($checkMR != 1)
{
    loadPlugin Mayatomr;
}

All the code does is check if Mental Ray is loaded, and if it isn’t it makes Maya load the plugin. Also, there is no reason to put it in both MEL and Python userSetup files, as that would be redundant, either works just fine. Finally save the userSetup file, restart Maya, and know you will never have to worry if Mental Ray will/won’t load at start up ever again.