Friday Flashback #85

Forgive me this [melodramatic] indulgence, but after 3 years, 8 months, and 13 days, I turned in my Autodesk badge. I don’t need it anymore.*

Let’s flash back to blog post #1 “The End”, from 14 Dec 2008.

I want to thank all my readers, commentators, and contributors for their time and attention.

Like we say here in Canada: keep your sticks on the ICE everybody 🙂

*I was part of the 7% layoff. Cue Bob Dylan’s Knocking on Heaven’s Door…

How to periodically delete a random number of particles

Let’s say you want to delete–oh, I don’t know–let’s say a random 7% of all particles, and you want to do that every N frames. Here’s one way to do it. You won’t get exactly 7%, but you’ll get close (eg I got numbers like 6.8%, 7.2%, and 7.25% when I tested it).

The Every Nth Frame compound is a custom compound that uses modulo:

Scene names and .scn file names

The scene name and the name of the .scn file are usually the same, but if you do something like rename the scene file in the file system, you’ll end up with something like this. Note that the [Scene] token isn’t resolving to the correct file name anymore.

# In the file system, I renamed "Particle_Forces_Wind" to "RENAMED_Particle_Forces_Wind"
# So, open RENAMED_Particle_Forces_Wind and run this:
scn = Application.ActiveProject.ActiveScene
scn.Parameters("Name").Value = "RENAMED_Particle_Forces_Wind"

Running the Python snippet above will fix the naming problem:

LMTOOLS: Putting the debug log in append mode

By default, every time you restart the license server, it overwrites the existing debug log file.
You can put the license server into “append” mode for logging, so that the log file isn’t cleared every time you restart the server.

To put the log into “append” mode, just add a plus sign (+) before the name of the file.

You won’t be able to View Log from LMTOOLS, but you can open the log file with your favorite text editor.

Licensing troubleshooting on Linux

Troubleshooting licensing problems on a Softimage Linux workstation? Here’s a quick summary of some things to look for on the workstation:

  • The Location of the license server is specified by the ADSKFLEX_LICENSE_FILE environment variable that is specified in /usr/Softimage/Softimage_2013/.xsi_2013.
  • The file ~/.flexlmrc can also be used to specify the license server location:


    If Softimage can’t check out a license from the server specified in .xsi_2013, then it tries the servers listed in ~/.flexlmrc. The .flexlmrc lists all the license servers from which Softimage has checked out licenses.

  • There is a licensing log file named /var/tmp/SoftimageLicense.log. This log file will contain entries that look like this:
    18377	2011/06/23	19:18:59	Reason=Fatal error
    18377	2011/06/23	19:18:59	ComputerName=localhost.localdomain
    18377	2011/06/23	19:18:59	OS=
    18377	2011/06/23	19:18:59	File=AdlmIntNWFBLicense.cpp,Line=766
    18377	2011/06/23	19:18:59	VendorID=3 [FLEXLM-NW]
    18377	2011/06/23	19:18:59	VendorError=-18 [Server does not support this feature]
    18377	2011/06/23	19:18:59	FLEXLM-NW=v11.9.0.0 build 87342 x64_lsb
    18377	2011/06/23	19:18:59	Reason=Fatal error
    18377	2011/06/23	19:18:59	ComputerName=localhost.localdomain
    18377	2011/06/23	19:18:59	OS=
    18377	2011/06/23	19:18:59	File=AdlmIntNWFBLicense.cpp,Line=749
    18377	2011/06/23	19:18:59	AdlmIntError=20 [License check out failed]
  • Setting FLEXLM_DIAGNOSTICS to 3 didn’t get me any diagnostics messages or logs, but I did find those diagnostics in the strace log (just search for “FLEXnet”). See this post for more info on the FLEXLM diagnostics in the strace log.

Scripting – How to get the active objects for component selection

When you’re in a component selection mode (such as Edge, Polygon, or Point), the active objects are highlighted in orange. The “active objects” are the objects that are “active for component selection”.

When Softimage is in a component selection mode, the Selection will either by empty or it will contain CollectionItems (one for each object with selected components).

So, how do you get the active objects? Here’s one way, using the little known, magical “.[obj].”:

# Python
import win32com.client
oActiveObjects = win32com.client.Dispatch( "XSI.Collection" )
oActiveObjects.Items = ".[obj]."
// JScript
var oActiveObjects = new ActiveXObject( "XSI.Collection" );
oActiveObjects.Items = ".[obj].";