jamesj
Sorry that I didn't explaint it well.
Say I want to change the shape of the skeleton mesh to match a newly build character.
But this skeleton mesh already has bone attachments and skin cluster on it.
Instead of using blendshape to drive them or the "cut and paste" methods in the Ziva Transfer menu, I just snap (or move) each every vertex of a original bone to a new bone. The new bone is just in a different shape, but with same topology and vertex order.
So far I managed to build the mel script for moving one single vertex of a bone to a new position:
float $posa[] = xform -q -ws -t r_humerus_bone_Source.vtx[99]
;
float $posb[] = xform -q -ws -t r_humerus_bone_Target.vtx[99]
;
float $pyx=($posb[0] - $posa[0]);
float $pyy=($posb[1] - $posa[1]);
float $pyz=($posb[2] - $posa[2]);
select -r r_humerus_bone_Source.vtx[99] ;
move -r -os -wd $pyx $pyy $pyz ;
The script above move the selected vertex ( ID 99 ) from the old humerus bone to a new one.
Now I just need to find the command to automatically do that for all vertexs.
I am not a coder so it just take too much time for me to search for right command.
Please help