locator1
  |- locator2
    |- locator3
  |- locator4
    |- locator5
    |- locator6
  |- locator7
    |- locator8
    |- locator9
    |- locator10
import maya.cmds as cmds
sel = cmds.ls(sl=True)
print sel
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9008456d-acf4-4c9f-80ab-229972aafb6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9008456d-acf4-4c9f-80ab-229972aafb6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Bests,madoodia
but when i select just locator2 and run your code it give me [u'locator2'] not its children with fullpath. :)
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9008456d-acf4-4c9f-80ab-229972aafb6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Bests,madoodia--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5898840d-82ee-458f-8b17-e9b0839288e2%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
i did
this is the result [u'locator2', u'locator3']
restart maya and create a new scene, create locator1 and duplicate it a few times then parent together as you want then test the code again
Select both locator2 and locator3 instead
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a1a0fe74-e99d-4904-9e59-3763df856c4e%40googlegroups.com.
if you use long (l) flag, it will return fullpath
import maya.cmds as cmds
sel = cmds.ls(sl=True, l=True)
print sel
result: [u'|locator1|locator2', u'|locator1|locator2|locator3']
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7d2e19c2-0684-4eca-a78c-1013c3fc68c6%40googlegroups.com.
my tree in outliner is like this
>locator1
--->locator2
---->locator3
and cmds.ls('locator3', l=True) give me this result: [u'|locator1|locator2|locator3']
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAD65uqnpGe1EOkZm3rvHNQ-AZ%2BaF9VReLdGDiDu_FU%2BiWPc6vQ%40mail.gmail.com.
Nicolas, based on his first post he don’t have locator3 another place
locator1
|- locator2
|- locator3
|- locator4
|- locator5
|- locator6
|- locator7
|- locator8
|- locator9
|- locator10
but if have another one yes he will get full path of that he selected