Hi! I’m basically new to MEL scripting, I’m trying to loop a simple model but it just stops looping after a certain transformation and won’t loop the whole thing. I have no idea what I’m doing wrong, someone please help. Thank you!
Here’s the script that I’m trying to run
global proc cubed4 (int $count)
{
int $i;
for ($i = 0; $i < $count; $i++)
{polyCube -w 1 -h 1 -d 1 -sx 6 -sy 1 -sz 3 -ax 0 1 0 -cuv 4 -ch 1;
xform -t 0 3.410221 0 -s 6.827151 1 6.827151 ;
select -tgl pCube1.f[3] ;
select -tgl pCube1.f[2] ;
move -r 0 0 -1.708991 ;
select -r pCube1.f[0] ;
select -tgl pCube1.f[5] ;
move -r 0 0 1.705947 ;
select -r pCube1.f[49] ;
select -tgl pCube1.f[52] ;
scale -r -p 2.03465e-07cm 3.410221cm 0cm 1.369667 1 1 ;
select -r pCube1.f[28] ;
select -tgl pCube1.f[25] ;
hilite pCube1.f[25:28] ;
selectMode -component ;
select -r pCube1.f[25:28] ;
polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 2.034649551e-07 -pvy 3.410221 -pvz -5.1225665 -divisions 1 -twist 0 -taper 1 -off 0 -thickness 0 -smoothingAngle 30 pCube1.f[25:28];
setAttr “polyExtrudeFace1.localTranslate” -type double3 0 0 10.989679 ;
select -cl ;
select -d pCube1.f[25:28] ;
}
}