Saturday Snippet – Building a cross-platform path

…and exporting the selected objects to an ASS file.

from win32com.client import constants as C

filename = XSIUtils.BuildPath( 
	Application.InstallationPath( C.siProjectPath ),
	'[Scene].[Frame].ass' )
Application.SITOA_ExportScene( 1,1,1,True,True,filename)
# Application.SITOA_ExportScene(1, 1, 1, True, True, "C:\\Users\\Steve\\My Project\\Arnold_Scenes\\[Scene].[Frame].ass")

Friday Flashback #103

Just about 13 years ago to the day, the URL went live.

Sumatra is Coming from

Sumatra is Coming from

Rather predictably, this sparked some debate on the mailing lists, with a number of different riffs on the URL, including “”:

Sorry Softimage, your software has served me well, but it’s time to wake up and smell the coffee. You sat around on your ass too long while I watched everybody around me switch to Maya, now it’s my turn. I’m actually excited to learn Maya, it seems like it’s creators are willing and able to stay up-to-date and on the cutting edge.


3d Discussion archive via the Wayback machine

Adding points along the trajectories of emitted particles

This is something I ended up with when I was thinking about accumulating point positions. First, I accumulated them all in an array, and then I tried my hand at adding points at each frame, so that I had a series of points along the path (trajectory) of the emitted particle.

Add Point didn’t want to work, and it’s always in Object context mode anyway, so I ended up using Clone Points.

Autodesk Upgrade pricing changes

Effective 1 February 2013, Autodesk will simplify its upgrade pricing model. Starting next month, all upgrades will cost 70% of the current price for a new license.

The “Upgrade from Previous Releases” option will have an Autodesk SRP of approximately seventy percent (70%) of the current new License Autodesk SRP*, regardless of which of the six previous releases is being upgraded. Autodesk product releases more than six releases prior to the current release will no longer be eligible for upgrade.

For Softimage, I imagine the “six previous releases” covers only the Autodesk releases: 2012, 2011, 2010, 7.5, and maybe 7.01. I doubt it will cover 6.5, but you should check with your reseller to make sure.

And oh yeah, since it’s Wednesday, here’s a word cloud. I cheated a bit added more “70”s so it would stand out.

Shortcuts and default properties for custom parameters

Custom properties and the PPG object provide shortcuts for direct access to parameters.

For custom properties, that means you can type the shortcut oProp.SomeParam instead of oProp.Parameters(“SomeParam”). Note that that in this case, the default property is Name: if you print oProp.SomeParam, you get the name of the parameter.

from win32com.client import constants as C
si = Application

p = si.ActiveProject.ActiveScene.Root.AddCustomProperty( "Test" )
x = p.AddParameter2("X",C.siString,"a;b;c;d",None,None,None,None,C.siClassifUnknown,C.siPersistable)

print p.X
print p.X.IsEqualTo( p.Parameters("X") )
print x.IsEqualTo( p.X )

# Test.X
# True
# True

For the PPG object, the shortcut is even more of a convenience. To access a parameter named “Param”, you can type PPG.Param instead of PPG.Inspected(0).Param. And when you use the PPG.Param shortcut, the default property is Value.

So you can do this:

PPG.Param = 'hello;world'

There’s no need to type “PPG.Param.Value”, unless you’re doing something like this:

list = PPG.Param.Value.split(';')

Using modulo to delete points from a cached simulation

hat tip to tekano bob who did all the work; I’m just pointing out some things about his ICE tree 🙂

First, he’s using the Element Index in case the ID was not cached (if you cache with the Cache Manager, then by default the ID attribute is not cached).

When I saw that, I thought maybe I could use First Valid to use either the ID, if available, or the Element Index:

But that gives wacky results, because Delete Point automagically restores IDs to all the points in the cached simulation. So you have no choice but to use the Element Index.

Another interesting thing I’d like to point out is how you can use modulo to delete two-thirds of all points (instead of just deleting every third point). Now, modulo by 3 has three possible results: 0, 1, and 2. If you test for modulo != 0 or modulo > 0, then you’ll be deleting two-thirds of all points:

If you test for modulo = 0, then you’ll delete every third point: