Reputation: 35
Seems to be an issue when trying to close the window.
Heres the code:
import maya.cmds as cmds
def shapeTool ():
ram = 'RenamerWin'
if cmds.window(ram, q = True, exists =True):
cmds.deleteUI(ram)
ram = cmds.window("RenamerWin",t = "Shape Tool", w=300, h=300)
cmds.columnLayout(adj = True)
cmds.separator(h=20)
cmds.text("Welcome to the Shape Creator")
cmds.separator(h=20)
cmds.button(label='Close Window',command="cmds.deleteUI('%s')")
cmds.showWindow(ram)
shapeTool()
Upvotes: 1
Views: 4124
Reputation: 5885
You missed your format :)
cmds.button(label='Close Window',command="cmds.deleteUI('%s')" % ram)
Upvotes: 3