The case of the slow license checkout


In this case, the customer had several different license servers set up in his company, and he noticed that one license server in particular was very slow. When he used that license server, all his Autodesk software took a long time to start up.

Also, there was another symptom: he had to use the IP address to specify the [slow] license server location. If he used the name of the license server, the software wouldn’t find the license server.

Ultimately, the problem was solved by installing the IPv6 update for the Autodesk Network License Manager.

Disabling IPv6 on the client may have also worked.

I don’t know that there is a general problem related to IPv6, but I did find a handful of other, similar support cases logged over the last couple of years. There were a couple about slow license checkouts, and a couple about having to use the IP address instead of the computer name.

The case of Softimage stuck in layout editing mode after a crash


In this case, a customer couldn’t start Softimage again after he crashed while editing a layout.
When he started Softimage, it went into the layout editing mode and stopped responding.

In the past, we’ve fixed problems like this by asking customers to rename the User folder, or to delete any bogus .xsily files (for example, zero-length files) from the Application\layouts folder in their User location.

However, I learned from Luc-Eric that there’s a specific preference that specifies whether Softimage is in the layout editing mode. So, to stop Softimage from starting up in the Layout Editor, we had to edit %XSI_USERHOME%\Data\Preferences\default.xsipref and change this

	xsiprivate.UI_LAYOUT_DEFAULT	= Layout Editor

to this:

	xsiprivate.UI_LAYOUT_DEFAULT	= Default

Passing arguments to xsibatch scripts


You can use xsibatch to execute a script:

	xsibatch -processing -script %TEMP%\test.js 

The -processing flag tells xsibatch to run without a license (you can do this for anything that does not involve rendering).
The -script flag specifies the full path the script file.

If the script file contains functions, you can specify the name of the function to execute with the -main flag. For example, if the .js file contained a function named “test”:

	xsibatch -processing -script %TEMP%\test1.js -main test 

If the main function takes arguments, you can specify them with the -args flag. For example, if the function is defined like this (in JScript)

	function test( sPath, sList, nValue )
	{
		// [body]
	}

then you would specify the arguments like this on the xsibatch command line:

	-args -sPath "%TEMP%" -sList "X,Y,Z" -nValue 22

Putting it all together, the xsibatch command line would look like this:

	xsibatch -processing -script %TEMP%\test1.js -main test -args -sPath "%TEMP%" -sList "X,Y,Z" -nValue 22

Argument values are passed in as strings, and any quotation marks are stripped off.

Here’s a simple example of a test.js:

function test( sPath, sList, nValue )
{
	LogMessage( sPath );
	LogMessage( sList );
	LogMessage( nValue );
	LogMessage( typeof(nValue) );
}

The xsibatch command:

xsibatch -processing -script %TEMP%\test1.js -main test -args -sPath "%TEMP%" -sList "X,Y,Z" -nValue 22

And the output:

=======================================================
 Autodesk Softimage 9.5.184.0
=======================================================

License information: using [Processing]
COMMAND: -processing -script C:\Users\blairs\AppData\Local\Temp\test.js -main test -args -sPath "C:\Users\blairs\AppData\Local\Temp" -sList "X,Y,Z" -nValue 22
// INFO : C:\Users\blairs\AppData\Local\Temp
// INFO : X,Y,Z
// INFO : 22
// INFO : string

Using modulo to do something different for odd and even values of a repeat loop counter


If you have a Repeat with Counter setup in an ICE tree, and you want to do one thing for odd values of the loop counter, and another thing for even values, you can use the Modulo node.
Doing a modulo by 2 on the loop counter (self.CounterValue) will tell you whether the loop counter is odd (modulo by 2 = 1) or even (modulo by 2 = 0)

Here’s a [super simple] example that populates an array with different values based on whether the loop counter is odd or even.
Click to view full size.

ICE troubleshooting with Show Values


Troubleshooting doesn’t have to be fancy. Sometimes you just have to focus in on a specific part of an ICE Tree, and use Show Values to understand what is going on.

For example, as part of a larger ICE tree, I was using Test in Geometry and Get Set Sum as described by gray on xsibase (reply #8). But I wasn’t getting the result I expected.

So I broke out the Test in Geometry and Get Set Sum branch into a simple test scene, and used Show Values to help understand what was going on. As you can see in these screenshots, Get Set Sum is giving me different results based on the set I feed into it.

If I start with a set of Bools per Point and use an If node to map those boolean to integer values, I don’t get the result I expect.

Troubleshooting with Show Values

Simplified tree for testing

Creating a desktop shortcut for batch rendering


You can use scriptXSI.bat in %XSI_HOME%\Application\bin to create a desktop shortcut for batch rendering. When you drag and drop a scene file on that batch file, that starts a batch render.

To create a desktop shortcut, right-click scriptXSI.bat and click Send To > Desktop (create shortcut).

If you want to drag and drop multiple scenes:

  1. Copy scriptXSI.bat to your desktop.
  2. Edit the batch file and change it to this:
    @echo off
    call "C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin\setenv.bat"
    :next
    if "%1"=="" goto end
    set SCN=%1
    "C:\Program Files\Autodesk\Softimage 2011 Subscription Advantage Pack\Application\bin\XSIBatch.exe" -render %SCN%
    shift
    goto next
    :end
    

Importing SOFTIMAGE|3D HRC and DSC files


We still get the occasional support request about importing SOFTIMAGE|3D scenes (.dsc) and models (.hrc) into Softimage 2011.

The SOFTIMAGE|3D importer was removed in the Softimage 2011 release. From the What’s New section of the documentation:

SI3D Loader Is Gone

The SOFTIMAGE|3D importer, also known as the SI3D Loader, has been removed from Softimage. The workaround is to import your SOFTIMAGE|3D scene or model into Softimage as dotXSI (*.xsi).

As suggested in the documentation, you could use export dotXSI 3.0 from SOFTIMAGE|3D and then import that into Softimage 2011.

Or you could use 32-bit Softimage 2010, which includes the Import > SI|3D Scene/Model command. If you’re on Subscription, your Softimage 2011 license will run Softimage 2010, and you can download Softimage 2010 from the Subscription Center.

If you have a lot of hrc/dsc files to import, you can write a script to automate the process.
Here’s a relatively crude example (JScript):

var fso = new ActiveXObject( "Scripting.FileSystemObject" );

var sSourceDir = "C:\\Softimage\\SOFT3D_4.0\\3D\\rsrc\\";
var sTargetDir = "C:\\Documents and Settings\\blairs\\Local Settings\\Temp\\HRC\\Scenes\\";

var srcFolder = fso.GetFolder( sSourceDir );

var files = new Enumerator( srcFolder.files );
// Loop through files  

var re = /\.hrc$/;
for(; !files.atEnd(); files.moveNext() )
{
	var sName = files.item().Name;
		
	if ( sName.match(re) )
	{
		NewScene(null, null);
		
		//LogMessage( "Importing " + sSourceDir + sName );
		ImportFromSI3D( sSourceDir + sName, null, null);
		
		// Strip off the ".hrc"
		var sTmp = sName.substr(0,sName.lastIndexOf( "." ));
		
		//LogMessage( "Saving " + sTargetDir + sTmp + ".scn" );
		SaveSceneAs( sTargetDir + sTmp + ".scn" );
		
	}
}

Scripting the Transform panel buttons


The state of the buttons on the Transform panel are saved in the 3D_TRANSFO_REFERENTIAL_CHANGED preference, which is a bitfield.

So, for example, to enable the Ref manipulation mode, you would do this:

SetUserPref(
	"3D_TRANSFO_REFERENTIAL_CHANGED",
	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | 3 );

This would turn on the Ref mode, and leave the COG, Prop, and Sym options untouched.

If you simply did this:

SetUserPref( "3D_TRANSFO_REFERENTIAL_CHANGED", 3 );

that would reset the COG and Sym options.

Turn on COG:

SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | 16 );

Turn off COG:

SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") & ~16 );

Another example:

// Turn off all
SetUserPref( "3D_TRANSFO_REFERENTIAL_CHANGED", 0 );

// Turn on Local and COG
SetUserPref(
 	"3D_TRANSFO_REFERENTIAL_CHANGED",
 	GetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED") | (16 | 2) );

You can use Alt+NumPad numbers to see what gets logged when the different buttons are selected.
The SDK documentation also includes a page for the Manipulation Mode Values.