avoiding the path inconsistencies in maya 2011.5 (2)

david | dj mod,mel script | Monday, October 4th, 2010

I may have been a little naive thinking that I could simply copy a few scripts from one install to the other and upgrade my sp1 install to subscription advantage pack without the name change. Well it almost worked but as it turns out the instructions in my previous post missed some things.

I've updated the list of files that need to be copied and I should point out that the additions (marked with a "+") will overwrite existing files in the sp1 install. Normally I wouldn't advise doing something like this, but its a bit of a special case. We have both installation packages at hand and they are both fresh installs. If something goes wrong we can just uninstall everything and start again.

So, here's what I missed:

There are 80 assorted Mocap Examples in the presets folder.
Updated mel scripts that handle the creation of the "Effects Assets" menu.
Updated version of the Mayatomr plugin that allows rendering of compressed EXR files.

I also forgot to mention the "Craft Directors Studio" plugin support files which are installed to a location outside of the main maya install folder. (C:\Program Files (x86)\Craft Animations by default). You don't need to do anything with these. You just need to use the plugin manager to load the craftdirectorstudioadaptor_maya2011.5.mll. Do the same for the Substance.mll while you're there. (And ICEFlow.mll if you're lucky enough to have access to all that awesomeness too!)

If you don't see the "Effects Assets" menu in nDynamics, then you have to use the menu set customise UI to revert to the default nDynamics menus. This is explained in detail in the SAP release notes.

If I discover any other missing bits and pieces I'll update here.


  1. You don't have to overwrite or delete default Mel scripts (including AE Templates). Just place all the new Mel scripts (including any duplicates of default scripts) inside the "scripts" directory inside your user prefs.

    For example, the full path (On Vista) for my customized default Mel scripts for Maya 2011x64 is...


    All customized scripts in this folder will be the ones that Maya 2011 uses on starup, even if those custom scripts have the same name as the default scripts in the Maya install directory.

    This works for any script with the ".mel" extension, including AE Templates.

    If you want to return to Maya's default behavior, just delete (or move) your customized version of the default Maya script out of that user "scripts" directory. Maya's default scripts (from the Maya install directory) will then take precedence at startup.

    The previous instuctions are good practice for at least the following reasons:

    -You can always go back to Maya's default behavior, without a total reinstall, by moving or deleting your custom scripts out of that user-specific "scripts" direcory.

    -Your customized behavior only applies to your own user prefs. No other users will be affected by your changes (assuming each user has a unique login ).

    -Your changes to Maya's default behavior are portable -- you can carry them to whatever facility you work at. Just make sure you're matching Maya versions for your scripts with the Maya version at your workplace. Also, make sure you are a distinct user at your workplace. Some facilities only have one login name for several employees. In that case you need to write a batch script.

    First caveat for scripts: All customized default scripts need to be placed directly within the "\2011-x64\scripts" directory, NOT in any subdirectory inside that directory. Default scripts will not be overridden if you put them in a subdirectory within "\2011-x64\scripts".

    Second caveat for customizing Maya's default scripts: For any new version of Maya you SHOULD NOT use the same custom edited default scripts from the older version of Maya in your new version of Maya.

    For example, I would not use default scripts that I changed for 2010 in a 2011 install. When Maya moves up a version(or hotfixes or service packs), I use a text file comparison program to merge my changes into Maya's new default scripts. It seems that most of the time, when Maya goes up a version, they fix bugs and add features to previous default scripts so you need to incorporate their changes with your own custom scripted behavior.

    Additional Note on customizing Maya's default scripts: Merging custom changes for each new version of Maya can take a while. Also, it may take a significant amount of time to debug if there are major differences in new default scripts. I have about 40 customized default scripts and they take me a couple of days to merge changes from newer versions of Maya's default scripts. Some of my scripts only have a couple of lines of customization; others have major differences.

    Comment by mdfisher272 — October 5, 2010 @ 5:25 pm

  2. DISCLAIMER TO THE READER: Use the following advice at your own risk. Batch scripting and shell scripting should only be undertaken by a user who knows and accepts all the hazards and consequences of executing batch or shell scripts.

    If the facility you work at only has one login for several employees, you need to write a batch script that augments the MAYA_APP_DIR variable to point to your own custom user prefs. If you don't, when you copy your prefs on top of the defaults for that user, you'll change the default prefs for every user who uses that same login.

    The following is a Windows batch script I wrote("startmaya.bat") to dynamically redirect where Maya looked for my prefs. It redirects my prefs to a folder I called "maya_mike". The system was Win XP:

    #begin startmaya.bat batch file
    set MAYA_APP_DIR=C:\Documents and Settings\Owner\My Documents\maya_mike\
    start /max maya.exe
    # end of batch file

    The path after "set" above redirects Maya to look for prefs anywhere accessible from that computer. Inside the "maya_mike" folder is my "2011-x64" prefs folder and the "scripts" folder that all Versions of Maya will source. At different facilities I change the "maya_mike" path to wherever I copied my custom prefs.

    Next, I make a shortcut to "startmaya.bat" and drag the shortcut to either the quicklaunch bar or the desktop. This shortcut icon is now my own custom Maya startup button that will only use the preferences I pointed to using the "set" command. Any user who clicks the regular Maya startup icon will get the default preferences for that user name, not my custom prefs.

    I keep "startmaya.bat" in some subdirectory of my custom prefs folder so it always travels with me when I move my custom prefs. It's also the reason I create a shortcut -- only the shortcut is outside my Maya prefs and so I'm sure to never leave my batch script behind.

    For any non-Windows OS the batch script (shell script) will have it's own format. You can find out how to set environment variables and execute programs from shell scripts in many online forums. Just do a Google search.

    You should always test shell scripts on your home computer to see if they work properly. Only then, should you use the shell script(s) on a work computer subject to the above DISCLAIMER.

    Comment by mdfisher272 — October 5, 2010 @ 6:15 pm

  3. Well the verdict is in. The winner of the longest comment award goes to..... mdfisher272. Twice!

    Seriously though, thank-you for both your well informed comments. There is some excellent advice there. While I whole-heatedly agree in principle (actually take a look at my customizing maya post... http://www.djx.com.au/blog/customizing-maya/ and you'll see what I mean), in this case I was intentionally trying to "slipstream" the two versions into one. This way I can deploy a common installation to all the nodes on the render farm.

    I quite like your batch script idea for starting maya. I'm pretty much tied to one workstation most of the time, so setting the system environment variables is not a problem, but I can see how if you move around a lot the batch idea would be convenient.

    Comment by david — October 5, 2010 @ 7:32 pm

  4. Sorry for the long comment. I just wanted to be as clear as I could for anyone who might read it. Many people don't know how that special "scripts" directory works.

    I looked back at your customizing Maya blog to see if there was overlap. The solution I propose varies from yours in that my env var only lasts for each shell execution of Maya -- it is not persistent. I've worked at a number of different facilities and at least a 3rd of them use a generic local user for the constantly rotating staff of freelancers.

    If you set a persistent env var, it will apply to everyone who uses that account on that machine -- everyone who uses Maya after you will have preferences pulled from they-don't-know-where. Even if they try to solve the problem with a reinstall of Maya, that env var will not unset.

    My comments were not directed at you per se, but rather for anyone who might need a solution to this common problem. Your blog is one of the best forums around for getting into the nuts-and-bolts of Maya so I thought I would contribute.

    Comment by mdfisher272 — October 6, 2010 @ 7:23 am

  5. Hey don't apologize. Its great to get such a detailed explanation. Your contribution is appreciated.

    Comment by david — October 6, 2010 @ 8:20 am

  6. Great post, thanks for the info.

    I was planning on using the Advantage Pack default installation on my home machine but ran into a problem when attempting to load Bonus Tools 2011. In a nutshell, I can't get the tools to load with 2011.5 even though I had the installation copy my old prefs (including userSetup.mel where bonus tools is referenced). No matter how hard I look I can't seem to determine how Bonus Tools is bound to 2011 and how to make it work with 2011.5. If you have any experience with this or know of a path I might need to update to make this work I would appreciate it.

    I would try your 'slipstream method' but I really just need bonus tools for home use. Thanks!


    Comment by nbreslow — October 7, 2010 @ 3:17 am

  7. If you have the 2011 bonustools installed, they are probably in a folder like C:\Program Files\Autodesk\MayaBonusTools2011

    To get the working in the SAP you can do this.

    1. create a folder called "modules" inside your "2011.5-x64" folder.
    2. create a text file called "MayaBonusTools2011.txt" inside the modules folder.
    3. add the following line to the text file (including the + sign)

    + MayaBonusTools2011 1 C:\Program Files\Autodesk\MayaBonusTools2011\

    4. Now when you start maya you should see the bonus tools menu again. If not you may need to edit your userSetup.mel to include the command "bonusToolsMenu;" (no quotes).

    Let me know if it still doesn't work.

    Comment by david — October 7, 2010 @ 8:31 pm

  8. Thank you so much - worked like a charm! Appreciate the help. -NB

    Comment by nbreslow — October 9, 2010 @ 2:00 am

  9. Hi david,

    The advice you gave to nbreslow, would that apply to vray plugin as well?

    I just cannot get it to work with Maya 2011 SAP. I have been on the chaos forums but the advice on their did not work.

    Would really like to get it up and running with it tomorrow. Any advice?



    Comment by chuckie7413 — November 18, 2010 @ 9:53 am

  10. I have not tried it, since I went the "slipstream" route, for exactly this kind of reason. However the vray folder does appear to be self contained and should work as a module. I'm assuming that after installing vray you have a folder here... C:\Program Files\Autodesk\Maya 2011 Subscription Advantage Pack\vray
    Then you would create vray.txt in your modules folder with this line in it

    + vray 1 C:\Program Files\Autodesk\Maya 2011 Subscription Advantage Pack\vray\

    Again, I have not actually ttried this, but I wish you luck.

    Comment by david — November 18, 2010 @ 7:33 pm

  11. Module thing worked a treat David.


    Oh and great post by mdfisher272. Some additional information there that goes well with your great Customisation blog post.



    Comment by chuckie7413 — November 19, 2010 @ 10:50 am

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck