Setting Bound Joint Orientation

Can some1 plz tel me the melscript for changing the orientation of a joint without effecting the bound skin. Would like to keep the keframes without funny rotations happening to but that would only be a bonus, not realy nessasary for now but i am surtain it would help me in future scripts(I want to set the orientation to te worldorientation x ponting in x y in y... )

highend has a 'set bind pose' script. works great. but check your bind pose node afterwards. it will add any thing to the bind pose under the joint you select like constraints and groups. not a major issue but i used it in work and that can be a problem sometimes. great script tho.

other than that you could save the weights out or use something like the abweight lifter (again on highend). you could detach the skin make your changes and reference in a your prevous skinned mesh then use vertex numbering to copy the wights back on. you will need to have the same influences in the skin cluster tho.

as for keeping animation, not sure. think you may have to lose that. you could just try and offset all of your keys by the amount you rotated the joints, but if there are a load of joints thats going to be a pain. unless some one knows a script. which would be sweet.

hope that helps mate