[MtoA] Switching between multiple versions of MtoA


start_menu_mtoa

If, like me, you need to switch between different versions of MtoA, here’s a recipe for setting that up.

First, you have to install multiple versions. As you probably already know, the MtoA installer always wants to uninstall first. I take care of that by zapping the Uninstall registry entry with this command:

reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\MtoA2016" /f

Then I run the MtoA installer and install in a folder with the version name, like this:
C:\solidangle\mtoadeploy\2016-1.2.7.3

I start Maya with a batch file that creates a symbolic link named “C:\solidangle\mtoadeploy\2016” that links to the version of MtoA I want to use:

rmdir C:\solidangle\mtoadeploy\2016
mklink /D C:\solidangle\mtoadeploy\2016 C:\solidangle\mtoadeploy\2016-1.2.7.3
rem mklink /D C:\solidangle\mtoadeploy\2016 C:\solidangle\mtoadeploy\2016-1.2.2.0

set RLM_DEBUG=arnold
start "" "C:\Program Files\Autodesk\Maya2016\bin\maya.exe" %* -log %TEMP%\maya.log

My batch file also adds the location of my custom mtoa.mod to MAYA_MODULE_PATH. My custom mtoa.mod points to “C:\solidangle\mtoadeploy\2016”, and handles all versions of Maya:

+ MAYAVERSION:2016 mtoa any C:\solidangle\mtoadeploy\2016
PATH +:= bin
+ MAYAVERSION:2015 mtoa any C:\solidangle\mtoadeploy\2015
PATH +:= bin
+ MAYAVERSION:2014 mtoa any C:\solidangle\mtoadeploy\2014
PATH +:= bin
+ MAYAVERSION:2013 mtoa any C:\solidangle\mtoadeploy\2013
PATH +:= bin

 

[MtoA] Running a silent install on Windows


On Windows, if MtoA isn’t already installed, then the /S flag will do a silent install:

MtoA-1.2.7.3-2016.exe /S

You can also specify an install location with the /D flag:

MtoA-1.2.7.1-2016.exe /S /D=C:\solidangle\mtoadeploy\2016-1.2.7.1
There’s no help, but I found the /S and /D via Google:

There is no silent install on OSX or Linux.

If another version of MtoA is installed, there will be some pop-up dialogs. You can get around that by doing a silent uninstall, like this:
C:\solidangle\mtoadeploy\2016-1.2.7.1\uninstall.exe /S

or, if you want to keep the existing install around, you could do this:

reg DELETE HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\MtoA2016 /f

After you delete that registry key, an MtoA install won’t detect an existing installation, so you get to keep the old install, and install a new version.

 

[Arnold] System requirements: minimum Windows version


As of Arnold 4.2.3.1, the minimum Windows version is Windows 7. We no longer support Windows versions before Windows 7 and Windows Server 2008 R2.

This applies to all plug-ins (such a MtoA 1.2.02 and later, or SItoA 3.4 and later) that use Arnold 4.2.3.1 or later.

If you try to load an Arnold plugin on an unsupported Windows, you’ll get an error (something like “The specified procedure could not be found”).

On Vista with Arnold 4.2.3.1 or later, kick -nodes gives you a more specific error:

"kick.exe - Entry Point Not Found" 
"The procedure entry point SetThreadGroupAffinity could not be located in the dynamic link library KERNEL32.dll."

[MtoA] Installing the BA shaders in Maya


You can use the BA shaders in Maya with MtoA. The BA shaders are Arnold shaders, so you can use them anywhere that you use Arnold.

Here’s how:

  • Download the Maya mental ray package of the BA shaders. For example, for Maya 2014, the most recent version is
    >>>v25.01.09 Maya 2014 mentalRay
  • Extract the archive. For example, you could extract the archive to a C:\solidangle\BA folder.
  • Set MAYA_SCRIPT_PATH to point to the scripts\AEtemplates folder. For example:
    set MAYA_SCRIPT_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___Maya_2014_MRay\scripts\AETemplates
  • Download the Arnold shaders. For example, for Maya 2014, the most recent version is >>>v25.01.09 Arnold 4.1 (mentalRay addon required for UI)
  • Extract the archive, and set ARNOLD_PLUGIN_PATH to point to the Arnold\win64 folder. For example:
    set ARNOLD_PLUGIN_PATH=C:\solidangle\BA\140219__baEssential_25.01.09___All_Arnold_4_1_3\Arnold\win64
  • Start Maya. The BA shaders should be available, and the AE should look “nice” for the BA shaders.

Another case of a missing entry point


entry_point_not_found
In this case, a user installed the latest MtoA, but when he went to load mtoa.mll in the Plug-in Manager, he got this error:

---------------------------
Settings/Preferences: maya.exe - Entry Point Not Found
---------------------------
The procedure entry point ?IsRenderablePath@CArnoldSession@@SA_NVMDagPath@@@Z could not be located in the dynamic link library mtoa_api.dll. 

From past experience, I knew that the problem was probably the Maya.env file. And sure enough, it looked something like this:

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.0
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.0\bin;
solidangle_LICENSE=5053@SOLIDANGLE-PC

MAYA_RENDER_DESC_PATH = C:\solidangle\mtoadeploy\2013.0.22.1
PATH = %PATH%;C:\solidangle\mtoadeploy\2013.0.22.1\bin;

Notice that there are two MAYA_RENDER_DESC_PATH and PATH settings. Maya reads just the top two, which are for an older version of mtoa, so when Maya loads mtoa.mll we end up with a “missing entry point” error.

How did this happen? Well, in this case, in-between installs and uninstalls of different versions MtoA, the user had updated Maya.env with his own MAYA_RENDER_DESC_PATH and PATH settings for MtoA. And then the next install of MtoA appended its own settings to the Maya.env file.

The MtoA Installer works like this:

  • Installs make a backup of the existing Maya.env, and then append the environment settings to the existing Maya.env.
  • Uninstalls restore the backup version of Maya.env.

So if your Maya.env already has MtoA settings for MAYA_RENDER_DESC_PATH and PATH settings, then when you install another MtoA, you end up with a problem (because the new settings will be at the bottom, where they are ignored).

Ok, so that’s problem solved. Just remove those extra entries from Maya.env.