Stop workspaceControl UI from appearing in Maya after a restart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm probably using the command incorrectly, but I can't see how. I'm using workspaceControl as shown below. The makeUI() function puts a bunch of controls together. The UI appears properly and can be docked anywhere. The issue is that if I dock the UI in the main maya UI and close Maya an empty UI of that workspace is docked in Maya when Maya is restarted. When I re-run my script the ui controls fill up that empty UI -- which is understandable, but I do not want that empty UI space appearing in Maya when I restart.
What do I need to do to prevent this from happening?
def initiate():
if cmds.workspaceControl("rsSTB",ex=1):
cmds.deleteUI('rsSTB')
cmds.workspaceControl("rsSTB", restore=0, retain=0,floating=1, l='Toolbox', iScript = "scriptToolbox.makeUI()")