I've question about creating dynamic ui in pymel. Is there a way to
make
this code more pythonic in pymel ?
from pymel import *
class myUI(object):
def __init__(self):
try:
deleteUI(self.myWin)
except:
pass
self.myWin = window()
columnLayout()
for i in range(5):
button('b'+str(i),l='button_'+str(i), c = Callback
(self.checkButton,i))
self.myWin.show()
def checkButton(self,id):
print button('b'+str(id),query=True,label=True)
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---