I tried something like this as a test, but I am prompted with this error
where I am unable to create any windows. Or I could create out this TEST
window, but when I try to relaunch another one, I got the same error as well
# RuntimeError: Object's name 'TEST' is not unique. #
import maya.cmds as cmds
win_name = "TEST"
win = cmds.window(win_name, title = "CHAN Importer", menuBar=True, iconName=
'.chanFileImport', widthHeight=(335, 221), sizeable=False)
cmds.showWindow(win)
if cmds.window( win_name, exists = True):
cmds.deleteUI(win_name)
print "The application is already opened!"
else:
cmds.window(win_name)
cmds.showWindow(win_name)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/0a7d7056-f4e0-489b-8f77-1524461fbd09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.