A little more about the interactive tool SDK


Softimage 2012 includes several examples of custom tools built with the new interactive tool SDK. For example, there’s the Box Transform Tool:

The Box Transform Tool is a complex manipulator-style tool that uses highlighting, shortcut keys, context menus and on-screen controls.

Interactive tools are a new type of custom plugin, implemented in C++. You need to know OpenGL, because it is used for drawing and picking in the viewport. More here…

Getting the screen resolution


This snippet uses WMI to get the screen resolution.

GetMonitorResolution();

function GetMonitorResolution()
{
       var wbemFlagReturnImmediately = 0x10;

       var Mode        = wbemFlagReturnImmediately;
       var Query       = "Select * from Win32_VideoController";
       var oWMIService = GetObject( "winmgmts:\\\\.\\root\\cimv2" );
       var oCollection = oWMIService.ExecQuery( Query, "WQL", Mode );

       var oItems = new Enumerator( oCollection );

       for ( ; !oItems.atEnd(); oItems.moveNext() ) {

               var oItem = oItems.item();

               // dump info
               LogMessage( "Resolution [x,y]: " +
				oItem.CurrentHorizontalResolution + ", " +
				oItem.CurrentVerticalResolution );
       }

       return;
}

For me, this script outputs the resolution of both monitors:

// INFO : Resolution [x,y]: 1280, 1024
// INFO : Resolution [x,y]: 1920, 1200

Credit: Matt Lind, on the XSI mailing list