mrv.maya.ui.browse.layout

Epydoc: mrv.maya.ui.browse.layout

module containing layouts which combine finder ui modules

Functions

mrv.maya.ui.browse.layout.handleUnsavedModifications()

Ask the user whether he wants to handle his unsaved modifications. This may cause the current file to be saved, or the modifications to be discarded. :return: True if the changes have been handled properly, or False if the

caller should not proceed
mrv.maya.ui.browse.layout.logException(func)
Decorator which shows short exception information in a popup and a full stack trace to stdout. Finally the exception will be reraised
mrv.maya.ui.browse.layout.notifyException(func)
As logException, but does not reraise on error. This is useful if you just want to see a popup, but not cause maya to remove the possibly problematic UI callback. Additionally, no stacktrace will be shown

Classes

Epydoc: mrv.maya.ui.browse.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.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.layout.FileOpenFinder

class mrv.maya.ui.browse.layout.FileOpenFinder(*args, **kwargs)

Bases: mrv.maya.ui.FinderLayout

Finder customized for opening files

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 FileOpenFinder.activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
FileOpenFinder.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 FileOpenFinder.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
FileOpenFinder.annotation()
:return : the annotation string
FileOpenFinder.basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
FileOpenFinder.capitalize

S.capitalize() -> unicode

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

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

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

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

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

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

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

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

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

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

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

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

S.isalnum() -> bool

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

FileOpenFinder.isalpha

S.isalpha() -> bool

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

FileOpenFinder.isdecimal

S.isdecimal() -> bool

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

FileOpenFinder.isdigit

S.isdigit() -> bool

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

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

FileOpenFinder.isnumeric

S.isnumeric() -> bool

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

FileOpenFinder.isspace

S.isspace() -> bool

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

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

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

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

S.join(iterable) -> unicode

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

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

FileOpenFinder.lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

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

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

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

Remove the given child from our list

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

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

FileOpenFinder.rindex

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

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

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

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

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

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

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

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

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

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

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

S.swapcase() -> unicode

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

FileOpenFinder.t_bookmarks
alias of BookmarkControl
FileOpenFinder.t_filepath
alias of FilePathControl
FileOpenFinder.t_filter
alias of FileFilterControl
FileOpenFinder.t_finder
alias of Finder
FileOpenFinder.t_finder_provider
alias of FileProvider
FileOpenFinder.t_options
alias of FileOpenOptions
FileOpenFinder.t_root_selector
alias of FileRootSelectorControl
FileOpenFinder.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.

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

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

S.upper() -> unicode

Return a copy of S converted to uppercase.

FileOpenFinder.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.layout

class mrv.maya.ui.browse.layout.FileOpenOptions

Bases: mrv.maya.ui.ColumnLayout, mrv.maya.ui.browse.interface.iOptions

Options implementation providing options useful during file-open

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

Add the given child UI item to our list of children

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

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

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

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

S.capitalize() -> unicode

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

center

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

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

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

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

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

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

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

decode

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

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

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

fileOptions()
Returns:dict with keyword options reflecting the settings of the

interface. These should be given to the file command

find

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

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

Return -1 on failure.

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

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

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

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

S.isalnum() -> bool

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

isalpha

S.isalpha() -> bool

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

isdecimal

S.isdecimal() -> bool

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

isdigit

S.isdigit() -> bool

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

islower

S.islower() -> bool

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

isnumeric

S.isnumeric() -> bool

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

isspace

S.isspace() -> bool

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

istitle

S.istitle() -> bool

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

isupper

S.isupper() -> bool

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

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

S.join(iterable) -> unicode

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

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

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

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

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

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

p_adj
p_adjustableColumn
p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_backgroundColor
p_bgc
p_ca
Returns:children of this layout
p_cal
p_cat
p_childArray
Returns:children of this layout
p_co
p_columnAlign
p_columnAttach
p_columnOffset
p_columnWidth
p_cw
p_defineTemplate
p_dimension
Returns:(x,y) tuple of x and y dimensions of the UI element
p_doctTag
p_dt
p_dtg
p_ebg
p_en
p_enable
p_enableBackground
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_m
p_manage
p_nch
p_npm
p_numberOfChildren
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_rowSpacing
p_rs
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
removeChild(child)

Remove the given child from our list

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

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

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

rfind

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

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

Return -1 on failure.

rindex

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

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

rjust

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

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

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

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

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

rsplit

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

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

rstrip

S.rstrip([chars]) -> unicode

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

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

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

Returns:self
Note:always use the addChild function to add the children !
setAnnotation(ann)
Set the UI element’s annotation :note: not all named UI elements can have their annotation set
setDimension(dimension)
Set the UI elements dimension :param dimension: (x,y) : tuple holding desired x and y dimension
setFocus()
Set the global keyboard focus to this control
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
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.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.FileReference(filepath=None, refnode=None)

Bases: mrv.interface.iDagItem

Represents a Maya file reference

Note:do not cache these instances but get a fresh one when you have to work with it
Note:as FileReference is also a iDagItem, all the respective methods, especially for parent/child iteration and query can be used as well
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 0x5c4c578>)
Returns:all intermediate child references of this instance
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

cleanup(*args, **kwargs)

remove unresolved edits or all edits on this reference

Parameters:
  • unresolvedEdits – if True, only dangling connections will be removed, if False, all reference edits will be removed - the reference will be unloaded for beforehand. The loading state of the reference will stay unchanged after the operation.
  • editTypes – list of edit types to remove during cleanup
Returns:

self

copynumber()
Returns:the references copy number - starting at 0 for the first reference
Note:we do not cache the copy number as mayas internal numbering can change on when references change - the only stable thing is the reference node name
classmethod create(filepath, namespace=None, load=True, **kwargs)

Create a reference with the given namespace

Parameters:
  • filepath – path describing the reference file location
  • namespace – if None, a unique namespace will be generated for you The namespace will contain all referenced objects.
  • load – if True, the reference will be created in loaded state, other wise its loading is deferred
  • kwargs – passed to file command
Raises ValueError:
 

if the namespace does already exist

Raises RuntimeError:
 

if the reference could not be created

exists()
Returns:True if our file reference exists in maya
classmethod fromPaths(paths, **kwargs)

Find the reference for each path in paths. If you provide the path X 2 times, but you only have one reference to X, the return value will be [FileReference(X), None] as there are less references than provided paths.

Parameters:
  • paths – a list of paths or references whose references in the scene should be returned. In case a reference is found, its plain path will be used instead.
  • kwargs

    all supported by ls to yield the base set of references we will use to match the paths with. Additionally, you may specify:

    • ignore_extension:
      if True, default False, the extension will be ignored during the search, only the actual base name will matter. This way, an MA file will be matched with an MB file. The references returned will still have their extension original extension.
Returns:

list(FileReference|None, ...) if a filereference was found for given occurrence of Path, it will be returned at index of the current path in the input paths, otherwise it is None.

Note:

zip(paths, result) to get a corresponding tuple list associating each input path with the located reference

fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
importRef(*args, **kwargs)

Import the reference until the given depth is reached

Parameter:depth
  • x<1: import all references and subreferences
  • x: import until level x is reached, 0 imports just self such that
    all its children are on the same level as self was before import
Returns:list of FileReference objects that are now in the root namespace - this list could be empty if all subreferences are fully imported
isLoaded()
Returns:True if the reference is loaded
isLocked()
Returns:True if reference is locked
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
iterNodes(*args, **kwargs)

Creates iterator over nodes in this reference

Parameters:
  • args – MFn.kType filter ids to be used to pre-filter all nodes. If you know what you are looking for, setting this can greatly improve performance !
  • kwargs

    additional kwargs will be passed to either iterDagNodes or iterDgNodes (dag = False). The following additional kwargs may be specified:

    • asNode:
      if True, default True, return wrapped Nodes, if False MDagPaths or MObjects will be returned
    • dag:
      if True, default False, return dag nodes only. Otherwise return dependency nodes as well. Enables assemblies and assembilesInReference.
    • assemblies:
      if True, return only dagNodes with no parent. Needs dag and is mutually exclusive with assembilesInReference.
    • assembliesInReference:
      if True, return only dag nodes that have no parent in their own reference. They may have a parent not coming from their reference though. This flag has a big negative performance impact and requires dag.
    • predicate:
      if function returns True for Node|MObject|MDagPath n, n will be yielded. Defaults to return True for all.
Raises ValueError:
 

if incompatible arguments have been given

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
classmethod ls(rootReference='', predicate=<function <lambda> at 0x5c4be60>)

list all references in the scene or under the given root

Parameters:
  • rootReference – if not empty, the references below it will be returned. Otherwise all scene references will be listed. May be string, Path or FileReference
  • predicate – method returning true for each valid file reference object that should be part of the return value.
Returns:

list of FileReference s objects

classmethod lsDeep(predicate=<function <lambda> at 0x5c4bf50>, **kwargs)

Return all references recursively

Parameter:kwargs – support for arguments as in ls, hence you can use the rootReference flag to restrict the set of returned FileReferences.
namespace()
Returns:namespace object of the full namespace holding all objects in this reference
parent()
Returns:the parent reference of this instance or None if we are root
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
path(copynumber=False, unresolved=False)
Returns:

Path object with the path containing the reference’s data

Parameters:
  • copynumber – If True, the returned path will include the copy number. As it will be a path object, it might not be fully usable in that state
  • unresolved – see ls
Note:

we always query it from maya as our numbers change if some other reference is being removed and cannot be trusted

referenceNode()
Returns:wrapped reference node managing this reference
remove(*args, **kwargs)

Remove the given reference from the scene

Note:assures that no namespaces of that reference are left, remaining objects will be moved into the root namespace. This way the namespaces will not be left as waste. This fails if there are referenced objects in the subnamespace - we currently ignore that issue as the main reference removal worked at that point.
Note:kwargs passed to namespace.delete
replace(*args, **kwargs)

Replace this reference with filepath

Parameter:filepath – the path to the file to replace this reference with Reference instances will be handled as well.
Returns:self
root()
Returns:the root of the DAG - it has no further parents
setLoaded(*args, **kwargs)

set the reference loaded or unloaded

Parameter:state – True = unload reference, True = load reference
Returns:self
setLocked(*args, **kwargs)

Set the reference to be locked or unlocked

Parameter:state – if True, the reference is locked , if False its unlocked and can be altered
Returns:self
setNamespace(*args, **kwargs)

set the reference to use the given namespace

Parameter:namespace – Namespace instance or name of the short namespace
Raises RuntimeError:
 if namespace already exists or if reference is not root
Returns:self
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.layout.FileReferenceFinder

class mrv.maya.ui.browse.layout.FileReferenceFinder(*args, **kwargs)

Bases: mrv.maya.ui.FinderLayout

Finder Layout for creating references

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 FileReferenceFinder.activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
FileReferenceFinder.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 FileReferenceFinder.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
FileReferenceFinder.annotation()
:return : the annotation string
FileReferenceFinder.basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
FileReferenceFinder.capitalize

S.capitalize() -> unicode

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

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

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

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

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

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

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

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

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

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

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

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

S.isalnum() -> bool

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

FileReferenceFinder.isalpha

S.isalpha() -> bool

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

FileReferenceFinder.isdecimal

S.isdecimal() -> bool

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

FileReferenceFinder.isdigit

S.isdigit() -> bool

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

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

FileReferenceFinder.isnumeric

S.isnumeric() -> bool

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

FileReferenceFinder.isspace

S.isspace() -> bool

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

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

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

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

S.join(iterable) -> unicode

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

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

FileReferenceFinder.lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

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

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

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

Remove the given child from our list

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

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

FileReferenceFinder.rindex

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

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

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

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

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

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

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

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

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

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

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

S.swapcase() -> unicode

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

FileReferenceFinder.t_bookmarks
alias of BookmarkControl
FileReferenceFinder.t_filepath
alias of FilePathControl
FileReferenceFinder.t_filter
alias of FileFilterControl
FileReferenceFinder.t_finder
alias of Finder
FileReferenceFinder.t_finder_provider
alias of FileProvider
FileReferenceFinder.t_root_selector
alias of FileRootSelectorControl
FileReferenceFinder.t_stack
alias of FileStack
FileReferenceFinder.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.

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

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

S.upper() -> unicode

Return a copy of S converted to uppercase.

FileReferenceFinder.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.layout

class mrv.maya.ui.browse.layout.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.layout.FileSaveFinder

class mrv.maya.ui.browse.layout.FileSaveFinder(*args, **kwargs)

Bases: mrv.maya.ui.FinderLayout

Finder optimized to choose a location to save a file

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 FileSaveFinder.activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
FileSaveFinder.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 FileSaveFinder.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
FileSaveFinder.annotation()
:return : the annotation string
FileSaveFinder.basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
FileSaveFinder.capitalize

S.capitalize() -> unicode

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

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

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

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

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

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

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

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

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

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

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

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

S.isalnum() -> bool

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

FileSaveFinder.isalpha

S.isalpha() -> bool

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

FileSaveFinder.isdecimal

S.isdecimal() -> bool

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

FileSaveFinder.isdigit

S.isdigit() -> bool

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

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

FileSaveFinder.isnumeric

S.isnumeric() -> bool

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

FileSaveFinder.isspace

S.isspace() -> bool

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

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

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

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

S.join(iterable) -> unicode

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

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

FileSaveFinder.lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

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

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

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

Remove the given child from our list

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

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

FileSaveFinder.rindex

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

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

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

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

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

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

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

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

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

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

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

S.swapcase() -> unicode

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

FileSaveFinder.t_bookmarks
alias of BookmarkControl
FileSaveFinder.t_filepath
alias of FilePathControlEditable
FileSaveFinder.t_filter
alias of FileFilterControl
FileSaveFinder.t_finder
alias of Finder
FileSaveFinder.t_finder_provider
alias of FileProvider
FileSaveFinder.t_root_selector
alias of FileRootSelectorControl
FileSaveFinder.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.

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

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

S.upper() -> unicode

Return a copy of S converted to uppercase.

FileSaveFinder.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.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.Finder(provider=None, filter=None)

Bases: mrv.maya.ui.util.EventSenderUI

The Finder control implements a finder-like browser, which displays URLs. URLs consist of items separated by the “/” character. Whenever a item is selected, an iProvider compatible instance will be asked for the subitems of the corresponding URL. Using these, a new field will be set up for presentation. A filter can be installed to prevent items from being shown.

An added benefit is the ability to automatically match previously selected path items on a certain level of the URL with the available ones, allowing to quickly parse through URLs with a similar structure.

A limitation of the current implementation is, that you can only keep one item selected at once in each url item area.

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
layout()
Returns:the finder’s main layout which contains all controls
classmethod listEventNames()
Returns:list of event ids that exist on our class
numUrlElements()
Returns:number of url elements that are currently shown. A url of 1/2 would

have two url elements

provider()
Returns:current url provider
selectedUrl(absolute=False)
Returns:string representing the currently selected, / separated URL, or None if there is no url selected
Parameter:absolute – if True, an absolute URL will be provided using the provider’s root
selectedUrlItemByIndex(index)
Returns:The selected url item at the given element index or None if nothing is selected
Parameter:index – 0 to numUrlElements()-1
Raies indexerror:
 
selection_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().

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

Set or unset a filter. All items will be sent through the filter, and will be shown only if they pass. :param filter: Functor called f(url,t) and returns True for each item which may

be shown in the Finder. The url is the full relative url leading to, but excluding the item t, whose visibility is being decided upon
setItemByIndex(item, index)
Set the given string item, which sits at the given index of a url :raise ValueError: if item does not exist at given index :raise IndexError: if index is not currently shown
setProvider(provider=None)

Set the provider to use :param provider: iFinderProvider compatible instance, or None

If no provider is set, the instance will be blank
setUrl(url, require_all_items=True, allow_memory=False)

Set the given url to be selected :param url: / separated relative url. The individual items must be available

in the provider.
Parm require_all_items:
 if False, the control will display as many items as possible. Otherwise it must display all given items, or raise ValueError
Parameter:allow_memory – if true, provider memory may be used to show the longest chosen url, being possibly more than you specify. Currently not implemented
t_element
alias of FinderElement
urlItemsByIndex(index)
Returns:list of item ids which are currently being shown
Parameter:index – 0 based element index to numUrlElements()-1
Raises IndexError:
 
url_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().

Epydoc: mrv.maya.ui.browse.layout

class mrv.maya.ui.browse.layout.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.layout.FinderLayout

class mrv.maya.ui.browse.layout.FinderLayout(*args, **kwargs)

Bases: mrv.maya.ui.FormLayout

Implements a layout with a finder as well a surrounding elements. It can be configured using class configuration variables, and allows easy modification through derivation

Instance Variables * finder * options

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 FinderLayout.activeParent()
Returns:NameUI of the currently set parent
Raises RuntimeError:
 if no active parent was set
FinderLayout.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 FinderLayout.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
FinderLayout.annotation()
:return : the annotation string
FinderLayout.basename()
Returns:basename of this path, ‘/hello/world’ -> ‘world’
FinderLayout.capitalize

S.capitalize() -> unicode

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

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

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

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

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

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

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

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

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

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

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

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

S.isalnum() -> bool

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

FinderLayout.isalpha

S.isalpha() -> bool

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

FinderLayout.isdecimal

S.isdecimal() -> bool

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

FinderLayout.isdigit

S.isdigit() -> bool

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

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

FinderLayout.isnumeric

S.isnumeric() -> bool

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

FinderLayout.isspace

S.isspace() -> bool

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

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

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

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

S.join(iterable) -> unicode

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

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

FinderLayout.lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

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

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

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

Remove the given child from our list

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

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

FinderLayout.rindex

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

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

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

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

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

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

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

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

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

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

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

S.swapcase() -> unicode

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

FinderLayout.t_bookmarks
alias of BookmarkControl
FinderLayout.t_filepath
alias of FilePathControl
FinderLayout.t_filter
alias of FileFilterControl
FinderLayout.t_finder
alias of Finder
FinderLayout.t_finder_provider
alias of FileProvider
FinderLayout.t_root_selector
alias of FileRootSelectorControl
FinderLayout.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.

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

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

S.upper() -> unicode

Return a copy of S converted to uppercase.

FinderLayout.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.layout

class mrv.maya.ui.browse.layout.FrameDecorator(*args, **kwargs)

Bases: mrv.maya.ui.FrameLayout

A simple helper to wrap a box around a layout or control.

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

Add the given child UI item to our list of children

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

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

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

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

S.capitalize() -> unicode

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

center

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

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

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

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

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

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

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

decode

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

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

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

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

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

endswith

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

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

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

S.expandtabs([tabsize]) -> unicode

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

find

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

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

Return -1 on failure.

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

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

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

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

S.isalnum() -> bool

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

isalpha

S.isalpha() -> bool

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

isdecimal

S.isdecimal() -> bool

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

isdigit

S.isdigit() -> bool

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

islower

S.islower() -> bool

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

isnumeric

S.isnumeric() -> bool

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

isspace

S.isspace() -> bool

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

istitle

S.istitle() -> bool

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

isupper

S.isupper() -> bool

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

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

S.join(iterable) -> unicode

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

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

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

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

lower

S.lower() -> unicode

Return a copy of the string S converted to lowercase.

lstrip

S.lstrip([chars]) -> unicode

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

p_ann
:return : the annotation string
p_annotation
:return : the annotation string
p_backgroundColor
p_bgc
p_borderStyle
p_borderVisible
p_bs
p_bw
p_ca
Returns:children of this layout
p_childArray
Returns:children of this layout
p_cl
p_cll
p_collapsable
p_collapse
p_defineTemplate
p_dimension
Returns:(x,y) tuple of x and y dimensions of the UI element
p_doctTag
p_dt
p_dtg
p_ebg
p_en
p_enable
p_enableBackground
p_ex
Returns:True if this instance still exists in maya
p_exists
Returns:True if this instance still exists in maya
p_fn
p_font
p_fpn
p_fullPathName
p_h
p_height
p_io
p_isObscured
p_l
p_la
p_label
p_labelAlign
p_labelIndent
p_labelVisible
p_labelWidth
p_li
p_lv
p_lw
p_m
p_manage
p_marginHeight
p_marginWidth
p_mh
p_mw
p_nch
p_npm
p_numberOfChildren
p_numberOfPopupMenus
p_pma
Returns:popup menus attached to this control
p_po
p_popupMenuArray
Returns:popup menus attached to this control
p_preventOverride
p_useTemplate
p_ut
p_vis
p_visible
p_w
p_width
parent()
Returns:parent instance of this ui element
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
partition

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

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

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

Remove the given child from our list

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

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

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

rfind

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

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

Return -1 on failure.

rindex

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

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

rjust

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

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

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

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

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

rsplit

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

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

rstrip

S.rstrip([chars]) -> unicode

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

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

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

Returns:self
Note:always use the addChild function to add the children !
setAnnotation(ann)
Set the UI element’s annotation :note: not all named UI elements can have their annotation set
setDimension(dimension)
Set the UI elements dimension :param dimension: (x,y) : tuple holding desired x and y dimension
setFocus()
Set the global keyboard focus to this control
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
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.layout

class mrv.maya.ui.browse.layout.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.layout

class mrv.maya.ui.browse.layout.iOptions

Bases: mrv.interface.Interface

Interface for all custom options layouts to be used with the FinderLayout. They take a weak-reference to their parent FinderLayout allowing them to set themselves up if necessary. The options they represent must be read by a custom implementation of the FinderLayout

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

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

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

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

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

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

Table Of Contents

Previous topic

mrv.maya.ui.qa

Next topic

mrv.maya.ui.browse.option

This Page