[MtoA] Command-line compiling with Visual Studio 2010 Express


  1. Open a Visual Studio Command Prompt (Start > All Programs > Microsoft Visual Studio 2010 Express > Visual Studio Command Prompt)
  2. Set up the environment for 64-bit compilation:

    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release
    

And now you’re ready to go. For example, if you were following the basic extensions tutorial, you set some environment variables:

set ARNOLD_PATH=C:\solidangle\arnold\Arnold-4.2.2.0-windows
set MTOA_PATH=C:\solidangle\mtoadeploy\2014
set MAYA_PATH="C:\Program Files\Autodesk\Maya2014"

Note that we included the quotation marks in MAYA_PATH, since the path includes an embedded space. An alternative would be to use the quotation marks in the cl and link commands.

cl /c translator1.cpp /EHsc /MD /DNT_PLUGIN /DREQUIRE_IOSTREAM /I%MAYA_PATH%\include /I%MTOA_PATH%\include /I%ARNOLD_PATH%\include
cl /c extension1.cpp /EHsc /MD /DNT_PLUGIN /DREQUIRE_IOSTREAM /I%MAYA_PATH%\include /I%MTOA_PATH%\include /I%ARNOLD_PATH%\include
link /dll extension1.obj translator1.obj /LIBPATH:%ARNOLD_PATH%\lib /LIBPATH:%MAYA_PATH%\lib /LIBPATH:%MTOA_PATH%\lib ai.lib OpenGl32.lib glu32.lib Foundation.lib OpenMaya.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib OpenMayaFX.lib mtoa_api.lib

[Arnold] [Python] Changing Arnold options in Python


The global render settings are stored in the options node, which you can get with AiUniverseGetOptions(). If the universe isn’t active (you are not inside an AiBegin() / AiEnd() block so the scene doesn’t exist yet), AiUniverseGetOptions() returns None.

Once you have the options node, you can load options from an ASS file, or you can update it with the node parameter setters such as AiNodeSetInt(). The way kick, and pykick, work is that they load the ASS file first, with its options, and then update the options node with the values from the command line.

from arnold import *
import os

AiBegin()

AiMsgSetConsoleFlags(AI_LOG_ALL)

# Get the default options
options = AiUniverseGetOptions()

AiLoadPlugins( os.getenv( 'ARNOLD_PLUGIN_PATH' ) )

AiASSLoad("C:/Users/Support/project/scenes/test_640x480.ass", AI_NODE_ALL)

# Render using options loaded from the ASS file
AiRender()

# Change options and render with the changes
AiNodeSetInt(options, 'xres', 320)
AiRender()

# Load options and use them to render
AiASSLoad("C:/Users/Support/project/scenes/test_960x540.ass.gz", AI_NODE_OPTIONS)
AiRender()

AiEnd()

[kick] [ass] reading from stdin


Some customers have reported a problem using a render manager (Muster, Tractor, Deadline) to render jobs with kick, typically via a wrapper script. The problem is that kick tries to read from STDIN instead of loading the specified ASS file. In the log, you’d see this:

00:00:00     0MB         | [ass] reading from stdin ...

A workaround is to add the -nstdin flag (Ignore input from stdin) to the kick command line.

[RLM] [Arnold] Troubleshooting watermarks and license problems


If a workstation or render node can’t get a license, you can use the Arnold log to find out what’s happening. If you set the log verbosity to debug, you can see where Arnold is trying to find a license server, whether or not Arnold can connect, and whether Arnold is being refused a license.

First, let’s look at what success looks like:

00:00:00   703MB         | [rlm] checking connection to license servers ...
00:00:00   703MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   703MB         | [rlm] checkout of "arnold 20140917" from StephenBlair-PC in 0:00.01
00:00:00   703MB         | [rlm] expiration date: 31-dec-2016 (768 days left)

These log entries tell me that solidangle_LICENSE (or RLM_LICENSE) is set to “5053@StephenBlair-PC” and that Arnold was able to get a license. I know that solidangle_LICENSE is set because the log entry says “license servers” (plural). If solidangle_LICENSE isn’t set, there’s just one license server to check: the default 5053@localhost.

For example, if you’re running on the same machine as the license server, you might see something like this:

00:00:00    11MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:00    13MB         | [rlm] checkout of "arnold 20141103" from localhost in 0:00.02
00:00:00    13MB         | [rlm] expiration date: 31-dec-2016 (761 days left)

So, if solidangle_LICENSE isn’t set, then on a workstation or render node you’d see this in the log:

00:00:00   784MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:05   784MB WARNING | [rlm] could not connect to license server on 5053@localhost

Note the Arnold checks just one license server: 5053@localhost. If solidangle_LICENSE is set, Arnold will check at least two license servers.

If solidangle_LICENSE is set, but Arnold cannot reach the specified server, you’d see this:

00:00:00   751MB         | [rlm] checking connection to license servers ...
00:00:05   751MB         | [rlm]  5053@null ... DOWN
00:00:10   751MB         | [rlm]  5053@localhost ... DOWN
00:00:10   751MB WARNING | [rlm] could not connect to any license server

If the RLM server is up and reachable, but the solidangle ISV server is down, then you’d see this:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:03   745MB WARNING | [rlm] error checking out license for arnold (version 20140917):
00:00:03   745MB WARNING | [rlm]  * Communications error with license server (-17)
00:00:03   745MB WARNING | [rlm]  * Connection refused at server (-111

The RLM server is the main RLM service that manages all the ISV servers. The ISV servers serve licenses for specific software packages, like solidangle, foundry, or exocortex.

If there are no licenses available:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   745MB WARNING | [rlm] error checking out license for arnold (version 20141103):
00:00:00   745MB WARNING | [rlm]  * All licenses in use (-22)

If the licenses don’t support the newer version of Arnold you’re trying to use:

00:00:00    11MB         | [rlm] checking connection to license server on 5053@localhost ...
00:00:00    13MB WARNING | [rlm] wrong license version for "arnold 20141103", found 1 license for "arnold 20140701"
00:00:00    13MB WARNING | [rlm] your maintenance expired on 2014/07/01, please contact licensing@solidangle.com

If the licenses are expired:

00:00:00   745MB         | [rlm] checking connection to license servers ...
00:00:00   745MB         | [rlm]  5053@StephenBlair-PC ... UP
00:00:00   745MB WARNING | [rlm] could not find any license for "arnold 20141103", the license may be expired