Загрузка...

Skeleton Script for Maya using MEL (Maya Embedded Language)

Here is an older skeleton script I put together all the way back in 2018.
The original MEL script was a copy past, with a few minor renaming of objects here and there.
Though I took time recently to update and comment out what parts do what in the code. There are still more things to adjust such as adding Ik/Fk and the respective controllers. As well as setting the internal attributes to match the specific joints, so that Maya's default mirror weights tool works correctly.
I also plan to remake this script using PyMel in the future.

Anyway, here is the full script if I used. incase you want to mess around with it.

________________________________________________________________________________________________________________________________________________

////////Skele_Auto
///

///
//////Cog Joint
select -d;
joint -n "COG_Joint" -p 0 32 -0.583289 ;
select -d;

/////Legs
joint -n"Hips" -p 0 30.5 1.25 ;
joint -n"L_upleg" -p 3.029971 30.088538 -0.735013 ;
joint -n"L_lowleg" -p 2.909741 16.262118 -0.389152 ;
joint -n"L_ankle" -p 2.969856 3.818341 -0.555931 ;
joint -n"L_ballfoot" -p 2.969856 1.600071 3.717058 ;
joint -n"L_toe" -p 2.969856 1.109799 5.759856 ;
/////Arm
///
//
select -d;
joint -n "L_Clav" -p 2.603861 46.614848 1 ;
joint -n "L_Shoulder" -p 5.261711 46.762267 -1 ;
joint -n "L_Elbow" -p 10.804593 44.065155 -1 ;
joint -n "L_Radius" -p 16.326238 41.644126 -1 ;
joint -n "L_Wrist" -p 19.341906 40.284952 -1 ;
joint -n "L_Hand" -p 21.125822 39.626602 -0 ;
select -d;
/////Fingers
joint -n "L_Index1" -p 22.239889 39.67648 -0.2162 ;
joint -n "L_Index2" -p 23.221073 39.150184 -0.225214 ;
joint -n "L_Index3" -p 23.788774 38.856813 -0.233177 ;
joint -n "L_Index4" -p 24.562324 38.3652 -0.30828 ;
select -d;
joint -n "L_Mid1" -p 22.323431 39.808213 -0.923056 ;
joint -n "L_Mid2" -p 23.426983 39.192323 -0.896143 ;
joint -n "L_Mid3" -p 24.214326 38.805849 -0.894932 ;
joint -n "L_Mid4" -p 25.004216 38.319271 -1.007046 ;
select -d;
joint -n "L_Ring1" -p 22.289988 39.807099 -1.602521 ;
joint -n "L_Ring2" -p 23.254259 39.229686 -1.598922 ;
joint -n "L_Ring3" -p 23.973537 38.876208 -1.588538 ;
joint -n "L_Ring4" -p 24.739187 38.402464 -1.689791 ;
select -d;
joint -n "L_Pinky1" -p 22.075953 39.730916 -2.294279 ;
joint -n "L_Pinky2" -p 22.788001 39.331223 -2.273258 ;
joint -n "L_Pinky3" -p 23.314074 39.071355 -2.261442 ;
joint -n "L_Pinky4" -p 23.961911 38.662335 -2.320842 ;
select -d;
joint -n "L_Thumb1" -p 20.204649 38.803428 -0.342774 ;
joint -n "L_Thumb2" -p 20.327113 38.500853 0.561905 ;
joint -n "L_Thumb3" -p 20.801079 38.281625 0.873943 ;
joint -n "L_Thumb4" -p 21.448724 38.187634 1.692307 ;

/////Spine
select -d;
joint -n"Spine1" -p 0 38 -0.25112 ;
joint -n"Spine2" -p 0 41 -0.538113 ;
joint -n"Spine3" -p 0 45 0.25112 ;
joint -n"Spine4" -p 0 48 0.269057 ;
joint -n"Neck" -p 0 50.217874 -0.841603 ;
joint -n"Head" -p 0 52.630831 -1.358666 ;
select -d;
joint -n"L_eye"-p 0.98605 52.404854 0 ;
select -d;
joint -n"R_eye"-p -0.98605 52.404854 0 ;
select -d;
joint -n"Jaw_low" -p 0 50.813471 2.569742 ;
select -d;

///
///parent////
parent Jaw_low Head ;
parent L_eye Head ;
parent R_eye Head ;
parent Spine1 COG_Joint ;
parent Hips COG_Joint ;
parent L_Clav Spine3 ;
parent L_Index1 L_Hand ;
parent L_Mid1 L_Hand ;
parent L_Ring1 L_Hand ;
parent L_Pinky1 L_Hand ;
parent L_Thumb1 L_Wrist ;
select -r L_Clav ;
mirrorJoint -mirrorYZ -mirrorBehavior -searchReplace "L" "R";
select -d ;
select -r L_upleg;
mirrorJoint -mirrorYZ -mirrorBehavior -searchReplace "L" "R";
group -n "Skele_group" COG_Joint ;

________________________________________________________________________________________________________________________________________________

Hans L.

Видео Skeleton Script for Maya using MEL (Maya Embedded Language) канала Hans Lee
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять