This script has the ability to move and scale UVs.
if (`window -exists MovingUVs`)
deleteUI MovingUVs;
textureWindowSelectConvert 4; //making sure we select UVs of the object
window -width 20 -height 20 "MovingUVs";
gridLayout
-numberOfRowsColumns 1 3
-cellWidthHeight 75 20;
text -l " "; //blank space
button -label "Up" -c "GoingUp();";
text -l " ";
button -label "Left" -c "GoingLeft();";
text -l " ";
button -label "Right" -c "GoingRight();";
text -l " ";
button -label "Down" -c "GoingDown();";
text -l " ";
button -label "Scale+" -c "ScaleUp();";
text -l " ";
text -l " ";
button -label "Scale-" -c "ScaleDown();";
setParent ..;
showWindow MovingUVs;
//edit these values if you it to have a greater effect
global proc GoingUp()
{
polyEditUV -u 0 -v 0.001;
}
global proc GoingDown()
{
polyEditUV -u 0 -v -0.001;
}
global proc GoingLeft()
{
polyEditUV -u -0.001 -v -0;
}
global proc GoingRight()
{
polyEditUV -u 0.001 -v -0;
}
global proc ScaleUp()
{
polyEditUV -su 1.001 -sv 1.001 ;
}
global proc ScaleDown()
{
polyEditUV -su 0.999 -sv 0.999 ;
};
No comments:
Post a Comment