View Full Version : Transfering Rigs

03 March 2003, 02:51 AM
hey people. Ive been messing around with a few characters in maya, trying to change them slightly, and keep their skinning properly, but even though i was able to transfer the weighting perfectly between them, i couldnt transfer their rigs. Does anyone have any ideas on how you could transfer the actual "rigging" from one character to another in maya?

03 March 2003, 04:40 AM

if your characters have the same bone system and naming convention, you can create a MEL script that automates your task.

here is an example of a script to automate a simple Leg Rig by selecting a couple of bones!

copy from here and paste in the script window to execute or create shelf :

/// creates an automatic leg rig

///to start, select the toe, the ball, the ankle and the hip joint
///in that orther to start script.

///developped by jacques khouri november 2003

string $selected[] = `ls -sl`;

select -r $selected[3] $selected[2];
ikHandle -n ik_leg_tmp;

select -r $selected[2] $selected[1];
ikHandle -n ik_foot_tmp;

select -r $selected[1] $selected[0];
ikHandle -n ik_toe_tmp;

select -r ik_leg_tmp;
group -n gr_ball_tmp;

$Xplace = `getAttr ik_foot_tmp.translateX`;
$Yplace = `getAttr ik_foot_tmp.translateY`;
$Zplace = `getAttr ik_foot_tmp.translateZ`;

xform -ws -piv $Xplace $Yplace $Zplace;

select -r ik_toe_tmp;
group -n gr_toe_tmp;

xform -ws -piv $Xplace $Yplace $Zplace;

select -r gr_toe_tmp gr_ball_tmp ik_foot_tmp;
group -n gr_slide_tmp;

xform -ws -piv $Xplace $Yplace $Zplace;

//rename obj

select -r gr_slide_tmp;
rename "gr_slide";

select -r gr_toe_tmp;
rename "gr_toe";

select -r ik_toe_tmp;
rename "ik_toe";

select -r gr_ball_tmp;
rename "gr_ball";

select -r ik_leg_tmp;
rename "ik_leg";

select -r ik_foot_tmp;
rename "ik_foot";

//end of the script

hope it helped you out!

later jack

CGTalk Moderation
01 January 2006, 02:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.