SUMATRAPATH is an environment variable that is defined only in Softimage. SUMATRAPATH points to the Application\bin folder in the Softimage folder, and the registry is full of Softimage entries that use SUMATRAPATH to specify the location of DLLs.
In XSI 7.01, you could check whether or not you were in Softimage with this Python code:
app = Application
if os.getenv( ‘SUMATRAPATH’ ) != None :
app.LogMessage( “you’re in XSI” )
app.LogMessage( “you’re not in XSI” )
However, in both Softimage 7.5 and 2010, os.getenv(“SUMATRAPATH”) returns None. At least for me it does.
XSIUtils.Environment.Item(“SUMATRAPATH”) does still return the Application\bin path, as does this Jscript:
var oShell = new ActiveXObject ("WScript.Shell");
var oProcessEnv = oShell.Environment("Process");
LogMessage( oProcessEnv( "SUMATRAPATH" ) );
Sumatra was the original code name for the product that eventually became known as Softimage XSI (the Softimage XSI name was unveiled back in March 2000).
Occasionally I’m asked whether there is some way to limit XSI/xsibatch to just one CPU, so that while a rendering is going on, the user can use the other CPUs for something else.
XSI does have a -thread command-line switch that limits the number of threads created by mental ray for rendering.
For example, if you turn on Progress diagnostics for a scene and then render from the command line:
xsibatch -thread 1 -render "%XSI_HOME%\Data\XSI_SAMPLES\Scenes\red_jaiqua.scn" -verbose on -frames 1-3
Then you will see progress messages like this:
// INFO : JOB 0.5 progr: 91.0% rendered on EXAMPLE.3
// INFO : JOB 0.7 progr: 91.3% rendered on EXAMPLE.3
// INFO : JOB 0.4 progr: 91.5% rendered on EXAMPLE.3
// INFO : JOB 0.5 progr: 91.8% rendered on EXAMPLE.3
// INFO : JOB 0.6 progr: 92.1% rendered on EXAMPLE.3
In those progress messages, EXAMPLE is the computer name, and 3 is the thread number. So you can see that the render is using just one thread.
If you were to use -thread 4, then four threads are created:
// INFO : JOB 0.5 progr: 91.0% rendered on MTL-P1917.5
// INFO : JOB 0.7 progr: 91.3% rendered on MTL-P1917.7
// INFO : JOB 0.4 progr: 91.5% rendered on MTL-P1917.4
// INFO : JOB 0.5 progr: 91.8% rendered on MTL-P1917.5
// INFO : JOB 0.6 progr: 92.1% rendered on MTL-P1917.6