Hi! I need to select multiple object vertices. They all share the same number of vertex, but the names are different.
I guess it should be pretty straight forward short MEL script - select vtx nr 5 for all selected objects, but my MEL skills are non existing.
Or maybe there's another way to do it?
Thanks!
Replies
select -r ($object + ".vtx[5]") ;
doesn't work?
It seems to not work. yet
I did some corrections to the previous sprunghunt's line and i got something that works with one vertex
select -r $obj.vtx[5] ;
I could not get the multiple vertex selection with this one line, so i scrolled some forums and came up with this:
string $sel[] = `ls -sl`;
string $obj;
for ($obj in $sel)
{
select -r $sel.vtx[10] ;
select -add $sel.vtx[20] ;
select -add $sel.vtx[70] ;
//select -add $sel.vtx[addYourNumberOrDELETEme] ;
}
select -d $sel ;
It does the job for now, but i'd like to bring it a bit further and learn how to mel 101.
Few things right off the bat:
1. after selecting vertex - deselect $obj, but keep vertex selection -edit- i just simply put select -d $sel ; in the end of the ecript and now it does that.
2. If -add.vtx value is higher than number of vertices on object, then currently it selects the highest number there is. I'd like to keep that number unselected, if there is no such vertex or give a error message that the number added is too high.
3. I can not manually deselect any vertex if needed
corrected the sprunghunt's code a bit select -r $obj .vtx[5] ;
i could not get multiple vertex selection with it so i did some searching.
anyways, here's the script i did after a little bit of scrolling through the internet. mix and match