Maya Python IF statement: Coloring Faces

import maya.cmds as cmds
cmds.polyTorus() #create a polygonal torus
facesnr=cmds.polyEvaluate(f=True) #find out the number of torus faces

 
for i in range(facesnr):
box1=cmds.xform('pTorus1.f[%d]'%i,q=1,bb=1)
if box1[1]>.2:
cmds.select('pTorus1.f[%d]'%i)
cmds.hyperShade(assign='blinn1')
Continue reading “Maya Python IF statement: Coloring Faces”