trying to make this work
import maya.cmds as mc
def firstFace():
FaceToSel = 'first' def allFace():
FaceToSel = 'all'
def execute():
if FaceToSel == 'first':
print Yes
elif FaceToSel == 'all':
print No
def ui():
if mc.window('face_Select', exists = True):
mc.deleteUI('face_Select')
FaceWin = mc.window('face_Select', mxb = False)
mc.columnLayout( adjustableColumn = True )
mc.intFieldGrp( 'numberOfFaces', label = 'Number Of Facess', value1 = 10 )
ButtonOne = mc.radioButtonGrp( label='Type', labelArray3=['TopFaces', 'Allfaces'], numberOfRadioButtons = 2, onCommand1 = 'firstFace()', onCommand2 = 'lastFace()')
mc.button( label = 'Select faces', command = 'execute()', align = 'center', aop = True)
mc.showWindow('face_Select')
ui()