mrv.maya.ui.base

Epydoc: mrv.maya.ui.base

Contains some basic classes that are required to run the UI system

Functions

mrv.maya.ui.base.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)

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.
Raises RuntimeError:
 

if uiname does not exist or is not wrapped in python

mrv.maya.ui.base.capitalize(s)
Returns:s with first letter capitalized
mrv.maya.ui.base.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
mrv.maya.ui.base.lsUI(**kwargs)

List UI elements as python wrapped types

Parameter: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
mrv.maya.ui.base.noneToList(res)
Returns:list instead of None
mrv.maya.ui.base.uiExists(uiname)
Returns:True if the user interface element with the given name exists
mrv.maya.ui.base.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)

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.
Raises RuntimeError:
 

if uiname does not exist or is not wrapped in python

Classes

Epydoc: mrv.maya.ui.base.BaseUI

class mrv.maya.ui.base.BaseUI(*args, **kwargs)
Bases: object

Epydoc: mrv.maya.ui.base.MenuItem

class mrv.maya.ui.base.MenuItem(*args, **kwargs)

Bases: mrv.maya.ui.MenuBase

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
e_c
Event suitable to deal with user interface callback
e_command
Event suitable to deal with user interface callback
e_ddc
Event suitable to deal with user interface callback
e_dmc
Event suitable to deal with user interface callback
e_dragDoubleClickCommand
Event suitable to deal with user interface callback
e_dragMenuCommand
Event suitable to deal with user interface callback
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_ann
p_annotation
p_aob
p_bld
p_boldFont
p_cb
p_checkBox
p_cl
p_collection
p_controlModifier
p_ctl
p_d
p_da
p_data
p_divider
p_docTag
p_dt
p_ec
p_echoCommand
p_ecr
p_en
p_enable
p_enableCommandRepeat
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_i
p_icb
p_image
p_imageOverlayLabel
p_iob
p_iol
p_irb
p_isCheckBox
p_isOptionBox
p_isRadioButton
p_it
p_italicized
p_ke
p_keyEquivalent
p_l
p_label
p_mn
p_mnemonic
p_opt
p_optionModifier
p_radialPosition
p_radioButton
p_rb
p_rp
p_sh
p_shiftModifier
p_sm
p_subMenu
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

toMenu()
Returns:Menu representing self if it is a submenu
Raises TypeError:
 if self i no submenu
translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.ContainerMenuBase

class mrv.maya.ui.base.ContainerMenuBase(*args, **kwargs)

Bases: mrv.maya.ui.util.UIContainerBase

Implements the container abilities of all menu types

add(child, set_self_active=False, revert_to_previous_parent=True)

Add the given child UI item to our list of children

Parameters:
  • set_self_active – if True, we explicitly make ourselves the current parent for newly created UI elements
  • revert_to_previous_parent – if True, the previous parent will be restored once we are done, if False we keep the parent - only effective if set_self_active is True
Returns:

the newly added child, allowing contructs like button = layout.addChild( Button( ) )

childByName(childname)
Returns:stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” )
Raises KeyError:
 if a child with that name does not exist
clearChildren()
Clear our child arrays to quickly forget about our children
deleteChild(child)
Delete the given child ui physically so it will not be shown anymore after removing it from our list of children
listChildren(predicate=<function <lambda> at 0x6063578>)
Returns:list with our child instances
Parameter:predicate – function returning True for each child to include in result, allows to easily filter children
Note:it’s a copy, so you can freely act on the list
Note:children will be returned in the order in which they have been added
removeChild(child)

Remove the given child from our list

Returns:True if the child was found and has been removed, False otherwise
setActive()

Make ourselves the active menu

Returns:self
setParentActive()

Make our parent the active menu layout

Returns:self
Note:only useful self is a submenu

Epydoc: mrv.maya.ui.base

class mrv.maya.ui.base.EventSenderUI

Bases: mrv.util.EventSender

Allows registration of a typical UI callback It basically streamlines the registration for a callback such that any number of listeners can be called when an event occours - this works by keeping an own list of callbacks registered for a specific event, and calling them whenever the maya ui callback has been triggered

To use this class , see the documentation of EventSender, but use the Event instead. If you want to add your own events, use your own Signal s.

The class does NOT use weakreferences for the main callbacks to make it easier to use. Use the WeakFunction to properly and weakly bind an instance function

When registered for an event, the sender will be provided to each callback as first argument.

clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
classmethod listEventNames()
Returns:list of event ids that exist on our class
sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress

Epydoc: mrv.maya.ui.base.Menu

class mrv.maya.ui.base.Menu(*args, **kwargs)

Bases: mrv.maya.ui.MenuBase, mrv.maya.ui.base.ContainerMenuBase

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
add(child, set_self_active=False, revert_to_previous_parent=True)

Add the given child UI item to our list of children

Parameters:
  • set_self_active – if True, we explicitly make ourselves the current parent for newly created UI elements
  • revert_to_previous_parent – if True, the previous parent will be restored once we are done, if False we keep the parent - only effective if set_self_active is True
Returns:

the newly added child, allowing contructs like button = layout.addChild( Button( ) )

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

childByName(childname)
Returns:stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” )
Raises KeyError:
 if a child with that name does not exist
children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
clearChildren()
Clear our child arrays to quickly forget about our children
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
deleteChild(child)
Delete the given child ui physically so it will not be shown anymore after removing it from our list of children
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

itemArray()
Returns:An array of our menuItems
Note:This method worksaround a maya 2011 problem that makes it impossible to properly wrap menuItems with short names as returned by p_itemArray
iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

listChildren(predicate=<function <lambda> at 0x6063578>)
Returns:list with our child instances
Parameter:predicate – function returning True for each child to include in result, allows to easily filter children
Note:it’s a copy, so you can freely act on the list
Note:children will be returned in the order in which they have been added
classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_aob
p_dai
p_deleteAllItems
p_docTag
p_dt
p_en
p_enable
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_familyImage
p_fi
p_helpMenu
p_hm
p_ia
p_itemArray
p_l
p_label
p_mn
p_mnemonic
p_ni
p_numberOfItems
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

removeChild(child)

Remove the given child from our list

Returns:True if the child was found and has been removed, False otherwise
replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
setActive()

Make ourselves the active menu

Returns:self
setParentActive()

Make our parent the active menu layout

Returns:self
Note:only useful self is a submenu
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.MenuBase

class mrv.maya.ui.base.MenuBase(*args, **kwargs)

Bases: mrv.maya.ui.NamedUI

Common base for all menus

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_aob
p_docTag
p_dt
p_en
p_enable
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_l
p_label
p_mn
p_mnemonic
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.MenuItem

class mrv.maya.ui.base.MenuItem(*args, **kwargs)

Bases: mrv.maya.ui.MenuBase

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
e_c
Event suitable to deal with user interface callback
e_command
Event suitable to deal with user interface callback
e_ddc
Event suitable to deal with user interface callback
e_dmc
Event suitable to deal with user interface callback
e_dragDoubleClickCommand
Event suitable to deal with user interface callback
e_dragMenuCommand
Event suitable to deal with user interface callback
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_ann
p_annotation
p_aob
p_bld
p_boldFont
p_cb
p_checkBox
p_cl
p_collection
p_controlModifier
p_ctl
p_d
p_da
p_data
p_divider
p_docTag
p_dt
p_ec
p_echoCommand
p_ecr
p_en
p_enable
p_enableCommandRepeat
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_i
p_icb
p_image
p_imageOverlayLabel
p_iob
p_iol
p_irb
p_isCheckBox
p_isOptionBox
p_isRadioButton
p_it
p_italicized
p_ke
p_keyEquivalent
p_l
p_label
p_mn
p_mnemonic
p_opt
p_optionModifier
p_radialPosition
p_radioButton
p_rb
p_rp
p_sh
p_shiftModifier
p_sm
p_subMenu
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

toMenu()
Returns:Menu representing self if it is a submenu
Raises TypeError:
 if self i no submenu
translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.NamedUI

class mrv.maya.ui.base.NamedUI(*args, **kwargs)

Bases: unicode, mrv.maya.ui.base.BaseUI, mrv.interface.iDagItem, mrv.maya.ui.util.EventSenderUI, mrv.maya.ui.BaseUI

Implements a simple UI element having a name and most common methods one can apply to it. Derived classes should override these if they can deliver a faster implementation. If the ‘name’ keyword is supplied, an existing UI element will be wrapped

Events

As subclass of EventSenderUI, it can provide events that are automatically added by the metaclass as described by the _events_ attribute list. This allows any number of clients to register for one maya event. Derived classes may also use their own events which is useful if you create components

Register for an event like:

>>> uiinstance.e_eventlongname = yourFunction( sender, *args, **kwargs )
>>> *args and **kwargs are determined by maya
Note:although many access methods look quite ‘repeated’ as they are quite similar except for a changing flag, they are hand-written to provide proper docs for them
classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.PopupMenu

class mrv.maya.ui.base.PopupMenu(*args, **kwargs)

Bases: mrv.maya.ui.NamedUI, mrv.maya.ui.base.ContainerMenuBase

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
add(child, set_self_active=False, revert_to_previous_parent=True)

Add the given child UI item to our list of children

Parameters:
  • set_self_active – if True, we explicitly make ourselves the current parent for newly created UI elements
  • revert_to_previous_parent – if True, the previous parent will be restored once we are done, if False we keep the parent - only effective if set_self_active is True
Returns:

the newly added child, allowing contructs like button = layout.addChild( Button( ) )

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

childByName(childname)
Returns:stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” )
Raises KeyError:
 if a child with that name does not exist
children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
clearChildren()
Clear our child arrays to quickly forget about our children
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
deleteChild(child)
Delete the given child ui physically so it will not be shown anymore after removing it from our list of children
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

listChildren(predicate=<function <lambda> at 0x6063578>)
Returns:list with our child instances
Parameter:predicate – function returning True for each child to include in result, allows to easily filter children
Note:it’s a copy, so you can freely act on the list
Note:children will be returned in the order in which they have been added
classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_alt
p_altModifier
p_aob
p_b
p_button
p_ctl
p_ctrlModifier
p_dai
p_deleteAllItems
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_ia
p_itemArray
p_markingMenu
p_mm
p_ni
p_numberOfItems
p_sh
p_shiftModifier
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

removeChild(child)

Remove the given child from our list

Returns:True if the child was found and has been removed, False otherwise
replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
setActive()

Make ourselves the active menu

Returns:self
setParentActive()

Make our parent the active menu layout

Returns:self
Note:only useful self is a submenu
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.SizedControl

class mrv.maya.ui.base.SizedControl(*args, **kwargs)

Bases: mrv.maya.ui.NamedUI

Base Class for all controls having a dimension

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
annotation()
:return : the annotation string
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
dimension()
Returns:(x,y) tuple of x and y dimensions of the UI element
e_dgc
Event suitable to deal with user interface callback
e_dpc
Event suitable to deal with user interface callback
e_dragCallback
Event suitable to deal with user interface callback
e_dropCallback
Event suitable to deal with user interface callback
e_vcc
Event suitable to deal with user interface callback
e_visibleChangeCommand
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_backgroundColor
p_bgc
p_defineTemplate
p_dimension
Returns:(x,y) tuple of x and y dimensions of the UI element
p_doctTag
p_dt
p_dtg
p_ebg
p_en
p_enable
p_enableBackground
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_npm
p_numberOfPopupMenus
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_useTemplate
p_ut
p_vis
p_visible
p_w
p_width
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

popupMenuArray()
Returns:popup menus attached to this control
replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
setAnnotation(ann)
Set the UI element’s annotation :note: not all named UI elements can have their annotation set
setDimension(dimension)
Set the UI elements dimension :param dimension: (x,y) : tuple holding desired x and y dimension
setFocus()
Set the global keyboard focus to this control
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.SubMenuItem

class mrv.maya.ui.base.SubMenuItem(*args, **kwargs)

Bases: mrv.maya.ui.MenuItem

A menu which is always a submenu. This type greatly facilitates subclasses to enforce being a MenuItem which is a submenu as no additional code is required

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
e_c
Event suitable to deal with user interface callback
e_command
Event suitable to deal with user interface callback
e_ddc
Event suitable to deal with user interface callback
e_dmc
Event suitable to deal with user interface callback
e_dragDoubleClickCommand
Event suitable to deal with user interface callback
e_dragMenuCommand
Event suitable to deal with user interface callback
e_pmc
Event suitable to deal with user interface callback
e_pmo
Event suitable to deal with user interface callback
e_postMenuCommand
Event suitable to deal with user interface callback
e_postMenuCommandOnce
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

p_allowOptionBoxes
p_ann
p_annotation
p_aob
p_bld
p_boldFont
p_cb
p_checkBox
p_cl
p_collection
p_controlModifier
p_ctl
p_d
p_da
p_data
p_divider
p_docTag
p_dt
p_ec
p_echoCommand
p_ecr
p_en
p_enable
p_enableCommandRepeat
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_i
p_icb
p_image
p_imageOverlayLabel
p_iob
p_iol
p_irb
p_isCheckBox
p_isOptionBox
p_isRadioButton
p_it
p_italicized
p_ke
p_keyEquivalent
p_l
p_label
p_mn
p_mnemonic
p_opt
p_optionModifier
p_radialPosition
p_radioButton
p_rb
p_rp
p_sh
p_shiftModifier
p_sm
p_subMenu
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
shortName()
Returns:shortname of the ui ( name without pipes )
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

toMenu()
Returns:Menu representing self if it is a submenu
Raises TypeError:
 if self i no submenu
translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base.Window

class mrv.maya.ui.base.Window(*args, **kwargs)

Bases: mrv.maya.ui.SizedControl, mrv.maya.ui.util.UIContainerBase

Simple Window Wrapper

Note:Window does not support some of the properties provided by sizedControl
classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
add(child, set_self_active=False, revert_to_previous_parent=True)

Add the given child UI item to our list of children

Parameters:
  • set_self_active – if True, we explicitly make ourselves the current parent for newly created UI elements
  • revert_to_previous_parent – if True, the previous parent will be restored once we are done, if False we keep the parent - only effective if set_self_active is True
Returns:

the newly added child, allowing contructs like button = layout.addChild( Button( ) )

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
annotation()
:return : the annotation string
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
capitalize

S.capitalize() -> unicode

Return a capitalized version of S, i.e. make the first character have upper case.

center

S.center(width[, fillchar]) -> unicode

Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)

childByName(childname)
Returns:stored child instance, specified either as short name ( without pipes ) or fully qualified ( i.e. mychild or parent|subparent|mychild” )
Raises KeyError:
 if a child with that name does not exist
children(**kwargs)
Returns:all intermediate child instances
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
childrenDeep(**kwargs)
Returns:all child instances recursively
Note:the order of children is lexically ordered at this time
Note:this implementation is slow and should be overridden by more specialized subclasses
clearAllEvents()

Remove all event receivers for all events registered in this instance.

Note:This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance
clearChildren()
Clear our child arrays to quickly forget about our children
count

S.count(sub[, start[, end]]) -> int

Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.

decode

S.decode([encoding[,errors]]) -> string or unicode

Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.

delete()
Delete this UI - the wrapper instance must not be used after this call
deleteChild(child)
Delete the given child ui physically so it will not be shown anymore after removing it from our list of children
dimension()
Returns:(x,y) tuple of x and y dimensions of the UI element
e_dgc
Event suitable to deal with user interface callback
e_dpc
Event suitable to deal with user interface callback
e_dragCallback
Event suitable to deal with user interface callback
e_dropCallback
Event suitable to deal with user interface callback
e_minimizeCommand
Event suitable to deal with user interface callback
e_mnc
Event suitable to deal with user interface callback
e_rc
Event suitable to deal with user interface callback
e_restoreCommand
Event suitable to deal with user interface callback
e_vcc
Event suitable to deal with user interface callback
e_visibleChangeCommand
Event suitable to deal with user interface callback
encode

S.encode([encoding[,errors]]) -> string or unicode

Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.

endswith

S.endswith(suffix[, start[, end]]) -> bool

Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try.

exists()
Returns:True if this instance still exists in maya
expandtabs

S.expandtabs([tabsize]) -> unicode

Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.

find

S.find(sub [,start [,end]]) -> int

Return the lowest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

format
S.format(*args, **kwargs) -> unicode
fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
index

S.index(sub [,start [,end]]) -> int

Like S.find() but raise ValueError when the substring is not found.

isFrontWindow()
Returns:True if we are the front window
isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
isalnum

S.isalnum() -> bool

Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.

isalpha

S.isalpha() -> bool

Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.

isdecimal

S.isdecimal() -> bool

Return True if there are only decimal characters in S, False otherwise.

isdigit

S.isdigit() -> bool

Return True if all characters in S are digits and there is at least one character in S, False otherwise.

islower

S.islower() -> bool

Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.

isnumeric

S.isnumeric() -> bool

Return True if there are only numeric characters in S, False otherwise.

isspace

S.isspace() -> bool

Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.

istitle

S.istitle() -> bool

Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

isupper

S.isupper() -> bool

Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.

iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
join

S.join(iterable) -> unicode

Return a string which is the concatenation of the strings in the iterable. The separator between elements is S.

listChildren(predicate=<function <lambda> at 0x6063578>)
Returns:list with our child instances
Parameter:predicate – function returning True for each child to include in result, allows to easily filter children
Note:it’s a copy, so you can freely act on the list
Note:children will be returned in the order in which they have been added
classmethod listEventNames()
Returns:list of event ids that exist on our class
ljust

S.ljust(width[, fillchar]) -> int

Return S left-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

menuArray()
Returns:Menu instances attached to this window
numberOfMenus()
Returns:number of menus in the menu array
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_backgroundColor
p_bgc
p_defineTemplate
p_dimension
Returns:(x,y) tuple of x and y dimensions of the UI element
p_docTag
p_doctTag
p_dt
p_dtg
p_ebg
p_en
p_enable
p_enableBackground
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_fpn
p_fullPathName
p_h
p_height
p_i
p_iconName
p_iconify
p_io
p_isObscured
p_leftEdge
p_m
p_mainWindow
p_manage
p_maximizeButton
p_mbv
p_menuBarVisible
p_minimizeButton
p_mnb
p_mw
p_mxb
p_nm
Returns:number of menus in the menu array
p_npm
p_numberOfMenus
Returns:number of menus in the menu array
p_numberOfPopupMenus
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_resizeToFitChildren
p_rtf
p_s
p_sizeable
p_t
p_tb
p_tbm
p_te
p_title
p_titleBar
p_titleBarMenu
p_tl
p_tlb
p_tlc
p_toolbox
p_topEdge
p_topLeftCorner
p_useTemplate
p_ut
p_vis
p_visible
p_w
p_wh
p_width
p_widthHeightin
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

S.partition(sep) -> (head, sep, tail)

Search for the separator sep in S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return S and two empty strings.

popupMenuArray()
Returns:popup menus attached to this control
removeChild(child)

Remove the given child from our list

Returns:True if the child was found and has been removed, False otherwise
replace

S.replace (old, new[, count]) -> unicode

Return a copy of S with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

rfind

S.rfind(sub [,start [,end]]) -> int

Return the highest index in S where substring sub is found, such that sub is contained within s[start:end]. Optional arguments start and end are interpreted as in slice notation.

Return -1 on failure.

rindex

S.rindex(sub [,start [,end]]) -> int

Like S.rfind() but raise ValueError when the substring is not found.

rjust

S.rjust(width[, fillchar]) -> unicode

Return S right-justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).

root()
Returns:the root of the DAG - it has no further parents
rpartition

S.rpartition(sep) -> (head, sep, tail)

Search for the separator sep in S, starting at the end of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S.

rsplit

S.rsplit([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string, starting at the end of the string and working to the front. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> unicode

Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
setActive()

Set this container active, such that newly created items will be children of this layout

Returns:self
Note:always use the addChild function to add the children !
setAnnotation(ann)
Set the UI element’s annotation :note: not all named UI elements can have their annotation set
setDimension(dimension)
Set the UI elements dimension :param dimension: (x,y) : tuple holding desired x and y dimension
setFocus()
Set the global keyboard focus to this control
setMenuIndex(menu, index)

Set the menu index of the specified menu

Parameters:
  • menu – name of child menu to set
  • index – new index at which the menu should appear
shortName()
Returns:shortname of the ui ( name without pipes )
show()
Show Window :return: self
split

S.split([sep [,maxsplit]]) -> list of strings

Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator and empty strings are removed from the result.

splitlines

S.splitlines([keepends]) -> list of strings

Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true.

startswith

S.startswith(prefix[, start[, end]]) -> bool

Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try.

strip

S.strip([chars]) -> unicode

Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
swapcase

S.swapcase() -> unicode

Return a copy of S with uppercase characters converted to lowercase and vice versa.

title

S.title() -> unicode

Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.

translate

S.translate(table) -> unicode

Return a copy of the string S, where all characters have been mapped through the given translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, Unicode strings or None. Unmapped characters are left untouched. Characters mapped to None are deleted.

type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
uiDeleted()

If overridden in subclass, it will be called once the UI gets deleted within maya ( i.e. the user closed the window )eee The base implementation assures that all event-receivers that are bound to your events will be freed, allowing them to possibly be destroyed as well.

Use this callback to register yourself from all your event senders, then call the base class method.

Note:This is not related to the __del__ method of your object. Its worth noting that your instance will be strongly bound to a maya event, hence your instance will exist as long as your user interface element exists within maya.
upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

zfill

S.zfill(width) -> unicode

Pad a numeric string S with zeros on the left, to fill a field of the specified width. The string S is never truncated.

Epydoc: mrv.maya.ui.base

class mrv.maya.ui.base.iDagItem

Bases: mrv.interface.Interface

Describes interface for a DAG item. Its used to unify interfaces allowing to access objects in a dag like graph Of the underlying object has a string representation, the defatult implementation will work natively. Otherwise the getParent and getChildren methods should be overwritten

Note:a few methods of this class are abstract and need to be overwritten
Note:this class expects the attribute ‘_sep’ to exist containing the separator at which your object should be split ( for default implementations ). This works as the passed in pointer will belong to derived classes that can define that attribute on instance or on class level
classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

Parameters:
  • item – item to add separator to
  • sep – the separator
basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
children(predicate=<function <lambda> at 0x7f41dd7c2ed8>)
Returns:list of intermediate children of path, [ child1 , child2 ]
Parameter:predicate – return True to include x in result
Note:the child objects returned are supposed to be valid paths, not just relative paths
childrenDeep(order=1, predicate=<function <lambda> at 0x7f41dd7c5050>)
Returns:

list of all children of path, [ child1 , child2 ]

Parameters:
  • order – order enumeration
  • predicate – returns true if x may be returned
Note:

the child objects returned are supposed to be valid paths, not just relative paths

fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
parent()
Returns:parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
root()
Returns:the root of the DAG - it has no further parents
supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work

Exceptions

Epydoc: mrv.maya.ui.base

class mrv.maya.ui.base.MRVError(*args, **kwargs)

Bases: exceptions.Exception

Base Class for all exceptions that the mrv framework throws

args
message

Table Of Contents

Previous topic

mrv.maya.ui.editor

Next topic

mrv.maya.ui.typ

This Page