DEVILSAN
03-26-2009, 09:37 PM
hi i was going through a python tutorial, everything worked perfect except when i add maya.standalone.initialize() code the tkinter window doesnt shows up, does anyone has any idea what is the reason how to fix it..
here is the code
import maya.standalone
#import maya.cmds as mc
import Tkinter as tk
maya.standalone.initialize()
app =tk.Tk()
def makeCube():
print "Polycube was added."
# mc.polyCube()
def fileSave():
print "file is saved"
btnCube=tk.Button(app,text="Make a cube.",command=makeCube)
btnCube.pack()
btnSave=tk.Button(app,text="File Save.",command=fileSave)
btnSave.pack()
app.mainloop()
i dont even get any error.
here is the code
import maya.standalone
#import maya.cmds as mc
import Tkinter as tk
maya.standalone.initialize()
app =tk.Tk()
def makeCube():
print "Polycube was added."
# mc.polyCube()
def fileSave():
print "file is saved"
btnCube=tk.Button(app,text="Make a cube.",command=makeCube)
btnCube.pack()
btnSave=tk.Button(app,text="File Save.",command=fileSave)
btnSave.pack()
app.mainloop()
i dont even get any error.
