PDA

View Full Version : deleting a docked window in 2011?


cgbeige
12-05-2010, 04:30 PM
I made a palette I made into a docked window, which is great except that I can't figure out how to delete a docked window, so I can reload the script. I get a "not unique" error and the only way around it is to let it spawn new docked windows, which isn't ideal. Anyone know how to get this to work?

mduvekot
12-05-2010, 06:19 PM
if (`dockControl -exists theFacer`) {deleteUI theFacer;}

string $myfacerDC = `dockControl -area "left"
-content $facerdialogBoxWindow
-allowedArea "left"
-allowedArea "right" -label "The Facer" theFacer`;

or

if (`dockControl -exists theFacer`) {
dockControl
-edit
-area "left"
-content $facerdialogBoxWindow
-vis true theFacer;
}

else {
string $myfacerDC = `dockControl -area "left"
-content $facerdialogBoxWindow
-allowedArea "left"
-allowedArea "right" -label "The Facer" theFacer`;
}

cgbeige
12-05-2010, 07:09 PM
awesome - thanks. First one works fine.

mduvekot
12-05-2010, 08:21 PM
It think the "close" button isn't designed to delete the dockControl, it just makes it invisible. The "correct" way to use it would be the second option. I suppose the idea is you just keep it around until you need it again. That's also how Maya's own scripts use it.

CGTalk Moderation
12-05-2010, 08:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.