how to conver maya range to python list ?

22 views
Skip to first unread message

data...@gmail.com

unread,
May 8, 2014, 4:56:45 AM5/8/14
to python_in...@googlegroups.com
How to expand ranges returned by maya ls command ?
e.g I want to convert u'SomeShape.e[0:100]' to u'SomeShape.e[0]', u'SomeShape.e[1]', u'SomeShape.e[2] e.t.c'

damon shelton

unread,
May 8, 2014, 7:28:13 PM5/8/14
to python_in...@googlegroups.com

Use the flatten flag.
Cmds.ls (flatten=True)

I would suggest looking into the maya commands documentation.

On May 8, 2014 4:13 PM, <data...@gmail.com> wrote:
How to expand ranges returned by maya ls command ?
e.g I want to convert u'SomeShape.e[0:100]' to u'SomeShape.e[0]', u'SomeShape.e[1]', u'SomeShape.e[2] e.t.c'

--
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/330f7455-7406-42e8-a51c-25631baae0fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages