A - The default behavior in Softimage is to use chronological order of creation, not alphabetical order. If a tool takes it's input from the selection list, items are processed in the order which they were selected.

B - the easiest way to copy weights is to store them in a GridData object as a scratchpad, modify the weights values as desired, then apply the GridData weights back onto the envelope. The GridData is a 2D array just like you see in the envelope weights editor. Each row of the GridData is a point on the envelope. Each column of the GridData represents a deformer. To copy the weights between points, you copy the weights from one row and paste onto another.

// example - JScript

// get reference to selected enveloped geometry
var oObject = Selection(0);

// get envelope operator from enveloped geometry
// NOTE: should verify Object.Envelopes.Count > 0
// before grabbing the envelope operator
var oEnvelope = oObject.Envelopes(0).Envelope;

// store weights in a temporary GridData object (2D array)
var oWeightData = XSIFactory.CreateGridData();
oWeightData.Data = oEnvelope.Weights.Array;

// Make modifications (example, copy weights from vertex 23 to vertex 164)
var aVertexWeightValues = oWeightData.GetRowValues( 23 ).toArray();
oWeightData.SetRowValues( 164, aVertexWeightValues );


// update the envelope with modified weights.
// (this will trigger the scene graph to re-evaluate the envelope.)
oEnvelope.Weights.Array = oWeightData.Data;


The SDK docs show much the same in more detail.

Keep in mind when you do your weight copying/pasting in ICE, it's doing it as an operator and persistently copying the data to maintain the relationship. Whenever an input or output is modified, the ICE tree gets triggered to do it again and again until you freeze or delete the ICE tree.

When you copy/paste weights in scripting, it's a one time operation and more efficient. As you can see, it doesn't take much code.


Matt







Date: Tue, 27 Jan 2015 21:07:34 +0000
From: pedro santos <probi...@gmail.com>
Subject: Know the ID of an Object in an Envelope and Group? Copy
Weights? Partial Gator?
To: Softimage Mailing List <softimage@listproc.autodesk.com>

A - Something that always bugged me is that I don't know a way to inspect
the Order ID of and object in a Group or in an Envelope. So say I have
Null_H Which in the deformers or group list shows up in 8th position (ID7)
because it comes after Null_A, Null_B, etc. But that doesn't mean that when
the group was made that was the selection order. So when you do a Set
Envelope and select the group, again it uses the same order, even though
the lists are ordered alphabetically.
Now... I can do this in ICE like this... http://i.imgur.com/OIegAAA.png But
feels cumbersome... :/

B - How do I copy the all the weight information from one point to other
points. If one has to have parts to have plain weight values that match a
nearby point it's handy to sort of Constrain "Object To Cluster", but
there's no Copy Paste in the Weight Editor for a single point whole info.
Again, I can do it in ICE... but..

Cheers

Reply via email to