Another approach is this:

  iter = om.MItDependencyNodes()
  while not iter.isDone():
    nodeFn = om.MFnDependencyNode(iter.thisNode())
    if nodeFn.name() == 'persp':
      break
    iter.next()

In C++ this can be faster than the MSelectionList approach if you know
which type of node you're looking for because the MItDependencyNodes
constructor allows you to filter for a particular type of node.
However in Python the MSelectionList approach will likely always be
faster since it involves fewer total calls to the API.


On Tue, Oct 21, 2008 at 1:32 PM, Doug Brooks <[EMAIL PROTECTED]> wrote:
>
> Thanks Ali, looking for openMaya.
>
> Chad.. darn it.. selectionList.add! Thanks! I knew it was something
> easy :)

-- 
-deane

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to