Adverti horiz upsell

skinWeightsIO 0.8.4 for Maya (maya plugin)

Import/Export of skinCluster-Weights

License
Button download
4,508 Downloads

Compatibility

  • 2011, 2010, 2009, 2008

Operating Systems

  • Windows

History

Created:01/19/2008
Last Modified:06/09/2010
File Size: 62.4 KB

Bugs

problem with sparse indeces

Statuspending
Priorityhigh
Date08/15/2010
Submitted bysyntetik syntetik
I found that skinWeightIO doesn`t correctly save weights. I had similar problem writing my own skinWeights saving tool. As I had exactly same problem I think both tool are doing same mistake.

skinWeightsIO seems to write out values from full index range simply based on number of influences. For example if we have 5 influences, I would be quering values from compound weight attributes 0,1,2,3,4. But these indices might not be used anymore.
Real case is often, that these indices are invalid as the actual array is sparse, caused by Remove Unused Influences optimizations performed on skinCluster arrays.
To correctly get weight values, a flag -multiIndices in getAttr command should be used to get valid indices:

# python
validIndices = mc.getAttr( 'skinCluster1.matrix', mi=1)

# MEL
string $validIndices[] = `getAttr -mi "skinCluster1.matrix"`;


This in example above could be something like 2,3,7,10 or anything else. Quering these plugs will give the weights that are used by connected influences. In the first case (0,1,2,3..) we would get 0.0 and when loading weights, there would be no weights at all for given point resulting in wrong deformation.
It`s also easy to check when you look at connections of joints to .matrix plugs in skinCluster. These indexes correspond to the same sparse indices in each weightList.weights compound attribute.

 

Comments on this bug:

  • linez

    linez said over 14 years ago:

    You're absolutely right. I usually don't run into this bug, because I always detach and completely rebind everything, but that's definitely something I should look into at the next opportunity. Thanks for pointing it out linez

Post a comment: