MEL ウエイト調整ツール6 過去の作成したツールを追加しました。
string $window = `window -widthHeight 307 406`;
setParent ..;
showWindow $window;
deleteUI -window $window;
global proc SelOne()
{
string $OBJS_01= `ls -sl -fl`;
select -r $OBJS_01[0];
};
global proc SelSKN()
{
string $skins1= `ls -sl`;
for( $skin1 in $skins1 )
{
textField -e -tx ($skin1) SKN;
};
};
global proc SelJnt1()
{
string $Jnts1= `ls -sl`;
for( $Jnt1 in $Jnts1 )
{
textField -e -tx ($Jnt1) J001;
};
};
global proc J001s()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
float $J001s =`skinPercent -transform $J001 -query $SKN1 $names1[0]`;
textField -e -tx ($J001s) J001s;
};
global proc J001is()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
float $J001s = `textField -query -text J001s`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 $J001s $SKN1 $names1;
};global proc J001is()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
float $J001s = `textField -query -text J001s`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 $J001s $SKN1 $names1;
};
global proc SelJnt2()
{
string $Jnts2= `ls -sl`;
for( $Jnt2 in $Jnts2 )
{
textField -e -tx ($Jnt2) J002;
};
};
global proc J002s()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
float $J002s =`skinPercent -transform $J002 -query $SKN2 $names2[0]`;
textField -e -tx ($J002s) J002s;
};
global proc J002is()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
float $J002s = `textField -query -text J002s`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 $J002s $SKN2 $names2;
};
global proc LON()
{
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")1;
};
};
global proc LOFF()
{
string $names= `ls -sl`;
string $name;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")0;
};
};
global proc ALON()
{
select `ls -type joint`;
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")1;
};
};
global proc ALOFF()
{
select `ls -type joint`;
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")0;
};
};
global proc JS1()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 1 $SKN1 $names1;
};
global proc JS2()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.1 $SKN1 $names1;
};
global proc JS3()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.3 $SKN1 $names1;
};
global proc JS4()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.5 $SKN1 $names1;
};
global proc JS5()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 0.3 $SKN2 $names2;
};
global proc JS6()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 0.1 $SKN2 $names2;
};
global proc JS7()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 1 $SKN2 $names2;
};
global proc gotoBP()
{
string $selOBJS= `ls -sl`;
DisableAll;
string $Pose= `ls -type dagPose`;
select -r $Pose[0] $selOBJS[0];
GoToBindPose;
evalEcho("gotoBindPose");
gotoBindPose;
};
global proc ChangeNEW()
{
string $selOBJS= `ls -sl`;
print $selOBJS[0];
print $selOBJS[1];
print $selOBJS[2];
string $selOBJSn= `ls -sl -sn`;
select -cl ;
string $selOBJjnt= `ls -sl`;
select -cl ;
select -r $selOBJS[2] $selOBJS[1];
SmoothBindSkin;
select -cl ;
select -r $selOBJS[0];
select -tgl $selOBJS[1];
CopySkinWeights;
select -cl ;
select -r $selOBJS[0];
Delete;
doDelete;
};
global proc WeightC()
{
string $selOBJS= `ls -sl`;
print $selOBJS[0];
print $selOBJS[1];
print $selOBJS[2];
string $selOBJSn= `ls -sl -sn`;
select -cl ;
string $selOBJjnt= `ls -sl`;
select -cl ;
select -r $selOBJS[2] $selOBJS[1];
SmoothBindSkin;
select -cl ;
select -r $selOBJS[0];
select -tgl $selOBJS[1];
CopySkinWeights;
select -cl ;
};
window -width 300 -height 135 -title "Weight Tool" -rtf 1;
columnLayout -adjustableColumn true;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "skinCluster" -align "right";
textField -editable true -it "skinCluster1" SKN;
button -label "name" -command "SelSKN";
setParent..;
separator;
separator;
button -label "Below Joint" -command "SelJnt1;PickWalkDown;SelJnt2;";
separator;
separator;
separator;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "JOINT1" -align "right";
textField -editable true J001;
button -label "name" -command "SelJnt1";
setParent..;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
button -label "SelWeight" -command "SelOne;J001s";
textField -editable true -it "1" J001s;
button -label "SelEnter" -command "J001is;J002s;";
setParent..;
separator;
separator;
button -label "J1= 1 : J2= 0" -command "JS1;J001s;J002s;";
button -label "J1=0.9 : J2=0.1" -command "JS1;JS6;J001s;J002s;";
button -label "J1=0.7 : J2=0.3" -command "JS1;JS5;J001s;J002s;";
button -label "J1=0.5 : J2=0.5" -command "JS7;JS4;J001s;J002s;";
button -label "J1=0.3 : J2=0.7" -command "JS7;JS3;J001s;J002s;";
button -label "J1=0.1 : J2=0.9" -command "JS7;JS2;J001s;J002s;";
button -label "J1= 0 : J2= 1" -command "JS7;J001s;J002s;";
separator;
separator;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "JOINT2" -align "right";
textField -editable true J002;
button -label "name" -command "SelJnt2";
setParent..;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
button -label "SelWeight" -command "SelOne;J002s";
textField -editable true -it "0" J002s;
button -label "SelEnter" -command "J002is;J001s;";
setParent..;
separator;
separator;
separator;
button -label "WeightALL" -command "SelOne;J001s;J002s;";
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "JNT lockON" -command "LON";
button -label "JNT lockOFF" -command "LOFF";
setParent..;
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "ALL JNT lockON" -command "ALON";
button -label "ALL JNT lockOFF" -command "ALOFF";
setParent..;
separator;
separator;
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "ComponentEditor" -command "ComponentEditor";
button -label "PaintSkinWeights" -command "ArtPaintSkinWeightsToolOptions";
setParent..;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "Mirror" -command "MirrorSkinWeightsOptions";
button -label "Paint Smooth" -command "ArtPaintSkinWeightsToolOptions;artAttrPaintOperation artAttrSkinPaintCtx Smooth;artAttrSkinPaintCtx -e -clear `currentCtx`";
setParent..;
string $window = `window -widthHeight 307 406`;
setParent ..;
showWindow $window;
deleteUI -window $window;
global proc SelOne()
{
string $OBJS_01= `ls -sl -fl`;
select -r $OBJS_01[0];
};
global proc SelSKN()
{
string $skins1= `ls -sl`;
for( $skin1 in $skins1 )
{
textField -e -tx ($skin1) SKN;
};
};
global proc SelJnt1()
{
string $Jnts1= `ls -sl`;
for( $Jnt1 in $Jnts1 )
{
textField -e -tx ($Jnt1) J001;
};
};
global proc J001s()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
float $J001s =`skinPercent -transform $J001 -query $SKN1 $names1[0]`;
textField -e -tx ($J001s) J001s;
};
global proc J001is()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
float $J001s = `textField -query -text J001s`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 $J001s $SKN1 $names1;
};global proc J001is()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
float $J001s = `textField -query -text J001s`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 $J001s $SKN1 $names1;
};
global proc SelJnt2()
{
string $Jnts2= `ls -sl`;
for( $Jnt2 in $Jnts2 )
{
textField -e -tx ($Jnt2) J002;
};
};
global proc J002s()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
float $J002s =`skinPercent -transform $J002 -query $SKN2 $names2[0]`;
textField -e -tx ($J002s) J002s;
};
global proc J002is()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
float $J002s = `textField -query -text J002s`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 $J002s $SKN2 $names2;
};
global proc LON()
{
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")1;
};
};
global proc LOFF()
{
string $names= `ls -sl`;
string $name;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")0;
};
};
global proc ALON()
{
select `ls -type joint`;
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")1;
};
};
global proc ALOFF()
{
select `ls -type joint`;
string $name;
string $names= `ls -sl`;
for( $name in $names )
{
setAttr ( $name + ".lockInfluenceWeights")0;
};
};
global proc JS1()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 1 $SKN1 $names1;
};
global proc JS2()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.1 $SKN1 $names1;
};
global proc JS3()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.3 $SKN1 $names1;
};
global proc JS4()
{
string $SKN1 = `textField -query -text SKN`;
string $names1= `ls -sl`;
string $J001 = `textField -query -text J001`;
skinPercent -transformValue $J001 0.5 $SKN1 $names1;
};
global proc JS5()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 0.3 $SKN2 $names2;
};
global proc JS6()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 0.1 $SKN2 $names2;
};
global proc JS7()
{
string $SKN2 = `textField -query -text SKN`;
string $names2= `ls -sl`;
string $J002 = `textField -query -text J002`;
skinPercent -transformValue $J002 1 $SKN2 $names2;
};
global proc gotoBP()
{
string $selOBJS= `ls -sl`;
DisableAll;
string $Pose= `ls -type dagPose`;
select -r $Pose[0] $selOBJS[0];
GoToBindPose;
evalEcho("gotoBindPose");
gotoBindPose;
};
global proc ChangeNEW()
{
string $selOBJS= `ls -sl`;
print $selOBJS[0];
print $selOBJS[1];
print $selOBJS[2];
string $selOBJSn= `ls -sl -sn`;
select -cl ;
string $selOBJjnt= `ls -sl`;
select -cl ;
select -r $selOBJS[2] $selOBJS[1];
SmoothBindSkin;
select -cl ;
select -r $selOBJS[0];
select -tgl $selOBJS[1];
CopySkinWeights;
select -cl ;
select -r $selOBJS[0];
Delete;
doDelete;
};
global proc WeightC()
{
string $selOBJS= `ls -sl`;
print $selOBJS[0];
print $selOBJS[1];
print $selOBJS[2];
string $selOBJSn= `ls -sl -sn`;
select -cl ;
string $selOBJjnt= `ls -sl`;
select -cl ;
select -r $selOBJS[2] $selOBJS[1];
SmoothBindSkin;
select -cl ;
select -r $selOBJS[0];
select -tgl $selOBJS[1];
CopySkinWeights;
select -cl ;
};
window -width 300 -height 135 -title "Weight Tool" -rtf 1;
columnLayout -adjustableColumn true;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "skinCluster" -align "right";
textField -editable true -it "skinCluster1" SKN;
button -label "name" -command "SelSKN";
setParent..;
separator;
separator;
button -label "Below Joint" -command "SelJnt1;PickWalkDown;SelJnt2;";
separator;
separator;
separator;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "JOINT1" -align "right";
textField -editable true J001;
button -label "name" -command "SelJnt1";
setParent..;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
button -label "SelWeight" -command "SelOne;J001s";
textField -editable true -it "1" J001s;
button -label "SelEnter" -command "J001is;J002s;";
setParent..;
separator;
separator;
button -label "J1= 1 : J2= 0" -command "JS1;J001s;J002s;";
button -label "J1=0.9 : J2=0.1" -command "JS1;JS6;J001s;J002s;";
button -label "J1=0.7 : J2=0.3" -command "JS1;JS5;J001s;J002s;";
button -label "J1=0.5 : J2=0.5" -command "JS7;JS4;J001s;J002s;";
button -label "J1=0.3 : J2=0.7" -command "JS7;JS3;J001s;J002s;";
button -label "J1=0.1 : J2=0.9" -command "JS7;JS2;J001s;J002s;";
button -label "J1= 0 : J2= 1" -command "JS7;J001s;J002s;";
separator;
separator;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
text -label "JOINT2" -align "right";
textField -editable true J002;
button -label "name" -command "SelJnt2";
setParent..;
gridLayout -numberOfColumns 3 -cellWidth 100 -cellHeight 20;
button -label "SelWeight" -command "SelOne;J002s";
textField -editable true -it "0" J002s;
button -label "SelEnter" -command "J002is;J001s;";
setParent..;
separator;
separator;
separator;
button -label "WeightALL" -command "SelOne;J001s;J002s;";
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "JNT lockON" -command "LON";
button -label "JNT lockOFF" -command "LOFF";
setParent..;
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "ALL JNT lockON" -command "ALON";
button -label "ALL JNT lockOFF" -command "ALOFF";
setParent..;
separator;
separator;
separator;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "ComponentEditor" -command "ComponentEditor";
button -label "PaintSkinWeights" -command "ArtPaintSkinWeightsToolOptions";
setParent..;
gridLayout -numberOfColumns 2 -cellWidth 150 -cellHeight 20;
button -label "Mirror" -command "MirrorSkinWeightsOptions";
button -label "Paint Smooth" -command "ArtPaintSkinWeightsToolOptions;artAttrPaintOperation artAttrSkinPaintCtx Smooth;artAttrSkinPaintCtx -e -clear `currentCtx`";
setParent..;
separator;
separator;
separator;
showWindow;
columnLayout -adjustableColumn true;
button -command "gotoBP;" -h 16 -label "GotoBindPose";
text -label "1 Select a SkinOBJ." -align "left";
text -label "2 Addition select a NewOBJ." -align "left";
text -label "3 Addition select a RootJoint." -align "left";
button -command "ChangeNEW;" -h 16 -label "ChangeNewOBJ";
button -command "WeightC;" -h 16 -label "WeightCopy";
checkBox -height 16 -label "On EnableAll / Off DisableAll " -offCommand "DisableAll" -onCommand "EnableAll";
showWindow;
showWindow;