Have a look at passing objectsOnly=True to the ls() function.

> On 20 Sep 2016, at 21:14, I73 <wesley.keel...@iugome.com> wrote:
> 
>       selectedObject = cmds.ls( selection=True)
>       dagObject = selectedObject[0].split('.')[0]
>       cmds.select(dagObject)
> 
> Currently I am able to return the dag object by using a split method, is 
> there a cleaner way of doing this?
> -- 
> 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/b36e49be-3d5b-4969-8175-c6468b3acd18%40googlegroups.com.
> 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/0BA1BC98-E165-42B1-832D-C637D77CECE4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to