Eric Thivierge The technical side of animation.

15Feb/12Off

Extract deformer to weight map

This is a code snippet that you can use to extract the envelope weights of a deformer to a weight map.

xsi = Application
oWeightMap = xsi.Selection(0)
oObj = oWeightMap.Parent3DObject
oEnv = oObj.Envelopes(0)
defOneArray = oEnv.GetWeights2().Array[1] # Change Array index to get a different deformer
oWeightMap.Elements.Array = [x / 100 for x in defOneArray]
Filed under: Daily, Scripting Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.