Package animio :: Module ui :: Class NodeSelector
[hide private]
[frames] | no frames]

Class NodeSelector

source code

mrv.maya.ui.TextScrollList --+
                             |
                            NodeSelector

Element allowing the user to select nodes. Either selected ones, or by namespace. The interface provides methods to retrieve that information

Note: requires update once the scene changes - the parent is responsible for this

Instance Methods [hide private]
 
__new__(cls, *args, **kwargs)
Initialize the instance according to our needs
source code
    Interface
 
update(self)
Call to force the element to update according to the contents of the scene
source code
 
uses_selection(self)
Returns: True if the user wants to handle selected nodes
source code
 
set_uses_selection(self, state)
Sets this element to return selected nodes when queried in 'iter_nodes' if state is True :note: only works if set_show_selected was called with a True value :return: self
source code
 
set_show_selected(self, state)
If state is True, we will allow the user to pick 'selected nodes' :return: self
source code
 
show_seleted(self) source code
 
selected_namespaces(self)
been selected
source code
 
select_namespaces(self, iter_ns)
Select the given namespaces on our list if they exist.
source code
 
iter_nodes(self, *args, **kwargs)
as applicable
source code
Class Variables [hide private]
  kSelectedNodes = "Selected Nodes"
Method Details [hide private]

__new__(cls, *args, **kwargs)

source code 
Initialize the instance according to our needs
Parameters:
  • **kwargs - Additional configuration

    • show_selected_nodes : If True, default True, the user may specify

    to get the current node selection included in the managed set of nodes

uses_selection(self)

source code 
Returns:
True if the user wants to handle selected nodes

selected_namespaces(self)

source code 
been selected
Returns:
list(Namespace, ...) list of Namespace objects which have

select_namespaces(self, iter_ns)

source code 
Select the given namespaces on our list if they exist. :param iter_ns: iterable yielding namespace objects - they must be absolute :return: self

iter_nodes(self, *args, **kwargs)

source code 
as applicable
Parameters:
  • *args - passed to Namespace.iterNodes
  • **kwargs - passed to Namespace.iterNodes
Returns:
iterator yielding all selected nodes ( if set by the user ) as well as all nodes in all selected namespaces

Note: *args and **kwargs are passed to iterSelectionList as good