Finding the first bones rotation
by EricTRocks


ICE Convert between mesh and UV
by GOTETZ
Lego-style VW Beetle
by Chris Marshall

Dots
by Chris Marshall

by @strawmat00

Forcing per-object context
by flyby

Finding the first bones rotation
by EricTRocks


ICE Convert between mesh and UV
by GOTETZ
Lego-style VW Beetle
by Chris Marshall

Dots
by Chris Marshall

by @strawmat00

Forcing per-object context
by flyby

Thanks to Emilio for suggesting this topic for a flashback.
Before Softimage started shipping with Phoenix Tools ParticleSuite in 1999, SOFTIMAGE 3D had its own standalone particle system. If you wanted your particles in a SOFTIMAGE 3D scene, you had to follow this procedure:
Here’s an overview of the SOFTIMAGE|PARTICLE interface (from the Particle User Guide) and a few screenshots of the viewport.

The other day in the comments, A asked about some Python I had posted a few years ago: Why did I manually dispatch XSI.Factory instead of just using the global XSIFactory object? Honestly, I don’t know why I did. I had seen other code do it that way, so I did it too. And I see that the sipyutils.py also dispatches objects like XSI.Application, XSI.Utils, and XSI.Math, so I figured I was in good company.
A little research shows that XSIFactory uses late bound automation (aka dynamic dispatch) and so avoids any possible problems with the pywin32 cache. Late-bound automation means that PythonCOM doesn’t know what properties or methods the object supports; whenever you try to access a property or method, PythonCOM will query the object to find out if the property/method is supported.
In contrast, when you dispatch XSI.Factory, PythonCOM uses the pywin32 cache to support early-binding, where all the available properties and methods are known beforehand.
You can read more about this Chapter 12 of Python Programming on Win32, Advanced Python and COM
Here’s a little Python snippet demonstrating the differences between a dispatched XSI.Factory and the global XSIFactory object. Note in particular the output of dir() for each object.
from win32com.client import Dispatch as disp
sifact = disp('XSI.Factory')
print sifact
print XSIFactory
# <win32com.gen_py.Softimage|XSI Object Model Library v1.5.XSIFactory instance at 0x564246344>
# <COMObject XSIFactory>
print dir(sifact)
print dir(XSIFactory)
# ['CLSID', 'CreateActiveXObject', 'CreateFCurveKeyCollection', 'CreateFCurveParamDef', 'CreateGridData', 'CreateGridParamDef', 'CreateGuid', 'CreateObject', 'CreateObjectFromFile', 'CreateObjectFromFile2', 'CreateObjectFromPreset', 'CreateObjectFromPreset2', 'CreateParamDef', 'CreateParamDef2', 'CreateScriptedOp', 'CreateScriptedOpFromFile', 'CreateShaderDef', 'CreateShaderParamDefOptions', 'RemoveShaderDef', '_ApplyTypes_', '__doc__', '__eq__', '__getattr__', '__init__', '__module__', '__ne__', '__repr__', '__setattr__', '_get_good_object_', '_get_good_single_object_', '_oleobj_', '_prop_map_get_', '_prop_map_put_', 'coclass_clsid']
# ['_Close_', '__doc__', '__getattr__', '__init__', '__module__', '__repr__', '__setattr__', '_scriptItem_']
print sifact.__module__
print XSIFactory.__module__
# win32com.gen_py.269C4D8C-E32D-11D3-811D-00A0C9AC19A9x0x1x0.XSIFactory
# win32com.axscript.client.pyscript
In the comments, G asks:
Why do you have do this:
si = Application oViewportCapture = si.Dictionary.GetObject( "ViewportCapture" ) oViewportCapture.NestedObjects( "Start" ) = 10and not this:
si = Application oViewportCapture = si.Dictionary.GetObject( "ViewportCapture" ) oViewportCapture.Start = 10

The answer is that the ViewportCapture object is not a ProjectItem, and so does not support the Parameters property. ViewportCapture is a CollectionItemLegacy object (and before that, it was an SIObject).
si = Application p = si.Dictionary.GetObject( "ViewportCapture.Start" ) p.Value = 10 #si.SetValue( "ViewportCapture.Start", 10 )
UV to topology
by Gotetz

Triangle wave generation
by Junki the Junkie

via cveld.net
Expolsia Fx
by Mr.Core

Softimage reel from 1997
* Featuring work from Blue Sky Productions, ILM, Buf, Spainbox, SEGA, V/GA, Virtual, RGA, Topix, Buzz FX, Psygnosis,Digital Domain, Buf, VCC, Sony, NAD Center, Silver Haze, Metrolight, Gribouille, John Francis, Quiet Man, SVC, Brain Cell, Namco, and others
* The video starts with “Leave Home” by the Chemical Brothers
I couldn’t find this in the docs anywhere, but I did find it mentioned in some old emails. You can use environment variables in the .wkg file, like this:
$SITOA_WKG_PATH $MOOTZOID_WKG_PATH
or this:
${SITOA_WKG_PATH}
${MOOTZOID_WKG_PATH}
Either syntax worked for me when I tried it.
There does seem to be some weirdness with loading workgroup shaders this way, but that’s still under investigation.
There’s several ways to create an empty polygon mesh with the Object Model.
from sipyutils import si # win32com.client.Dispatch('XSI.Application')
from sipyutils import log # LogMessage
from sipyutils import C # win32com.client.constants
si = si()
o = si.Selection(0)
if o.IsClassOf( C.siX3DObjectID ):
o.AddPolygonMesh()
o.AddPrimitive( "EmptyPolygonMesh" )
o.AddGeometry( "EmptyPolygonMesh" )
AddPolygonMesh() courtesy of Vladimir
No screenshots, just videos this week.