Stop workspaceControl UI from appearing in Maya after a restart

Stop workspaceControl UI from appearing in Maya after a restart

skiena
Explorer Explorer
448 Views
0 Replies
Message 1 of 1

Stop workspaceControl UI from appearing in Maya after a restart

skiena
Explorer
Explorer

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()")

 

 

0 Likes
449 Views
0 Replies
Replies (0)