PDA

View Full Version : unable to initialize Tkinter window after maya.standalone


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.

yaouna
12-14-2009, 07:54 PM
Ok, I'm not going to be of real help as I have exactly the same problem (I'm following the same tutorial).
The only thing I managed to get is that, import maya.standalone is working fine but maya.standalone.initialize() is just not working. In my IDLE shell I have a nice ========RESTART=========== which basicaly proves that the execution stopped. That's why there is no Tk initialisation, because the program does not run that far down the lines.
I have no idea of why it's doing that, I'm still trying to figure it out.
If anyone has some info, or if you managed to fix it !

CGTalk Moderation
12-14-2009, 07:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.