mrv.maya.ui.browse.interface

Epydoc: mrv.maya.ui.browse.interface

module with interfaces to define contracts

Classes

Epydoc: mrv.maya.ui.browse.interface

class mrv.maya.ui.browse.interface.Interface

Bases: object

Base for all interfaces. All interfaces should derive from here.

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

Epydoc: mrv.maya.ui.browse.interface.iFinderFilter

class mrv.maya.ui.browse.interface.iFinderFilter

Bases: mrv.interface.Interface

Filter interface suitable to perform item filter operations for Finder controls

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

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

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

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

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

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

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

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

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

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

Bases: mrv.interface.Interface

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

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

The base implementation of the memorization feature already.

classmethod addSep(item, sep)
Returns:

item with separator added to it ( just once )

Note:

operates best on strings

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

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

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

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

formatItem(url_base, url_index, url_item)

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

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

string representing the formatted url.

fullChildName(childname)
Add the given name to the string version of our instance :return: string with childname added like name _sep childname
isPartOf(other)
Returns:True if self is a part of other, and thus can be found in other
Note:operates on strings only
isRoot()
Returns:True if this path is the root of the DAG
isRootOf(other)
Returns:True other starts with self
Note:operates on strings
Note:we assume other has the same type as self, thus the same separator
iterParents(predicate=<function <lambda> at 0x7f41dd7c5230>)
Returns:generator retrieving all parents up to the root
Parameter:predicate – returns True for all x that you want to be returned
parent()
Returns:parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root
parentDeep()
Returns:all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ]
root()
Returns:string representing the file root
storeUrlItem(url_index, url_item)

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

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

if there is no information available

supports(interface_type)
Returns:True if this instance supports the interface of the given type
Parameter:interface_type – Type of the interface you require this instance to support
Note:Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work
urlItems(url)
Returns:list of string-like items which can be found at the given url.

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

requests items at the root of all urls

Epydoc: mrv.maya.ui.browse.interface.iOptions

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

Next topic

mrv.maya.ui.browse.control

This Page