PolySelectTraverse Python equivalent?

PolySelectTraverse Python equivalent?

Anonymous
Not applicable
3,855 Views
2 Replies
Message 1 of 3

PolySelectTraverse Python equivalent?

Anonymous
Not applicable

So if you grow/shrink a selection with 'shift + , or shift + ,' Maya will output "select `ls -sl`;PolySelectTraverse 1;select `ls -sl`;", I'm interested in the PolySelectTraverse part since I'm certain it's the function shrinking or growing the selection. Problem is, this function doesn't exist in the MEL and Python API.

 

Is the function known as something else? Is it not a function at all? If so, then what's responsible for the growing and shrinking?

0 Likes
Accepted solutions (1)
3,856 Views
2 Replies
Replies (2)
Message 2 of 3

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

It is implemented in PolySelectTraverse.mel.

 

You could check the script file for how it works. If you would like to call it in Python, you could use mel.eval.

 

Yours,

Li

0 Likes
Message 3 of 3

forrest.brent
Enthusiast
Enthusiast

To actually answer your question:

 

mel.eval('PolySelectTraverse 1')
#expand selection including diagonals
mel.eval('PolySelectTraverse 2')
#contract selection including diagonals
mel.eval('PolySelectTraverse 3')
#select only the border of what you've got
mel.eval('PolySelectTraverse 4')
#not sure, maybe does something with vertices
mel.eval('PolySelectTraverse 5')
#expand selection excluding diagonals
mel.eval('PolySelectTraverse 6')
#contract selection excluding diagonals

7 8 and 9 don't seem to do anything but they don't return any errors either.