It's very simple:
winName = "myWindow"
if pm.windows.window(winName, exists=True):
pm.windows.deleteUI(winName)
2012/1/9 Panupat Chongstitwattana <[email protected]>
> In Maya 2010, if I run the script to start a UI that is already running,
> it would crash Maya D: How can I check if the UI is already running and
> close it?
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe