hi im a newbie trying to learn Python and I have a stupid error.
can anyone see what is obviously wrong (I cant lol)
i greatly appreciate your help
Error: TypeError: file <maya console> line 8: Invalid flag ‘radius’
import maya.cmds as mc
import random
for i in range (1,10):
randX=random.uniform(-20,20)
randZ=random.uniform(-20,20)
mc.polySphere(r=6)
mc.move(randX,0,randZ)
sphereList=mc.ls('polySphere*')
print sphereList
for i in range (1,len(sphereList)):
print 'polySphere'+ str(i)
#mc.select ('polySphere'+ str(i))
mc.setAttr('polySphere'+ str(i), e=True, radius=2)