iterSelectionList(sellist,
filterType=api.MFn.kInvalid,
predicate=lambda x: True,
asNode=True,
handlePlugs=True,
handleComponents=False)
| source code
|
Iterate the given selection list
- Parameters:
sellist - MSelectionList to iterate
filterType - MFnType id acting as simple type filter to ignore all objects which do not
have the given object type
asNode - if True, returned MObjects or DagPaths will be wrapped as Node, compoents will be
wrapped as Component.
Otherwise they will be returned as MObjects and MDagPaths respectively.
handlePlugs - if True, plugs can be part of the selection list and will be returned. This
implicitly means that the selection list will be iterated without an iterator, and MFnType filters
will be slower as it is implemented in python. If components are enabled, the tuple returned will be
( Plug, MObject() )
predicate - method returninng True if passed in iteration element can be yielded
default: lambda x: True
handleComponents - if True, possibly selected components of dagNodes will be returned
as well. This forces the return value into tuple(Node, Component)
- Returns:
- Node or Plug on each iteration step
If handleComponents is True, for each Object, a tuple will be returned as tuple( Node, Component ) where
component is NullObject ( MObject ) if the whole object is on the list.
If the original object was a plug, it will be in the tuples first slot, whereas the component
will be a NullObject
|