Saving skin weights to text file?

Hey, I was wondering if anyone had any tips for me. I thought I remembered a thread on here or a script download about saving an object's skin weight map as a text file, instead of a picture image... Anybody have some hints on writing code for this???

I know of the Keegan Flipshape script, but I was looking for something that wasn't as complex. Just an example or something about commands to save all the vertex skin wieght values and such.

I'm also trying to figure out how to write code to mirror skin weights like this, so any help on that would be appreciated as well. Thanks!

there is source code for a plugin to do this in the devkit that comes with maya. exportSkinClusterDataCmd for smooth skinning, and exportJointClusterDataCmd for rigid skinning.

you might also find the skinCluster and skinPercent mel commands useful if you need to query or edit the weightings.

In the API, you need the MFnSkinCluster function set to do this, the maya docs should explain it.....

I did a script mostley out from pasting, trial&error and stuff like that to get the skinweights for meshes connected to a skeleton.

check out these 2 commands...

getAttr $skinClusterName.weightList[$vertex].weights[$jointIndex];

or

skinPercent -t $joints[$i] -q $skinClust[0] $component

where $component is:

$component = ($meshes[$j] + ".vtx["+$z+"]");

$joints[] and $meshes[] are string arrays containing the
names of my joints and meshes....so in my script I loop through those lists...selects them and fprints the info
to a file.

And if some other guy postes an answer that looks more advanced than mine along with some bad critic on mine,
please follow his advice, Im also new at this ))

Good luck....

Ohhh, cool guys, thanks! I'll look into that stuff.

In the meantime, does anyone know of the script that exports paint weights information in text format??? I don't believe that I have the dev kit that comes with Maya. My copy wasn't necessarily "purchased" in the traditional sense of the word, oops.

Ohhh, re-reading that some of that stuff is helping me now further down the road. Now...

Does anyone know the command to make the "Save As" selection box come up? The one you use to input what folder and file name you want to save your text file to???

I can't seem to be able to find out what it is. Also, is there somewhere, besides Alias' site where you can find a listing of definitions for all of the MEL commands???

Thanks.

You could see if you get any ideas from my aeSkinWeightsTransfer script. It outputs to a textfile the position of each vertex (or CV) and their respective weights, then reimports them by averaging the weights of the closest exported verts.

Temporary domain:
http://www.stannogen.org/Scriptshttp://www.stannogen.org/Scripts

(my usual domain www.stannogen.com is quaranteened atm)