def show(self): if cmds.window(self.windowName, query=True, exists=True): self.close() cmds.window(self.windowName) self.buildUI() cmds.showWindow()