scSaveWeights for export/importing skinCluster weights in Maya


I have written an useful Maya python API plugin which exports out weights from polygon mesh or vertices to text file(optionally binary),Which can be used later.
This process is mostly useful when User wish to change position of joints in a rig with skinCluster , or just want to update rig file with latest weights from other file.
I have in past used Michael comets famous Mel script cometSaveWeights, which works great but is very slow when importing weights on dense mesh.

It was my first attempt at writing something in Maya API. Attached in plugin which I have tested on Maya 2008 to 2011.

Mel Command to export weights
scSaveWeights -roundOff 5 -action “export” -file “d:/weights.txt”;

Mel Command to import weights
scSaveWeights -action “import” -file “d:/weights.txt;

Download
scSaveWeights.zip

Go to windows>Settings/prefrence > plug-in manager and browse to the scSaveWeights.py
I would suggest to open the py file in IDE and read through comments in the beginning of  script.

Exporting weights on polygon mesh with vertex count 12432 skinned with 255 joints took 7.6378 seconds
whereas Importing took 66.3445147672 seconds and in quick mode it takes 19.937 seconds while exporting
and takes 7.5559 seconds while importing.

Importing weights with cometSaveWeights.mel took more than 7 minutes on same Mesh. 

edit: updated script to work with selected polygon object and in component mode, while importing weights.

ICE cream sandwich

I have a confession to make. I am slowly becoming ROM junkie. I got my first android device about three year back(HTC hero) After it got old and was crying out loud for retirement, I got myself nexus 4g. Its cdma device and has its pains involved to make it work in India.

But anyways today I have installed  AOSP ICS ROM on it with custom kernel(Glados). Making battery life in this baby almost 50 percent more.
If you are with same specs. I highly recommends you to visit XDA developers and get the ICS rom for your nexus S.
So bye bye gingerbread and Hello ice cream sandwich.
XDA aosp