Assuming your selections list are proper full paths, what about something
like this:

selections = [
'|path|to|my|node',
]

for node in set(selections):
item = node
while item:
print item
item = item.rsplit('|', 1)[0]


On Fri, Sep 14, 2018 at 9:01 AM yann19 <yangki...@gmail.com> wrote:

> Possible to do it not without the use of pymel?
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/cc239786-e3dc-4fc1-8bac-5181846b3274%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/cc239786-e3dc-4fc1-8bac-5181846b3274%40googlegroups.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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3oJ_1dQZOtwksgDK18e58OFaSLG%2B_7CmXNFs0CC1-QzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to