How to remove custom tab when closing Maya ?

How to remove custom tab when closing Maya ?

huseila
Enthusiast Enthusiast
324 Views
1 Reply
Message 1 of 2

How to remove custom tab when closing Maya ?

huseila
Enthusiast
Enthusiast

Hi all,

 

I made a custom side tab panel as attached image and it works fine basically. The only problem is that this tab still survive when I close and reopen Maya. I would like to make all my custom tab panels delete themselves when closing Maya and I don't want to have any record about them in my Maya preference files (i.e. Maya_Classic.json or windowPrefs.mel under MyDocument/maya/2018/prefs folder). Is there any command that can help ?

0 Likes
Accepted solutions (1)
325 Views
1 Reply
Reply (1)
Message 2 of 2

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

If you know the exact name of your window, this should be fairly easy to do by using a scriptjob.

 

exitScriptJob = cmds.scriptJob(e = ["quitApplication", "delUI()"])

def delUI():
    cmds.deleteUI("NameOfYourWindow", ct = True)
    cmds.scriptJob(k = exitScriptJob)

 

I hope it helps!