Package mrv :: Package maya :: Package ui :: Module base
[hide private]
[frames] | no frames]

Module base

source code

Contains some basic classes that are required to run the UI system
Classes [hide private]
  BaseUI
  NamedUI
Implements a simple UI element having a name and most common methods one can apply to it.
  SizedControl
Base Class for all controls having a dimension
  Window
Simple Window Wrapper
  MenuBase
Common base for all menus
  ContainerMenuBase
Implements the container abilities of all menu types
  Menu
  PopupMenu
  MenuItem
  SubMenuItem
A menu which is always a submenu.
  CommandMenuItem
Functions [hide private]
 
getUIType(uiname)
Returns: uitype string having a corresponding mel command - some types returned do not correspond to the actual name of the command used to manipulate the type
source code
 
wrapUI(uinameOrList, ignore_errors=False)
Returns: a new instance ( or list of instances ) of a suitable python UI wrapper class for the UI with the given uiname(s)
source code
 
UI(uinameOrList, ignore_errors=False)
Returns: a new instance ( or list of instances ) of a suitable python UI wrapper class for the UI with the given uiname(s)
source code
 
uiExists(uiname)
Returns: True if the user interface element with the given name exists
source code
 
lsUI(**kwargs)
List UI elements as python wrapped types
source code
Variables [hide private]
  _uidict = None
hash(x)
Function Details [hide private]

getUIType(uiname)

source code 
Returns:
uitype string having a corresponding mel command - some types returned do not correspond to the actual name of the command used to manipulate the type

wrapUI(uinameOrList, ignore_errors=False)

source code 
Parameters:
  • uinameOrList - if single name, a single instance will be returned, if a list of names is given, a list of respective instances. None will be interpreted as empty list
  • ignore_errors - ignore ui items that cannot be wrapped as the type is unknown.
Returns:
a new instance ( or list of instances ) of a suitable python UI wrapper class for the UI with the given uiname(s)
Raises:
  • RuntimeError - if uiname does not exist or is not wrapped in python

UI(uinameOrList, ignore_errors=False)

source code 
Parameters:
  • uinameOrList - if single name, a single instance will be returned, if a list of names is given, a list of respective instances. None will be interpreted as empty list
  • ignore_errors - ignore ui items that cannot be wrapped as the type is unknown.
Returns:
a new instance ( or list of instances ) of a suitable python UI wrapper class for the UI with the given uiname(s)
Raises:
  • RuntimeError - if uiname does not exist or is not wrapped in python

uiExists(uiname)

source code 
Returns:
True if the user interface element with the given name exists

lsUI(**kwargs)

source code 
List UI elements as python wrapped types
Parameters:
  • kwargs - flags from the respective maya command are valid If no special type keyword is specified, all item types will be returned
Returns:
list of NamedUI instances of respective UI elements