pymel.core.windows.lsUI

lsUI(**kwargs)

This command returns the names of UI objects.

Modified:
  • long defaults to True
  • if no type is passed, defaults to all known types
Flags:
Long name (short name) Argument Types Properties
cmdTemplates (ct) bool ../../../_images/create.gif
 
UI command templates created using ELF UI commands. Flag can have multiple arguments, passed either as a tuple or a list.
collection (col) bool ../../../_images/create.gif
 
Control collections created using ELF UI commands.
contexts (ctx) bool ../../../_images/create.gif
 
Tool contexts created using ELF UI commands.
controlLayouts (cl) bool ../../../_images/create.gif
 
Control layouts created using ELF UI commands [e.g. formLayouts, paneLayouts, etc.]
controls (ctl) bool ../../../_images/create.gif
 
Controls created using ELF UI commands. [e.g. buttons, checkboxes, etc]
dumpWidgets (dw) bool ../../../_images/create.gif
 
Dump all QT widgets used by Maya.
editors (ed) bool ../../../_images/create.gif
 
All currently existing editors.
head (hd) int ../../../_images/create.gif
 

The parameter specifies the maximum number of elements to be returned from the beginning of the list of items. (Note: each flag will return at most this many items so if multiple flags are specified then the number of items returned will be greater than the value specified).

long (l) bool ../../../_images/create.gif
 
Use long pathnames instead of short non-path names.
menuItems (mi) bool ../../../_images/create.gif
 
Menu items created using ELF UI commands.
menus (m) bool ../../../_images/create.gif
 
Menus created using ELF UI commands.
numWidgets (nw) bool ../../../_images/create.gif
 
Reports the number of QT widgets used by Maya.
panels (p) bool ../../../_images/create.gif
 
All currently existing panels.
radioMenuItemCollections (rmc) bool ../../../_images/create.gif
 
Menu item collections created using ELF UI commands.
tail (tl) int ../../../_images/create.gif
 

The parameter specifies the maximum number of elements to be returned from the end of the list of items. (Note: each flag will return at most this many items so if multiple flags are specified then the number of items returned will be greater than the value specified).

type (typ) unicode ../../../_images/create.gif
 
List all objects of a certain type specified by the string argument. For example, window, menu, control, or controlLayout.
windows (wnd) bool ../../../_images/create.gif
 
Windows created using ELF UI commands.

Derived from mel command maya.cmds.lsUI

Example:

import pymel.core as pm

#    List all windows.
#
pm.lsUI( windows=True )
# Result: [ui.Window('MayaWindow'), ui.Window('scriptEditorPanel1Window')] #

#    List all panels and editors.
#
pm.lsUI( panels=True, editors=True )

#    Use the -typ/type flag to list all controls and control layouts.
#    Alternatively, you could use the -ctl/controls and -cl/controlLayouts
#    flags.
#
pm.lsUI( type=['control','controlLayout'] )

#    Or...
#
pm.lsUI( controls=True, controlLayouts=True )

Previous topic

pymel.core.windows.loadUI

Next topic

pymel.core.windows.menu

Core

Core Modules

Other Modules

This Page