not all verts in selection appear in list when I do ls -sl

not all verts in selection appear in list when I do ls -sl

johnkeates2865
Advocate Advocate
640 Views
4 Replies
Message 1 of 5

not all verts in selection appear in list when I do ls -sl

johnkeates2865
Advocate
Advocate

When I use ls -sl in MEL with a vertex selection, not all the verts are listed.

 

Do this:

 

>Create a SoccerBall poly shape and smooth it once.

 

>Select one of the verts which has six edges coming off it.

 

>Grow the selection ("shift" + ">").

 

>type the ls -sl MEL command. 

 

When I do this, 12 verts are listed when there should be 13. Why?

 

Also, a lot of the selected verts are listed together (eg. "pSolid1.vtx[112:114]"). Why is this? I got around this by tokenizing but it is annoying.

 

Is there a better way to get a list of the selected verts?

0 Likes
Accepted solutions (1)
641 Views
4 Replies
Replies (4)
Message 2 of 5

mspeer
Consultant
Consultant

Hi!

 

Here they are listed all.

"[112:114]" does not mean 112 + 114, instead it means from 112 up to 114, so this selection includes 3 vertices.

 

0 Likes
Message 3 of 5

johnkeates2865
Advocate
Advocate

Ah! so I need to make my script take that into account. Shouldn't be too hard. Is there an example of this code somewhere?

0 Likes
Message 4 of 5

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

Try the following, that should return what you want:

 

ls -sl -fl;

or

print (`ls -sl -fl`);

 

Message 5 of 5

johnkeates2865
Advocate
Advocate

Thanks! the -fl tag works like a charm.

0 Likes