mrv.maya.ui.browse.control

Epydoc: mrv.maya.ui.browse.control

Contains ui modules to build a finder-like browser for items of any kind

Functions

mrv.maya.ui.browse.control.concat_url(root, path)
mrv.maya.ui.browse.control.logException(func)
Decorator which shows short exception information in a popup and a full stack trace to stdout. Finally the exception will be reraised

Classes

Epydoc: mrv.maya.ui.browse.control.BookmarkControl

class mrv.maya.ui.browse.control.BookmarkControl(*args, **kwargs)

Bases: mrv.maya.ui.StackControlBase

Control allowing to display a set of custom bookmarks, which are stored in optionVars

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
addItem(bookmark)

Add a new bookmark :param bookmark: tuple of root,relative_path or a single absolute path. In the

latter case, the root will be the natural root of the absolute path
addItems(items)
Add multiple items to the end of the list :return: self
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’
bookmark_changed

User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.

Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().

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_dcc
Event suitable to deal with user interface callback
e_deleteKeyCommand
Event suitable to deal with user interface callback
e_dgc
Event suitable to deal with user interface callback
e_dkc
Event suitable to deal with user interface callback
e_doubleClickCommand
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_sc
Event suitable to deal with user interface callback
e_selectCommand
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
formatItem(root_path_tuple)
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.

items()
Returns:list of currently available items
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_a
p_aas
p_ai
p_allItems
p_allowAutomaticSelection
p_allowMultiSelection
p_ams
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_ap
p_append
p_appendPosition
p_backgroundColor
p_bgc
p_da
p_defineTemplate
p_deselectAll
p_deselectIndexedItem
p_deselectItem
p_di
p_dii
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_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_ni
p_npm
p_nr
p_nsi
p_numberOfItems
p_numberOfPopupMenus
p_numberOfRows
p_numberOfSelectedItems
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_raremoveItem
p_removeAll
p_removeIndexedItem
p_ri
p_rii
p_selectIndexedItem
p_selectItem
p_shi
p_showIndexedItem
p_si
p_sii
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
removeItem(bookmark)

Remove the given bookmark from the list of bookmarks :param bookmark: full path to the bookmark to remove. Its not an error

if it doesn’t exist in the first place
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

selectUnformattedItem(index_or_item)

Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to

select, or the item’s id
Raises ValueError:
 if the item does not exist
selectedIndex()
Returns:First selected index - the index is 1-based, or -1 if there

is nothing selected :note: even if multiple selections are possible

selectedIndices()
Returns:tuple of all selected 1-based indices, or an empty tuple if there

is nothing selected

selectedItem()
Returns:the first selected item, or None if nothing is selected
selectedItems()
Returns:list of all selected items as strings, or an empty list if nothing

is selected

selectedUnformattedItem()
Returns:unformatted selected item or None
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
setItems(bookmarks)

Set this control to a list of bookmarks :param bookmarks: list of either tuples of (root, path) pairs or absolute paths

whose root will be chosen automatically
setSelectedItem(item)

Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following

maya’s behaviour
Returns:self
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.browse.control.FileFilterControl

class mrv.maya.ui.browse.control.FileFilterControl(*args, **kwargs)

Bases: mrv.maya.ui.FormLayout, mrv.maya.ui.browse.interface.iFinderFilter

Control providing a filter for finder urls which are file paths

class FormConstraint

Bases: object

defines the way a child is constrained, possibly to other children

Todo:proper constraint system, but could be complicated to make it really easy to use
classmethod FileFilterControl.activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
FileFilterControl.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 FileFilterControl.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
FileFilterControl.annotation()
:return : the annotation string
FileFilterControl.basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
FileFilterControl.capitalize

S.capitalize() -> unicode

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

FileFilterControl.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)

FileFilterControl.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
FileFilterControl.children()
Returns:children of this layout
FileFilterControl.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
FileFilterControl.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
FileFilterControl.clearChildren()
Clear our child arrays to quickly forget about our children
FileFilterControl.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.

FileFilterControl.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.

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

FileFilterControl.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.

FileFilterControl.exists()
Returns:True if this instance still exists in maya
FileFilterControl.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.

FileFilterControl.filtered(finder, element_index, base_url, items)
Returns:

list of items which may be shown in the element at element_index

Parameters:
  • finder – finder instance issueing the call
  • element_index – index of the element which is to be filled with items
  • base_url – url at which the given items exist
  • items – list of relative item ids which are to be shown in the finder element
FileFilterControl.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.

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

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

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

FileFilterControl.isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
FileFilterControl.isRoot()
Returns:True if this path is the root of the DAG
FileFilterControl.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
FileFilterControl.isalnum

S.isalnum() -> bool

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

FileFilterControl.isalpha

S.isalpha() -> bool

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

FileFilterControl.isdecimal

S.isdecimal() -> bool

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

FileFilterControl.isdigit

S.isdigit() -> bool

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

FileFilterControl.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.

FileFilterControl.isnumeric

S.isnumeric() -> bool

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

FileFilterControl.isspace

S.isspace() -> bool

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

FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.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
FileFilterControl.join

S.join(iterable) -> unicode

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

FileFilterControl.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 FileFilterControl.listEventNames()
Returns:list of event ids that exist on our class
FileFilterControl.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).

FileFilterControl.lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

FileFilterControl.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

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

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

Remove the given child from our list

Returns:True if the child was found and has been removed, False otherwise
FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.rindex

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

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

FileFilterControl.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).

FileFilterControl.root()
Returns:the root of the DAG - it has no further parents
FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.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

FileFilterControl.sender()
Returns:instance which sent the event you are currently processing
Raises ValueError:
 if no event is currently in progress
FileFilterControl.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 !
FileFilterControl.setAnnotation(ann)
Set the UI element’s annotation :note: not all named UI elements can have their annotation set
FileFilterControl.setDimension(dimension)
Set the UI elements dimension :param dimension: (x,y) : tuple holding desired x and y dimension
FileFilterControl.setFocus()
Set the global keyboard focus to this control
FileFilterControl.setParentActive()

Set the parent ( layout ) of this layout active - newly created items will be children of the parent layout

Returns:self
Note:can safely be called several times
FileFilterControl.setup(**kwargs)

Apply the given setup to the form layout, specified using kwargs

Parameter:kwargs – arguments you would set use to setup the form layout
FileFilterControl.shortName()
Returns:shortname of the ui ( name without pipes )
FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.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

FileFilterControl.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
FileFilterControl.swapcase

S.swapcase() -> unicode

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

FileFilterControl.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.

FileFilterControl.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.

FileFilterControl.type()
Returns:the python class able to create this class
Note:The return value is NOT the type string, but a class
FileFilterControl.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.
FileFilterControl.upper

S.upper() -> unicode

Return a copy of S converted to uppercase.

FileFilterControl.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.browse.control.FilePathControl

class mrv.maya.ui.browse.control.FilePathControl(*args, **kwargs)

Bases: mrv.maya.ui.TextField

Control displaying a relative url. If it is ediable, a filepath may be entered and queried

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_cc
Event suitable to deal with user interface callback
e_changeCommand
Event suitable to deal with user interface callback
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_ec
Event suitable to deal with user interface callback
e_enterCommand
Event suitable to deal with user interface callback
e_receiveFocusCommand
Event suitable to deal with user interface callback
e_rfc
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
editable()
Returns:True if the control can be edited by the user
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_ed
p_editable
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_fileName
p_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_insertPositionfi
p_insertText
p_io
p_ip
p_isObscured
p_it
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_text
p_tx
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.

path()
Returns:string representing the currently active path
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
setEditable(state)
setFocus()
Set the global keyboard focus to this control
setPath(path)
Set the control to display the given path
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.browse.control.FilePathControlEditable

class mrv.maya.ui.browse.control.FilePathControlEditable(*args, **kwargs)

Bases: mrv.maya.ui.FilePathControl

A filepath control which tries to maintain changes applied by the user. It assumes that the system will use setPath to adjust the path, and checks for changes in the path string which will be reapplied to the newly set path if possible

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_cc
Event suitable to deal with user interface callback
e_changeCommand
Event suitable to deal with user interface callback
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_ec
Event suitable to deal with user interface callback
e_enterCommand
Event suitable to deal with user interface callback
e_receiveFocusCommand
Event suitable to deal with user interface callback
e_rfc
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
editable()
Returns:True if the control can be edited by the user
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_ed
p_editable
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_fileName
p_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_insertPositionfi
p_insertText
p_io
p_ip
p_isObscured
p_it
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_text
p_tx
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.

path()
Returns:string representing the currently active path
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
setEditable(state)
setFocus()
Set the global keyboard focus to this control
setPath(path)
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.browse.control.FileProvider

class mrv.maya.ui.browse.control.FileProvider(root)

Bases: mrv.maya.ui.browse.interface.iFinderProvider

Implements a provider for a file system

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

formatItem(url_base, url_index, url_item)
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:string representing the file root
storeUrlItem(url_index, url_item)

Stores and associates a given url_index with a url_item. Makes the stored item queryable by the storedUrlItemByIndex method :param url_index: index from 0 to n, where 0 corresponds to the first item

in the url
Parameter:url_item – the string item to store at the given index
storedUrlItemByIndex(url_index)
Returns:string item previously stored at the given index, or None

if there is no information available

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
urlItems(url)
Return directory items alphabetically, directories first

Epydoc: mrv.maya.ui.browse.control.FileRootSelectorControl

class mrv.maya.ui.browse.control.FileRootSelectorControl(*args, **kwargs)

Bases: mrv.maya.ui.TextScrollList

Keeps a list of possible roots which can be chosen. Each root is represented by a Provider instance.

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
addItem(provider)
Add the given provider to our list of provides
addItems(items)
Add multiple items to the end of the list :return: self
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_dcc
Event suitable to deal with user interface callback
e_deleteKeyCommand
Event suitable to deal with user interface callback
e_dgc
Event suitable to deal with user interface callback
e_dkc
Event suitable to deal with user interface callback
e_doubleClickCommand
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_sc
Event suitable to deal with user interface callback
e_selectCommand
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.

items()
Returns:list of currently available items
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_a
p_aas
p_ai
p_allItems
p_allowAutomaticSelection
p_allowMultiSelection
p_ams
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_ap
p_append
p_appendPosition
p_backgroundColor
p_bgc
p_da
p_defineTemplate
p_deselectAll
p_deselectIndexedItem
p_deselectItem
p_di
p_dii
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_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_ni
p_npm
p_nr
p_nsi
p_numberOfItems
p_numberOfPopupMenus
p_numberOfRows
p_numberOfSelectedItems
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_raremoveItem
p_removeAll
p_removeIndexedItem
p_ri
p_rii
p_selectIndexedItem
p_selectItem
p_shi
p_showIndexedItem
p_si
p_sii
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
providers()
Returns:list of currently used providers
removeItem(provider)

Remove the given provider from the list :param provider: FileProvider instance or root from which the provider

can be determined
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
root_changed

User interface signal which keeps assigned functions as strong reference to assure we can always call it. This implies that we may leave many dangling objects unless we are being properly cleaned up on deletion.

Calls generated from this event will not put the sender as first argument, but you may retrieve it using self.sender().

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

selectedIndex()
Returns:First selected index - the index is 1-based, or -1 if there

is nothing selected :note: even if multiple selections are possible

selectedIndices()
Returns:tuple of all selected 1-based indices, or an empty tuple if there

is nothing selected

selectedItem()
Returns:the first selected item, or None if nothing is selected
selectedItems()
Returns:list of all selected items as strings, or an empty list if nothing

is selected

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
setItems(providers)
Set the given providers to be used by this instance :param providers: list of FileProvider instances
setSelectedItem(item)
Fires a root_changed event if the item actually caused a selection change
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.browse.control.FileStack

class mrv.maya.ui.browse.control.FileStack(*args, **kwargs)

Bases: mrv.maya.ui.StackControlBase

Implements a stack which shows only the base names of files

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
addItem(item)
addItems(items)
Add multiple items to the end of the list :return: self
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_dcc
Event suitable to deal with user interface callback
e_deleteKeyCommand
Event suitable to deal with user interface callback
e_dgc
Event suitable to deal with user interface callback
e_dkc
Event suitable to deal with user interface callback
e_doubleClickCommand
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_sc
Event suitable to deal with user interface callback
e_selectCommand
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
formatItem(item)
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.

items()
Returns:list of currently available items
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_a
p_aas
p_ai
p_allItems
p_allowAutomaticSelection
p_allowMultiSelection
p_ams
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_ap
p_append
p_appendPosition
p_backgroundColor
p_bgc
p_da
p_defineTemplate
p_deselectAll
p_deselectIndexedItem
p_deselectItem
p_di
p_dii
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_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_ni
p_npm
p_nr
p_nsi
p_numberOfItems
p_numberOfPopupMenus
p_numberOfRows
p_numberOfSelectedItems
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_raremoveItem
p_removeAll
p_removeIndexedItem
p_ri
p_rii
p_selectIndexedItem
p_selectItem
p_shi
p_showIndexedItem
p_si
p_sii
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
removeItem(item)
Remove the given formatted item from the list, as well as the corresponding unformtted item. Its not an error if the item does not exist
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

selectUnformattedItem(index_or_item)

Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to

select, or the item’s id
Raises ValueError:
 if the item does not exist
selectedIndex()
Returns:First selected index - the index is 1-based, or -1 if there

is nothing selected :note: even if multiple selections are possible

selectedIndices()
Returns:tuple of all selected 1-based indices, or an empty tuple if there

is nothing selected

selectedItem()
Returns:the first selected item, or None if nothing is selected
selectedItems()
Returns:list of all selected items as strings, or an empty list if nothing

is selected

selectedUnformattedItem()
Returns:unformatted selected item or None
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
setItems(items)

Set the given items to be shown. :param items: iterable of items

if empty, the control will be empty after this call.
Returns:self
setSelectedItem(item)

Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following

maya’s behaviour
Returns:self
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.browse.control.FinderElement

class mrv.maya.ui.browse.control.FinderElement(*args, **kwargs)

Bases: mrv.maya.ui.StackControlBase

Element with special abilities to suite the finder better. This involves keeping a list of unformatted items which can be used as unique item identifiers.

Set the items to a list of unique identifiers which represent the possibly different items actually present in the list.

classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
addItem(item)
addItems(items)
Add multiple items to the end of the list :return: self
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_dcc
Event suitable to deal with user interface callback
e_deleteKeyCommand
Event suitable to deal with user interface callback
e_dgc
Event suitable to deal with user interface callback
e_dkc
Event suitable to deal with user interface callback
e_doubleClickCommand
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_sc
Event suitable to deal with user interface callback
e_selectCommand
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
formatItem(item)
Returns:formatted version of item
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.

items()
Returns:list of currently available items
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_a
p_aas
p_ai
p_allItems
p_allowAutomaticSelection
p_allowMultiSelection
p_ams
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_ap
p_append
p_appendPosition
p_backgroundColor
p_bgc
p_da
p_defineTemplate
p_deselectAll
p_deselectIndexedItem
p_deselectItem
p_di
p_dii
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_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_ni
p_npm
p_nr
p_nsi
p_numberOfItems
p_numberOfPopupMenus
p_numberOfRows
p_numberOfSelectedItems
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_raremoveItem
p_removeAll
p_removeIndexedItem
p_ri
p_rii
p_selectIndexedItem
p_selectItem
p_shi
p_showIndexedItem
p_si
p_sii
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
removeItem(item)
Remove the given formatted item from the list, as well as the corresponding unformtted item. Its not an error if the item does not exist
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

selectUnformattedItem(index_or_item)

Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to

select, or the item’s id
Raises ValueError:
 if the item does not exist
selectedIndex()
Returns:First selected index - the index is 1-based, or -1 if there

is nothing selected :note: even if multiple selections are possible

selectedIndices()
Returns:tuple of all selected 1-based indices, or an empty tuple if there

is nothing selected

selectedItem()
Returns:the first selected item, or None if nothing is selected
selectedItems()
Returns:list of all selected items as strings, or an empty list if nothing

is selected

selectedUnformattedItem()
Returns:unformatted selected item or None
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
setItems(items)

Set the given items to be shown. :param items: iterable of items

if empty, the control will be empty after this call.
Returns:self
setSelectedItem(item)

Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following

maya’s behaviour
Returns:self
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.browse.control

class mrv.maya.ui.browse.control.OptionVarDict

Bases: mrv.util.Singleton

A singleton dictionary-like class for accessing and modifying optionVars.

Note:Idea and base Implementation from PyMel, modified to adapt to mrv
class OptionVarList

Bases: tuple

appendVar(val)
values appended to the OptionVarList with this method will be added to the Maya optionVar at the key denoted by self.key.
count
T.count(value) -> integer – return number of occurrences of value
index
T.index(value, [start, [stop]]) -> integer – return first index of value. Raises ValueError if the value is not present.
OptionVarDict.get(key, default=None)
OptionVarDict.has_key(key)
OptionVarDict.iteritems()
Returns:iterators to tuple of key,value pairs
OptionVarDict.iterkeys()
Returns:iterator to option var names
OptionVarDict.itervalues()
Returns:iterator to optionvar values
OptionVarDict.keys()
OptionVarDict.pop(key)

Epydoc: mrv.maya.ui.browse.control

class mrv.maya.ui.browse.control.Path

Bases: str, mrv.interface.iDagItem

Represents a filesystem path.

For documentation on individual methods, consult their counterparts in os.path.

abspath()
access(mode)

Return true if current user has access to this path.

mode - One of the constants os.F_OK, os.R_OK, os.W_OK, os.X_OK

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
atime()
basename(p)
Returns the final component of a pathname
bytes()
Open this file, read all bytes, return them as a string.
capitalize

S.capitalize() -> string

Return a copy of the string S with only its first character capitalized.

center

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

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

children(predicate=<function <lambda> at 0x7f41dd7c72a8>, pattern=None)
Returns:

child paths as retrieved by queryiing the file system.

Note:

files cannot have children, and willl return an empty array accordingly

Parameters:
  • predicate – return p if predicate( p ) returns True
  • pattern – list only elements that match the given simple pattern i.e. .
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

chmod(mode)

Change file mode

Returns:self
chown(uid, gid)

Change file ownership

Returns:self
chroot()

Change the root directory path

Returns:self
containsvars()
Returns:True if this path contains environment variables
convert_separators()
Returns:Version of self with all separators set to be ‘sep’. The difference

to normpath is that it does not cut trailing separators

copy(dest)

Copy data and source bits to dest

Returns:Path to dest
copy2(dest)

Shutil.copy2 self to dest

Returns:Path to dest
copyfile(dest)

Copy self to dest

Returns:Path to dest
copymode(dest)

Copy our mode to dest

Returns:Path to dest
copystat(dest)

Copy our stats to dest

Returns:Path to dest
copytree(dest, **kwargs)

Deep copy this file or directory to destination

Parameter:kwargs – passed to shutil.copytree
Returns:Path to dest
count

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

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

ctime()
decode

S.decode([encoding[,errors]]) -> object

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 registered with codecs.register_error that is able to handle UnicodeDecodeErrors.

digest(hashobject)

Calculate the hash for this file using the given hashobject. It must support the ‘update’ and ‘digest’ methods.

Note:This reads through the entire file.
dirname()
dirs(pattern=None)

D.dirs() -> List of this directory’s subdirectories.

The elements of the list are path objects. This does not walk recursively into subdirectories (but see path.walkdirs).

With the optional pattern argument, this only lists directories whose names match the given pattern. For example, d.dirs(“build-*”).

drive()
The drive specifier, for example ‘C:’. This is always empty on systems that don’t use drive specifiers.
encode

S.encode([encoding[,errors]]) -> object

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 is able to 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()
expand()

Clean up a filename by calling expandvars() and expanduser()

This is commonly everything needed to clean up a filename read from a configuration file, for example.

If you are not interested in trailing slashes, you should call normpath() on the resulting Path as well.

expand_or_raise()
Returns:Copy of self with all variables expanded ( using expand )

non-recursively !

Raises ValueError:
 If we could not expand all environment variables as their values where missing in the environment
expandtabs

S.expandtabs([tabsize]) -> string

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.

expanduser()
expandvars()
expandvars_deep()
Expands all environment variables recursively
expandvars_deep_or_raise()
Expands all environment variables recursively, and raises ValueError if the path still contains variables afterwards
ext()
The file extension, for example ‘.py’.
files(pattern=None)

D.files() -> List of the files in this directory.

The elements of the list are path objects. This does not walk into subdirectories (see path.walkfiles).

With the optional pattern argument, this only lists files whose names match the given pattern. For example, d.files(“*.pyc”).

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.

fnmatch(pattern)

Return True if self.basename() matches the given pattern.

pattern - A filename pattern with wildcards,
for example “*.py”.
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
classmethod getcwd()
Returns:the current working directory as a path object.
glob(pattern)

Return a list of path objects that match the pattern.

pattern - a path relative to this directory, with wildcards.

For example, path(‘/users’).glob(‘/bin/‘) returns a list of all the files users have in their bin directories.

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
isWritable()
Returns:true if the file can be written to
isabs(s)
Test whether a path is absolute
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.

isdigit

S.isdigit() -> bool

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

isdir()
isfile()
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.

ismount()
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. uppercase 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) -> string

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

joinpath(*args)
Join two or more path components, adding a separator character (os.sep) if needed. Returns a new path object.
lexists()
lines(encoding=None, errors='strict', retain=True)

Open this file, read all lines, return them in a list.

Optional arguments:
  • encoding: The Unicode encoding (or character set) of

    the file. The default is None, meaning the content of the file is read as 8-bit characters and returned as a list of (non-Unicode) str objects.

  • errors: How to handle Unicode errors; see help(str.decode)

    for the options. Default is ‘strict’

  • retain: If true, retain newline characters; but all newline

    character combinations (“r”, “n”, “rn”) are translated to “n”. If false, newline characters are stripped off. Default is True.

This uses “U” mode in Python 2.3 and later.

Create a hard link at ‘newpath’, pointing to this file.

Returns:Path to newpath
listdir(pattern=None)

return list of items in this directory.

Use D.files() or D.dirs() instead if you want a listing of just files or just subdirectories.

The elements of the list are path objects.

With the optional ‘pattern’ argument, this only lists items whose names match the given pattern.

ljust

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

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

lower

S.lower() -> string

Return a copy of the string S converted to lowercase.

lstat()
Like path.stat(), but do not follow symbolic links.
lstrip

S.lstrip([chars]) -> string or 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 unicode, S will be converted to unicode before stripping

makedirs(mode=511)

Smarter makedir, see os.makedirs

Returns:self
mkdir(mode=511)

Make this directory, fail if it already exists

Returns:self
move(dest)

Move self to dest

Returns:Path to dest
mtime()
namebase()

The same as path.basename(), but with one file extension stripped off.

For example, path(‘/home/guido/python.tar.gz’).name == ‘python.tar.gz’, but path(‘/home/guido/python.tar.gz’).namebase == ‘python.tar’

normcase()
normpath()
open(*args, **kwargs)
Open this file. Return a file object.
owner()

Return the name of the owner of this file or directory.

This follows symbolic links.

On Windows, this returns a name of the form ur’DOMAINUser Name’. On Windows, a group can own a file or directory.

parent()
Returns:the parent directory of this Path or None if this is the root
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.

pathconf(name)
see os.pathconf

Return the path to which this symbolic link points.

The result may be an absolute or a relative path.

readlinkabs()

Return the path to which this symbolic link points.

The result is always an absolute path.

realpath()
relpath()
Return this path as a relative path, originating from the current working directory.
relpathfrom(dest)
Return a relative path from dest to self
relpathto(dest)

Return a relative path from self to dest.

If there is no relative path from self to dest, for example if they reside on different drives in Windows, then this returns dest.abspath().

remove()

Remove this file

Returns:self
removedirs()

see os.removedirs

Returns:self
rename(new)

os.rename

Returns:Path to new file
renames(new)

os.renames, super rename

Returns:Path to new file
replace

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

Return a copy of string 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]) -> string

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

rmdir()

Remove this empty directory

Returns:self
rmtree(**kwargs)

Remove self recursively

Parameter:kwargs – passed to shutil.rmtree
Returns:self
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 the string 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 or is None, any whitespace string is a separator.

rstrip

S.rstrip([chars]) -> string or 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 unicode, S will be converted to unicode before stripping

samefile(other)
classmethod set_separator(sep)
Set this type to support the given separator as general path separator
setutime(times)

Set the access and modified times of this file.

Returns:self
size()
split

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

Return a list of the words in the string 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.

splitall()

Return a list of the path components in this path.

The first item in the list will be a path. Its value will be either os.curdir, os.pardir, empty, or the root directory of this path (for example, ‘/’ or ‘C:’). The other items in the list will be strings.

path.path.joinpath(*result) can possibly yield the original path, depending on the input.

splitdrive()

p.splitdrive() -> Return (p.drive, <the rest of p>).

Split the drive specifier from this path. If there is no drive specifier, p.drive is empty, so the return value is simply (path(‘’), p). This is always the case on Unix.

splitext()

p.splitext() -> Return (p.stripext(), p.ext).

Split the filename extension from this path and return the two parts. Either part may be empty.

The extension is everything from ‘.’ to the end of the last path segment. This has the property that if (a, b) == p.splitext(), then a + b == p.

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.

splitpath()
p.splitpath() -> Return (p.parent(), p.basename()).
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.

stat()
Perform a stat() system call on this path.
statvfs()
Perform a statvfs() system call on this path.
strip

S.strip([chars]) -> string or 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 unicode, S will be converted to unicode before stripping

stripext()

p.stripext() -> Remove one file extension from the path.

For example, path(‘/home/guido/python.tar.gz’).stripext() returns path(‘/home/guido/python.tar’).

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() -> string

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

Create a symbolic link at ‘newlink’, pointing here.

Returns:Path to newlink
text(encoding=None, errors='strict')

Open this file, read it in, return the content as a string.

This uses “U” mode in Python 2.3 and later, so “rn” and “r” are automatically translated to ‘n’.

Optional arguments:
  • encoding - The Unicode encoding (or character set) of the file. If present, the content of the file is decoded and returned as a unicode object; otherwise it is returned as an 8-bit str.
  • errors - How to handle Unicode errors; see help(str.decode) for the options. Default is ‘strict’.
title

S.title() -> string

Return a titlecased version of S, i.e. words start with uppercase characters, all remaining cased characters have lowercase.

tolinuxpath()
Returns:A path using only slashes as path separator
tonative()

Convert the path separator to the type required by the current operating system - on windows / becomes and on linux becomes /

Returns:native version of self
touch(flags=65, mode=438)

Set the access/modified times of this file to the current time. Create the file if it does not exist.

Returns:self
translate

S.translate(table [,deletechars]) -> string

Return a copy of the string S, where all characters occurring in the optional argument deletechars are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256.

unlink this file

Returns:self
upper

S.upper() -> string

Return a copy of the string S converted to uppercase.

walk(pattern=None, errors='strict', predicate=<function <lambda> at 0x7f41dd7ca320>)

create iterator over files and subdirs, recursively.

The iterator yields path objects naming each child item of this directory and its descendants.

It performs a depth-first traversal of the directory tree. Each directory is returned just before all its children.

Parameters:
  • pattern – fnmatch compatible pattern or None
  • errors – controls behavior when an error occurs. The default is ‘strict’, which causes an exception. The other allowed values are ‘warn’, which reports the error via log.warn(), and ‘ignore’.
  • predicate – returns True for each Path p to be yielded by iterator
walkdirs(pattern=None, errors='strict', predicate=<function <lambda> at 0x7f41dd7ca410>)
D.walkdirs() -> iterator over subdirs, recursively. see walk for a parameter description
walkfiles(pattern=None, errors='strict', predicate=<function <lambda> at 0x7f41dd7ca500>)
D.walkfiles() -> iterator over files in D, recursively. see walk for a parameter description
write_bytes(bytes, append=False)

Open this file and write the given bytes to it.

Default behavior is to overwrite any existing file. Call p.write_bytes(bytes, append=True) to append instead. :return: self

write_lines(lines, encoding=None, errors='strict', linesep='n', append=False)

Write the given lines of text to this file.

By default this overwrites any existing file at this path.

This puts a platform-specific newline sequence on every line. See ‘linesep’ below.

lines - A list of strings.

encoding - A Unicode encoding to use. This applies only if
‘lines’ contains any Unicode strings.
errors - How to handle errors in Unicode encoding. This
also applies only to Unicode strings.
linesep - The desired line-ending. This line-ending is
applied to every line. If a line already has any standard line ending, that will be stripped off and this will be used instead. The default is os.linesep, which is platform-dependent (‘rn’ on Windows, ‘n’ on Unix, etc.) Specify None to write the lines as-is, like file.writelines().

Use the keyword argument append=True to append lines to the file. The default is to overwrite the file. Warning: When you use this with Unicode data, if the encoding of the existing data in the file is different from the encoding you specify with the encoding= parameter, the result is mixed-encoding data, which can really confuse someone trying to read the file later.

Returns:self
write_text(text, encoding=None, errors='strict', linesep='n', append=False)

Write the given text to this file.

The default behavior is to overwrite any existing file; to append instead, use the ‘append=True’ keyword argument.

There are two differences between path.write_text() and path.write_bytes(): newline handling and Unicode handling. See below.

Parameters:
  • text - str/unicode - The text to be written.

  • encoding - str - The Unicode encoding that will be used.

    This is ignored if ‘text’ isn’t a Unicode string.

  • errors - str - How to handle Unicode encoding errors.

    Default is ‘strict’. See help(unicode.encode) for the options. This is ignored if ‘text’ isn’t a Unicode string.

  • linesep - keyword argument - str/unicode - The sequence of

    characters to be used to mark end-of-line. The default is os.linesep. You can also specify None; this means to leave all newlines as they are in ‘text’.

  • append - keyword argument - bool - Specifies what to do if

    the file already exists (True: append to the end of it; False: overwrite it.) The default is False.

Newline handling:
  • write_text() converts all standard end-of-line sequences

    (“n”, “r”, and “rn”) to your platforms default end-of-line sequence (see os.linesep; on Windows, for example, the end-of-line marker is “rn”).

  • If you don’t like your platform’s default, you can override it

    using the “linesep=” keyword argument. If you specifically want write_text() to preserve the newlines as-is, use “linesep=None”.

  • This applies to Unicode text the same as to 8-bit text, except

    there are additional standard Unicode end-of-line sequences, check the code to see them.

  • (This is slightly different from when you open a file for

    writing with fopen(filename, “w”) in C or file(filename, “w”) in Python.)

Unicode:

If “text” isn’t Unicode, then apart from newline handling, the bytes are written verbatim to the file. The “encoding” and ‘errors’ arguments are not used and must be omitted.

If ‘text’ is Unicode, it is first converted to bytes using the specified ‘encoding’ (or the default encoding if ‘encoding’ isn’t specified). The ‘errors’ argument applies only to this conversion.

Returns:self
zfill

S.zfill(width) -> string

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.browse.control.StackControlBase

class mrv.maya.ui.browse.control.StackControlBase(*args, **kwargs)

Bases: mrv.maya.ui.TextScrollList

stack base implementation. A stack keeps multiple items which can be added and removed. Additionally, it allows to remap the items, effectively showing a formatted item, which is kept in sync with an unformatted item. :note: for now, only adding items, format will be applied. All other methods

operate on the formatted items.
classmethod activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
addItem(item)
addItems(items)
Add multiple items to the end of the list :return: self
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_dcc
Event suitable to deal with user interface callback
e_deleteKeyCommand
Event suitable to deal with user interface callback
e_dgc
Event suitable to deal with user interface callback
e_dkc
Event suitable to deal with user interface callback
e_doubleClickCommand
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_sc
Event suitable to deal with user interface callback
e_selectCommand
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
formatItem(item)
Returns:formatted version of item
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.

items()
Returns:list of currently available items
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_a
p_aas
p_ai
p_allItems
p_allowAutomaticSelection
p_allowMultiSelection
p_ams
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_ap
p_append
p_appendPosition
p_backgroundColor
p_bgc
p_da
p_defineTemplate
p_deselectAll
p_deselectIndexedItem
p_deselectItem
p_di
p_dii
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_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_ni
p_npm
p_nr
p_nsi
p_numberOfItems
p_numberOfPopupMenus
p_numberOfRows
p_numberOfSelectedItems
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_raremoveItem
p_removeAll
p_removeIndexedItem
p_ri
p_rii
p_selectIndexedItem
p_selectItem
p_shi
p_showIndexedItem
p_si
p_sii
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
removeItem(item)
Remove the given formatted item from the list, as well as the corresponding unformtted item. Its not an error if the item does not exist
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

selectUnformattedItem(index_or_item)

Select the unformatted item as identified by either the index or item :param index_or_item: integer representing the 0-based index of the item to

select, or the item’s id
Raises ValueError:
 if the item does not exist
selectedIndex()
Returns:First selected index - the index is 1-based, or -1 if there

is nothing selected :note: even if multiple selections are possible

selectedIndices()
Returns:tuple of all selected 1-based indices, or an empty tuple if there

is nothing selected

selectedItem()
Returns:the first selected item, or None if nothing is selected
selectedItems()
Returns:list of all selected items as strings, or an empty list if nothing

is selected

selectedUnformattedItem()
Returns:unformatted selected item or None
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
setItems(items)

Set the given items to be shown. :param items: iterable of items

if empty, the control will be empty after this call.
Returns:self
setSelectedItem(item)

Set the given item selected, or clear the selection :param item: item to select, or clear the selection if None is given :note: it is not considered an error if the item doesnt exist - following

maya’s behaviour
Returns:self
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.browse.control

class mrv.maya.ui.browse.control.iFinderFilter

Bases: mrv.interface.Interface

Filter interface suitable to perform item filter operations for Finder controls

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

filtered(finder, element_index, base_url, items)
Returns:

list of items which may be shown in the element at element_index

Parameters:
  • finder – finder instance issueing the call
  • element_index – index of the element which is to be filled with items
  • base_url – url at which the given items exist
  • items – list of relative item ids which are to be shown in the finder element
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

Epydoc: mrv.maya.ui.browse.control

class mrv.maya.ui.browse.control.iFinderProvider(root)

Bases: mrv.interface.Interface

Interface defining the capabilities of a provider to be usable by a Finder control. Every finder as a root, which is used as basis for listing urls.

Besides its function to provide sub-items for given urls, it is also used to store recently selected items on a given level of a url. This memory allows the finder to restore common portions of URLs accordingly.

The base implementation of the memorization feature already.

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

formatItem(url_base, url_index, url_item)

Given the url_item, as well as additional information such as its base and its index inside of the url, this method encodes the item for presentation in the user interface. :param url_base: relative url at which the url_item resides. Is “” if url_index

is 0
Parameters:
  • url_index – index representing the position of the url_item within the url
  • url_item – item which is to be formatted.
Returns:

string representing the formatted url.

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:string representing the file root
storeUrlItem(url_index, url_item)

Stores and associates a given url_index with a url_item. Makes the stored item queryable by the storedUrlItemByIndex method :param url_index: index from 0 to n, where 0 corresponds to the first item

in the url
Parameter:url_item – the string item to store at the given index
storedUrlItemByIndex(url_index)
Returns:string item previously stored at the given index, or None

if there is no information available

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
urlItems(url)
Returns:list of string-like items which can be found at the given url.

If this url is combined with one of the returned items separated by a slash, a valid url is formed, i.e. url/item :param url: A given slash-separated url like base/subitem or ‘’, which

requests items at the root of all urls

Table Of Contents

Previous topic

mrv.maya.ui.browse.interface

Next topic

mrv.maya.ui.browse.finder

This Page