PDA

View Full Version : Tkinter breaks maya!!



rudi hammad
12-21-2009, 06:38 AM
Hi,
I have been trying and trying to make Tkinter work with maya but aparently there is a bug that breaks maya when there is a duplicated GUI.The problem is in the mainloop() command.


import Tkinter as tk

myWindow=tk.Tk()

def myCube():
mc.polyCube()

btnCube = tk.Button(myWindow,text="yuhuu!",command=myCube)
btnCube.pack()

myWindow.protocol("WM_DELETE_WINDOW",myWindow.quit)
myWindow.mainloop()

myWindow.destroy()



Just try to run 2 times this code in maya´s python editor.If maya doesn´t crash please let me know.

THNKR
01-18-2010, 09:30 AM
I was able to run it twice. TBH, I wouldn't bother with tkInter, Autodesk is going with Qt.