PDA

View Full Version : Detect ngons


EdgarM
11-28-2010, 05:03 AM
Hello,
Is there a script that will quickly detect all 5+ sided polies on that mesh?
I think there is such a function in maya but it's rather hard to use, I'd love something that only requires one click.
Thanks

NaughtyNathan
11-28-2010, 11:45 AM
when you say "detect" what do you mean exactly?

do you want 5+ sided polys to be selected? do you want their names returned in an array? or do you want them simply to be highlighted in the viewport?

Mesh > Poly Cleanup... does this perfectly well. if you run it with:

Select Matching Polygons and:
Apply to Selected Objects and:
Faces with more than 4 sides

turned ON and everything else turned off you get this behaviour. If you want it in a one button click you simply look at what is out put in the Script Editor when you Apply this function and then paste or drag that MEL code onto a shelf button:
polyCleanupArgList 3 { "0","2","1","0","1","0","0","0","0","0","0","0","0","0","0","-1","0" };
:nathaN

r4inm4ker
11-29-2010, 01:39 AM
yes.


polySelectConstraint -mode 3 -type 0x0008 -size 3;
polySelectConstraint -disable;


this two-line-script will select 5+ sided polygons for you. Select the mesh before executing it.

CGTalk Moderation
11-29-2010, 01:40 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.