Hah. Well, yeah...  thanks.

On Wednesday, March 19, 2014 10:59:10 AM, damon shelton wrote:
cmds.ls <http://cmds.ls> ('*pCube1', long=True)

On Mar 19, 2014 7:54 AM, "Eric Thivierge" <[email protected]
<mailto:[email protected]>> wrote:

    Hello all,

    This may seem like a simple question but my Googling didn't return
    any useful results.

    I have a name of an object 'pCube1'. I need to find it in the Maya
    scene. Problem is, I may have multiple objects in the scene that
    are named the same thing. Even in the same hierarchy (Crazy that
    Maya lets you do this btw). Is there a way to get a list of all
    objects that are named 'pCube1'? Once I get that list I need to
    find the top most parent in the scene. From there I can find the
    one I need.

    When I try to listRelatives, it throws an error saying there is
    more than one node int he scene that is name 'pCube1'.

    # PyMel
    print pm.objExists('pCube1')

    parents = pm.listRelatives('pCube1', allParents=True)
    for eachItem in parents:
        print eachItem.name()

    Thanks,
    Eric T.

    --
    You received this message because you are subscribed to the Google
    Groups "Python Programming for Autodesk Maya" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:python_inside_maya%[email protected]>.
    To view this discussion on the web visit
    
https://groups.google.com/d/__msgid/python_inside_maya/__5329AFAD.5080403%40hybride.com
    
<https://groups.google.com/d/msgid/python_inside_maya/5329AFAD.5080403%40hybride.com>__.
    For more options, visit https://groups.google.com/d/__optout
    <https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoLb37cQR4QB8R6eshN1PmT95n3uGY9qJicLtHFoEhQjLw%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoLb37cQR4QB8R6eshN1PmT95n3uGY9qJicLtHFoEhQjLw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python 
Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5329B11D.4040200%40hybride.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to