Categories
scripting softimage

Python: Naming Objects for Numerophobes 101

You can call me a numerophobe when naming rig objects, but the reason I personally avoid numbers in my rigging naming conventions (99% of the time) is so that when I duplicate something, a number at the end won’t increase by itself because there isn’t one. (The issue can be circumvented by having numbers somewhere before the end, but I’m the kind of weirdo that prefers to go with letters altogether.)

We humans work numbers in what’s known as the “Numeral system“, also known as the “base 10” system (as we have that many fingers…) but hold on… the alphabet has 26 letters, not 10, so what do we call that system? It has a name: it’s the Hexavigesimal (or “base 26”) system.

As the ever-so-handy Wikipedia denotes,

Any number may be converted to base-26 by repeatedly dividing the number by 26.

Pretty easy stuff for Python.

This is how I’d do it:

Categories
scripting softimage

Python: Distance between 2 Position Vectors

This post surged from a question at a forum where somebody tried to use the ctr_dist() function — that returns distance between two object centers — in a Softimage script only to realise that actually it only exists for expressions, not scripting.

Here’s my take on said function for both Softimage and Maya…

Categories
tutorials

Benchmarking your Python experiments

Which is the fastest way to do this or that? Why not try them all and benchmark! 🙂

All you need to do is lock at the time.clock()

Categories
softimage

Softimage: Undocumented TEMP Folder that cleans up after itself

Environment variables are no secret and neither is the system-set “TEMP” variable, but what is not really mentioned in the SDK Docs is that Softimage overrides the TEMP and TMP environment variables with a temporary folder made by XSI:

LogMessage( XSIUtils.Environment("TEMP") );

If I run that (JavaScript) I get something like: C:\Users\Alan\AppData\Local\Temp\XSI_Temp_15076

Categories
softimage

Softimage: RefModel Deltas’ Hygiene in Production

I used to think refmodels were buggy, annoying and out to get me. After some exploration, they exhibit a couple patterns of fixable issues. Let’s bring them to light, shall we?

Here’s some of my observations with them in the context of artists animating a referenced rig in production:

Categories
softimage

Softimage: Automatic Symmetry Mapping Template

If you do rigging in Softimage you probably know when trying to Mirror Weights it only pays attention to the last created Symmetry Mapping Template for that model. There’s no interface to append to or join mapping templates. It gets annoying having to recreate them and verify that Soft guessed all the correct symmetrical equivalents, so…

Categories
softimage

Softimage: A Self-Contained CurveLength Operator

Sometimes you need to know the length of a curve for some setups; for a while I sometimes used an addon called jsCurveLength.

However, the way it’s designed relies on the existance of the addon to evaluate. Without it, your rig is broken. I’ve made a version which is self-contained, so when you export your rig you don’t need to tell people to install any addon.

Categories
softimage

Tool: XSI Docs Self-Translation Patch

34 languages supported!

[CLICK TO SEE DEMO VIDEO]
Click to play video