Checking if a material is being used by somebody anybody


If you want to know whether a material is used by any objects in the scene, you can check the UsedBy property.

Here’s a Python snippet that finds unused materials in the current material library:

from siutils import si

if Application.Version().split('.')[0]>= "11":
	si = si()					# win32com.client.Dispatch('XSI.Application')

from siutils import log		# LogMessage
from siutils import disp	# win32com.client.Dispatch
from siutils import C		# win32com.client.constants


matlib = si.ActiveProject.ActiveScene.ActiveMaterialLibrary
for mat in matlib.Items:
	if mat.UsedBy.Count == 0:
		log( '%s <Not used>' % mat.Name )

Spawning particles into a different point cloud


Spawning into different point clouds is [supposed to be] easy to set up and allows you to use different shaders on different clouds, which gives you more control over the look of your particles.

Spawn on Collision, however, doesn’t seem to work with a different point cloud. As soon as you change Self to a different point cloud, everything goes red and there’s all kinds of errors and warnings. Look at the Show Messages for Spawn on Collision:

It’s like that all the way back to 7.01. If there’s a way to do it right, I don’t know it yet.

To spawn particles into a new point cloud, try using Spawn on Trigger instead.

The case of the scene that wouldn’t Undo


In this case, a customer sent me a scene where Undo didn’t work. As soon as you opened the scene, nothing you did could be undone, and Undo wouldn’t start working again until you loaded some other scene.

I thought it might be something in the scene, so I deleted practically everything under the Scene_Root, but Undo still didn’t work. Then I noticed that the .scn file was still pretty big (18MB) so I poked around a bit more in the scene and found thousands and thousands of materials (14K of materials, to be exact).

There were over 13 thousand AutoCAD_Color_Index materials. Just opening the Material Manager took minutes, and deleting 13 thousand materials wasn’t as easy as you might think.
I first tried with the DeleteAllUnusedMaterials command, but that took so long that I figured that Softimage was hung and I killed it.

In the end, I deleted some manually (a hundred at a time) and then the rest with the Material Manager > Delete Unused Materials. But I could also have done it like this:

import time

start = time.clock()

import win32com.client
oObj = win32com.client.Dispatch( "XSI.Collection" )
oObj.Items = 'Sources.Materials.DefaultLib.AutoCAD_Color_Index_*'
print oObj.count
# 13782

Application.SetValue("preferences.General.undo", 0, "")

for mat in oObj:
	Application.DeleteObj(mat)

Application.SetValue("preferences.General.undo", 50, "")

end = time.clock()

Application.LogMessage( round( end - start, 3) )
# INFO : 264.117

Scripting – Selecting keys at the current frame


#Python
from win32com.client import constants

f = Application.GetValue( "PlayControl.Current" )
Application.SelectKeysInTimespan( ".kine.*", constants.siSetKeySelection, f, f, constants.siAnimatedParameters )
' VBScript
SelectKeysInTimespan ".kine.*", siSetKeySelection,GetValue( "PlayControl.Current" ),GetValue( "PlayControl.Current" ),siAnimatedParameters 

Hat tip: luceric

Understanding the new Licensing check interval


As of the 2013 release, you can now set up your license server and Softimage workstations so that idle licenses are reclaimed by the license server and distributed to other machines.

An instance of Softimage (xsi.exe) is considered idle when there is no mouse or keyboard interaction, no command or script running, and no active progress bar. Softimage is never idle in batch mode.

2013 includes a new Licensing check interval preference (Preferences > General). Basically, this “check interval” is how long Softimage can be idle before it will give up its license. By default, the Licensing check interval is 1 minute. That means that if Softimage is idle for a minute, then the license server could reclaim the license and give it to some other user. To disable the license time-out feature, set the check interval preference to 0.

By default, the license server does not reclaim licenses when Softimage is idle. To configure the license server to reclaim idle licenses, you need to set the TIMEOUT option. To do that, create a plain text file named adskflex.opt in the same folder where your license file is located.

To set the TIMEOUT to 60 minutes for an Entertainment Creation Suite Ultimate license:

TIMEOUT 85926ENCSU_2013_0F 36000

To set the TIMEOUT for a 2012 Softimage license:

TIMEOUT 85705SFTIM_2012_0F 36000

You will need to restart the server to read the changes to the options file.

With the TIMEOUT option set on the license server, the next time your Softimage is idle for longer than the check interval, the license server may reclaim the license to give to another user. When you start working actively with Softimage again, it will try to check out another license from the server. If it gets a license, you’ll keep working and you’ll never know your license had been “lost” while idle.

However, if no licenses are available, you’ll see this:

and then you’ll have a chance to save your work:

Crosswalk 2013 available


I see Crosswalk 2013 was posted over a week ago at autodesk.com/softimage-crosswalk.

Here’s the new features and fixes:

------------------------------------------------------------------------------------------
Crosswalk 2013.0 includes the following new features: 
------------------------------------------------------------------------------------------
* Softimage 2013 support
* 3dsmax 2013 support
* Maya 2013 support
* Softimage FBX plugin now uses the latest FBX library (2013).
* Support FBX User Normals
* Support FBX ICE Materials and ICE Textures
* Add "Import Action Source Only" option (For Softimage 2013 only)



------------------------------------------------------------------------------------------
Here's the detailed list of fixes:
------------------------------------------------------------------------------------------

Crosswalk Setup
------------------------------------------------------------------------------------------

SOFT-2523	Crosswalk does not register correctly for XSI 2011
SOFT-5213	Crosswalk - Empty Common Softimage Crosswalk folder created during installation


Softimage - FBX
------------------------------------------------------------------------------------------

SOFT-5811	FBX Diffuse port is missing during export / import of Blinn
SOFT-5832	FBX material are in the wrong shader node after export import.
SOFT-5036	Crash when you assign specific tiff with LZW compression
SOFT-5160	FBX XSI crash when export fbx bone using Export Envelope options
SOFT-5677	FBX ICE crash during FBX export in "Mesh_With_Set_ICEMaterials_Tree.scn"
SOFT-5352	FBX exporter is splitting UVs causing issues in pipeline
SOFT-5632	Unused UVs in an object with "Turn Internal Edge" operation will be wrong in the FBX export-import process
SOFT-2161	XSI FBX Export LEAKS when there is UV Texture assigned to material
SOFT-2588	FBXImport did not import fbx file (Robot_FixedForXSI) correctly
SOFT-4921	fbx - Import FBX a file that was exported from 3dsMax and the animation of the Character arms will be wrong.
SOFT-5303	Softimage fails to open medium to large FBX files, using both One-Click and FBX Import
SOFT-5462	Action Items imported from FBX take the length of current scene's start and end frames
SOFT-5430	FBX Import animation - Turn on FCurve by default
SOFT-4876	Unlocalized strings in "ExportCrosswalkOptions" window.
SOFT-4957	ACME-717 | Mobu to Softimage shape anim export problem
SOFT-5106	Truncated "XSIM" under "Crosswalk File Type" on "Scene_Root: ImportCrosswalkOptions" window
SOFT-1725	FBX: unable to export an image node with constant shader
SOFT-2308	The cancel button is not working in the crosswalk FBX import\export
SOFT-5205	"Convert Image Format" is not translated on the "Crosswalk FBX Export" window
SOFT-5206	"Materials And Textures" is not translated in "Include" tab on "Crosswalk FBX Import" window
SOFT-5107	Description on the "Scene_Root:ImportCrosswalkOptions" window is not translated
SOFT-5060	FBX Bone tool : missing a bone during export
SOFT-4807	Exporting several actors copies is not working as expected.
SOFT-4818	FBX imports possibly corrupted nulls
SOFT-4817	Can't rotate null in Z
SOFT-4673	Project templates and custom structures
SOFT-4686	ACME-404 | Performance issue with Crosswalk 2012
SOFT-4582	ACSO-415 | Please increase more the performance with Crosswalk 2012

Softimage - Collada/dotxsi
------------------------------------------------------------------------------------------

SOFT-5041	ACME-371 | Crosswalk | Shader parameters animated by the mixer are not persisted properly