Is there a way to select every other face in maya

Is there a way to select every other face in maya

Anonymous
Not applicable
13,707 Views
13 Replies
Message 1 of 14

Is there a way to select every other face in maya

Anonymous
Not applicable

Bonus tools doesnt work, and I dont feel like spending a whole week to figure out how to script a tool for something so stupid that EVERY other 3d program has.

13,708 Views
13 Replies
Replies (13)
Message 2 of 14

mspeer
Consultant
Consultant

Hi!

No, in Maya (up to Maya 2017) there is no procedural selection type like select every nth component.

You may post this to the Ideas for Maya section (Help -> Speak Back)

0 Likes
Message 3 of 14

Anonymous
Not applicable

Hi!

 

What do you mean exactly by this? Are you talking about selecting the faces of an object except one? For example, a cube has 6 faces (if you don't have any subdivisions), if you wish to select all but 1 face you can position your screen so you can left click and drag over all faces except one, or use the shift key and click each face separately while holding down shift.

 

Sorry if this isn't what you meant. If your looking something that's a little more intuitive and easy then yeah I'd suggest Bonus Tools, but looks like you haven't had much luck.

 

Happy mayaing!

0 Likes
Message 4 of 14

Anonymous
Not applicable
If you start off the pattern of faces you'd like to select, then you can try using 'Select > Similar' to continue the selection pattern. You can also refine the similarity tolerance to refine your selection. Hope this helps.
Message 5 of 14

syracoj
Autodesk
Autodesk

Sorry for being so late to this party.

And...there may be a hidden way to do this in the modeling toolkit that I am not aware of. There is lots in Maya that is hidden...

 

But for faces, what could be done is you could select a loop of faces then run the following:

 

source getFaces;
string $selectedFaces[] = `getFaces`;
int $x;
for($x = 0; $x < size($selectedFaces); $x++){
    if( ($x % 2) == 0 ){
        select -deselect $selectedFaces[$x];
    }
}

^ the above code could be added to the shelf.

 

to invert, just hold down shift and select the currently selected faces and it will select the unselected faces and deselect the currently selected faces.

 

Message 6 of 14

syracoj
Autodesk
Autodesk

hmm...

this will work on primitive objects but once the face count changes this may fail. May need to revisit with a different solution. Will also talk to the team about finally getting a pure solution for this built into Maya other than a script approach or bonus tool.

0 Likes
Message 7 of 14

mspeer
Consultant
Consultant

Hi!

 

@syracoj 

As far as i know currently the only option for something like this is polySelect with -everyN, which is very limited and of course not procedural.

Hopefully Bifrost Graph will help with this in future.

0 Likes
Message 8 of 14

malcolm_341
Collaborator
Collaborator

Wow, thanks a lot I've been trying to figure out how to do this in Mel for a while now, going to see if I can use this technique to get my script working for verts and faces. I see everyone's figured out how to do it in Python, but this is the first time I've seen it done in Mel.

0 Likes
Message 9 of 14

syracoj
Autodesk
Autodesk

be advised malcom_341 that that mel approach will not work once the topology changes. So it's not a very good workaround.

0 Likes
Message 10 of 14

malcolm_341
Collaborator
Collaborator

Well that's a major problem, any suggestion for making this work on something other than a primitive?

0 Likes
Message 11 of 14

ewu77A7V
Observer
Observer
THANK YOU!!!!!
0 Likes
Message 12 of 14

malcolm_341
Collaborator
Collaborator

Doesn't work on anything other than a primitive.

0 Likes
Message 13 of 14

syracoj
Autodesk
Autodesk

@malcolm_341 wrote:

Doesn't work on anything other than a primitive.


Yes, the script was only written to target poly faces. 

It really isn't a great solution either because once you make modifications to the geometry the face reordering prevents it from working properly. We should really look at putting in a properly implemented selection tool that does this.

Message 14 of 14

malcolm_341
Collaborator
Collaborator

Agree.