Agreed. The problem is, in Softimage there is not "Full Path". You can get the ".FullName()" which only gives you the model space plus object name "myRig.pCube1" for example instead of "myRig.geometry.lowres.pCube1". It was quick enough to roll my own though.

Eric T.

On Wednesday, March 19, 2014 1:56:58 PM, Marcus Ottosson wrote:
I see. It's generally a good approach to work with full-paths
throughout, and if you do, you should encounter little difficulty in
paths across packages. Even duplicate names across hierarchies are
unique given a full path.


On 19 March 2014 17:44, Eric Thivierge <[email protected]
<mailto:[email protected]>> wrote:

    Thanks Marcus,

    The problem I'm facing currently is that I need to write data to a
    json file that can be read in and interperated by both Softimage
    and Maya. So I have to store object names consistently when
    exporting from Softimage or Maya. I'm probably more in favor of
    mimicking the Maya format at this point since, well you know why.

    Thanks,
    Eric T.


    On Wednesday, March 19, 2014 1:12:25 PM, Marcus Ottosson wrote:

        In Maya, the hierarchy is included in a node's path but gets
        discarded
        most of the time and instead the artist is trusted to keep his
        names
        unique. The reason this is the case is because in Maya, there
        is no
        "hierarchy". Maya is inherently node-based; Softimage on the other
        hand does have the notion of a hierarchy.

        Thus, a full path of a pCube1 may be resolve
        into'|a_group|another_group|__pCube1', the | being the separator.

        You can ask for full paths via cmds.ls <http://cmds.ls>
        <http://cmds.ls>(long=True),

        other commands have similar flags, such as
        cmds.listRelatives(fullPath=__True) that ultimately do the
        same thing;
        concatenate the depth-first path of a node within a graph.

        Additionally, Maya has the notion of namespaces, which
        encapsulates
        nodes similar to how Models encapsulates nodes in Softimage,
        however I
        would suggest sticking with hungarian notation at first as
        namespaces
        are tricky to understand at first.

        Best,
        Marcus


        On 19 March 2014 15:00, Eric Thivierge <[email protected]
        <mailto:[email protected]>
        <mailto:[email protected]
        <mailto:[email protected]>__>> wrote:

            Hah. Well, yeah...  thanks.

            On Wednesday, March 19, 2014 10:59:10 AM, damon shelton wrote:

        cmds.ls <http://cmds.ls> <http://cmds.ls> <http://cmds.ls>
        ('*pCube1', long=True)



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

                <mailto:[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]>

        <mailto:python_inside_maya%[email protected]
        <mailto:python_inside_maya%[email protected]>>


        <mailto:python_inside_maya%[email protected]
        <mailto:python_inside_maya%[email protected]>

        <mailto:python_inside_maya%__252Bunsubscribe@googlegroups.__com 
<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>

        
<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>__>


        
<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>

        
<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>
                <https://groups.google.com/d/____optout
        <https://groups.google.com/d/__optout>>

                    <https://groups.google.com/d/____optout
        <https://groups.google.com/d/__optout>
                <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:python_inside_maya%[email protected]>

        <mailto:python_inside_maya%[email protected]
        <mailto:python_inside_maya%[email protected]>__>

        <mailto:[email protected]
        <mailto:python_inside_maya%[email protected]>


        <mailto:python_inside_maya%[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/____CAM9RXoLb37cQR4QB8R6eshN1PmT95____n3uGY9qJicLtHFoEhQjLw%__40mail.__gmail.com
        
<https://groups.google.com/d/__msgid/python_inside_maya/__CAM9RXoLb37cQR4QB8R6eshN1PmT95__n3uGY9qJicLtHFoEhQjLw%40mail.__gmail.com>

        
<https://groups.google.com/d/__msgid/python_inside_maya/__CAM9RXoLb37cQR4QB8R6eshN1PmT95__n3uGY9qJicLtHFoEhQjLw%40mail.__gmail.com
        
<https://groups.google.com/d/msgid/python_inside_maya/CAM9RXoLb37cQR4QB8R6eshN1PmT95n3uGY9qJicLtHFoEhQjLw%40mail.gmail.com>>

        
<https://groups.google.com/d/____msgid/python_inside_maya/____CAM9RXoLb37cQR4QB8R6eshN1PmT95____n3uGY9qJicLtHFoEhQjLw%__40mail.__gmail.com?utm_medium=__email&__utm_source=footer
        
<https://groups.google.com/d/__msgid/python_inside_maya/__CAM9RXoLb37cQR4QB8R6eshN1PmT95__n3uGY9qJicLtHFoEhQjLw%40mail.__gmail.com?utm_medium=email&__utm_source=footer>

        
<https://groups.google.com/d/__msgid/python_inside_maya/__CAM9RXoLb37cQR4QB8R6eshN1PmT95__n3uGY9qJicLtHFoEhQjLw%40mail.__gmail.com?utm_medium=email&__utm_source=footer
        
<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
        <https://groups.google.com/d/__optout>
                <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:python_inside_maya%[email protected]>

        <mailto:python_inside_maya%[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/____5329B11D.4040200%40hybride.com
        
<https://groups.google.com/d/__msgid/python_inside_maya/__5329B11D.4040200%40hybride.com>

        
<https://groups.google.com/d/__msgid/python_inside_maya/__5329B11D.4040200%40hybride.com
        
<https://groups.google.com/d/msgid/python_inside_maya/5329B11D.4040200%40hybride.com>__>__.


            For more options, visit
        https://groups.google.com/d/____optout
        <https://groups.google.com/d/__optout>
            <https://groups.google.com/d/__optout
        <https://groups.google.com/d/optout>>.




        --
        *Marcus Ottosson*
        [email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>__>


        --
        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]>
        <mailto:[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/__CAFRtmOCB%__2BTeeUmXjjM2eBYbnFLDELt%2BZB-__gBfH8L2L1QChnE-w%40mail.gmail.__com
        
<https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCB%2BTeeUmXjjM2eBYbnFLDELt%2BZB-gBfH8L2L1QChnE-w%40mail.gmail.com>
        
<https://groups.google.com/d/__msgid/python_inside_maya/__CAFRtmOCB%__2BTeeUmXjjM2eBYbnFLDELt%2BZB-__gBfH8L2L1QChnE-w%40mail.gmail.__com?utm_medium=email&utm___source=footer
        
<https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCB%2BTeeUmXjjM2eBYbnFLDELt%2BZB-gBfH8L2L1QChnE-w%40mail.gmail.com?utm_medium=email&utm_source=footer>>.

        For more options, visit https://groups.google.com/d/__optout
        <https://groups.google.com/d/optout>.





--
*Marcus Ottosson*
[email protected] <mailto:[email protected]>

--
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/5329DB11.8070904%40hybride.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to