Holy LT Batman! The XSI 4.2 feature-comparison chart for Advanced, Essentials, and Foundation. I answered questions about this so many times, I still remember most of it.
Monthly Archives: August 2013
Instancing a random shape with a random start frame
Here I’m instancing a group of Arnold standin sequences, and giving each instance a different start frame. (Each standin sequence is an animated bulge on a cylinder.)
PS It works fine until you go past the last frame of the sequence, because looping or clamping the ShapeInstanceTime doesn’t seem to prevent SItoA from loading the non-existent ass file.
Wednesday word cloud: Autodesk Jobs
Software-related jobs (engineering, qa, product design) at Autodesk:
Applying deformers to point clouds
Screenshots of the week
ICE topology color coding
by grahamef
WeightMap painting
by Mário Domingo
Spliced ICE
Softimage ICE skin deformation
Friday Flashback #134
PPG callbacks and variable scope
The scope of variable b is this snippet. That is, the identifier b exists and has the value 1 only while this snippet is running. After that, it doesn’t exist unless some other code defines it.
Consequently, the OnClicked callback is going to fail with a ‘b’ is undefined error.
var myPset = ActiveSceneRoot.AddProperty("CustomProperty",false,"Mytest"); var myLayout = myPset.PPGLayout; var b = 1; function a_OnClicked(){ LogMessage( b ); } myLayout.AddRow() myLayout.AddButton("a","button"); myLayout.EndRow() myLayout.Logic=OnInit.toString() + a_OnClicked.toString(); myLayout.Language = "JScript" ; InspectObj(myPset);
The way it works is that Softimage creates a new instance of the JScript ActiveX scripting engine each time it needs to execute some fragment of code. So, the above snippet runs in one instances of the scripting engine (which is destroyed after the code is executed). Then later, when the button is clicked, the OnClicked callback runs in a new and different instances of the scripting engine. And that new instance of the scripting engine, there is no variable named b.
One way around this would be to add b as a parameter:
var myPset=ActiveSceneRoot.AddProperty("CustomProperty",false,"Mytest"); var b = myPset.AddParameter2("b",siInt4,1,0,100,0,100,siClassifUnknown,siPersistable | siKeyable); var myLayout=myPset.PPGLayout; myLayout.AddRow() myLayout.AddButton("a","button"); myLayout.EndRow() myLayout.Logic=OnInit.toString() + a_OnClicked.toString(); myLayout.Language = "JScript" ; InspectObj(myPset); function a_OnClicked(){ LogMessage(PPG.b); }
Another way would be to use a LogicFile, something like this:
// LogicFile for an on-the-fly custom property var b = 1; var c = -1; function OnInit() { LogMessage( "OnInit" ); c = 99; } function a_OnClicked(){ LogMessage( b ); LogMessage( c ); }
Then your property would work like this:
var myPset=ActiveSceneRoot.AddProperty("CustomProperty",false,"Mytest"); var myLayout=myPset.PPGLayout; myLayout.AddRow() myLayout.AddButton("a","button"); myLayout.SetAttribute( siUILogicFile, "\\some\\path\\LogicFile.js" ); myLayout.EndRow() myLayout.Language = "JScript" ; InspectObj(myPset);
And this would give the following output:
// INFO : OnInit // INFO : 1 // INFO : 99
Wednesday word cloud: spdl parameters
Adding a check mark to a custom menu item
You can use MenuItem.Checked to add and remove a checkmark from a menu item.
Screenshots of the week
Modeling with ICE – PointPosition Interpolation
Snow Compound
by mufunya
Counter
by msk
Face Robot and the game export process