Here's an example, you can use the same principles found below for arms with fingers, legs, feet, etc. It takes a lot of scripting and troubleshooting, but once you're done it makes some tedious animation tasks really effortless. If you get stuck on a command, look in the MEL Command Reference in the MAYA HTML docs.
//Swap Arm Motion Example
/*
This is just enough script to give you an idea of how to make a script to swap the motion from side of a body to another.
Before you try the script you must do this:
Make two arms with these joint names shoulderL shoulderR elbowL elbowR wristL wristR
Now add IK handles to them named armL and armR
You can parent a box to each wrist to see the wrist rotations better
Key both arms doing something (animate IK handles and wrist rotations) then run the script.
The motion should swap between the two.
I cut a bunch of stuff out, so it may not work, pretty easy to troubleshoot though.
-Spamkill
*/
//Create Temp Arm
select -cl;
joint -n XSHOULDER -p 0.660417 0 0.619575 ;
joint -n XELBOW-p 1.498507 0 0.566723 ;
joint -e -oj xyz;
joint -n XWRIST -p 2.049683 0 0.604474 ;
joint -e -oj xyz;
//Add IK handle
select -r XSHOULDER.rotatePivot ;
select -add XWRIST.rotatePivot ;
ikHandle -n XIKHANDLE;
//deselect everything
select -cl;
// -------- LEFT to TEMP ---------
//Copy IK handle motion from left arm to temp arm
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"armL"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"XIKHANDLE"};
//Delete left arm IK handle keys
cutKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"armL"};
//Copy motion from right arm to left arm
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"armR"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"armL"};
//Delete right arm keys
cutKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"armR"};
//Copy IK handle motion from temp arm to right arm
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"XIKHANDLE"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"armR"};
//copy left wrist keys and paste to temp wrist
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"wristL"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"XWRIST"};
//Delete left elbow, wrist keys
cutKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"elbowL", "wristL",};
// ---------RIGHT to LEFT ------------
//copy keys from right wrist to left wrist
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"wristR"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"wristL"};
//Delete right elbow, wrist
cutKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"elbowR", "wristR"};
// ----------- TEMP to RIGHT ----------
//copy temp elbow keys and paste to right elbow
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"XELBOW.tx"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"elbowR.tx"};
//copy temp wrist keys and paste to right wrist
copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 {"XWRIST"};
pasteKey -option replaceCompletely -copies 1 -connect 0 -timeOffset 0 -floatOffset 0 -valueOffset 0 {"wristR"};
//--- Flip Curves ---
//flip only the curves that need it!
//arm translations
scaleKey -scaleSpecifiedKeys 1 -time ":" -float ":" -timeScale 1 -timePivot 0 -floatScale 0 -floatPivot 0 -valueScale -1 -valuePivot 0 -hierarchy none -controlPoints 0 -shape 1 {"armL.translateX", "armR.translateX"};
//arm rotations
scaleKey -scaleSpecifiedKeys 1 -time ":" -float ":" -timeScale 1 -timePivot 0 -floatScale 0 -floatPivot 0 -valueScale -1 -valuePivot 0 -hierarchy none -controlPoints 0 -shape 1 {"wristL.ry", "wristL.rz", "wristR.ry", "wristR.rz"};
//Delete temp arm
delete XSHOULDER;
//end