Loop slows down
Hey,
I'm writing a short script in python that extrudes twice every face on a plane.
With the following code it works but when i'm executing the script, it slows down if the loop runs over 30 or 40 times. It starts real quick but slows down more and more. I don't understand why it's happening, it shouldnt worry if the variable x is 10 or 100
class Plane():
def Creator(self, building):
for x in range(building):
for i in range(2):
cmds.polyExtrudeFacet( 'pPlane1.f[' + str(x) + ']' , ls=(0.7, 0.7, 0) )
cmds.polyExtrudeFacet( 'pPlane1.f[' + str(x) + ']' , ltz=0.4 )
def Ground(self, XScale, YScale):
cmds.polyPlane( w=XScale, h=YScale, sw=XScale, sh=YScale)
building = XScale * YScale
place.Creator(building)
place = Plane()
place.Ground(15, 15)
I hope somebody can explain it to me and have some advice in case my program is bad^^
thanks :-)
Last edited by McDee; 24-02-2013 at 11:16 AM.