PDA

View Full Version : find out if any windows are open


rxgeez
02-11-2008, 04:46 AM
Does anyone know of a way to find out if there are any windows currently open and what windows they are (hypergraph, hypershade, graph editor, ect). I know the command window -exists but is there any other command to find all windows and or if there are multiple copies of the same window (2 hypergraphs for example). Thanks

-k

T1ckL35
02-11-2008, 01:23 PM
Have a look in the Sticky MEL - UI Building topic as it has useful info on the UI.

You'll be wanting to use:

Mel:
getPanel -visiblePanels

or python:
print cmds.getPanel(visiblePanels=True)


modelPanelx are the visible modelling areas in the main UI and the others will give you the relevant windows (HyperGraph, Visor etc)
If you also had custom windows up then you'd have to combine it with the standard window -exists check

EDIT:
You can also get a list of the panel names as they are stored in your windowPrefs file.
e.g, in the last column in:
C:\Documents and Settings\<user>\My Documents \maya\<version>\prefs\windowPrefs.mel

Simon

rxgeez
02-11-2008, 04:14 PM
Hey thanks a lot Simon.

T1ckL35
02-11-2008, 06:29 PM
No problems Kiel,
By the way, I've just had a look at your website portfolio and its very impressive :)

Simon

ewerybody
02-12-2008, 08:34 AM
lsUI -type "window";

panel != window :)

T1ckL35
02-12-2008, 11:26 AM
didnt know that command ewerybody, very useful :)

Simon

meljunky
02-14-2008, 04:28 AM
Here is another use of the command:


lsUI -type "window";


http://ewertb.soundlinker.com/mel/mel.101.htm

If you remember Bryan Ewert's old website before it shut down.. it is all backed up here:
http://ewertb.soundlinker.com/

Later,
-Brian
www.meljunky.com (http://www.meljunky.com)

T1ckL35
02-14-2008, 11:09 AM
very nice resource, cheers! :)

Simon

CGTalk Moderation
02-14-2008, 11:09 AM
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.