Advertisement
maxdudik

Select N-Gons in Maya

Jun 2nd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //-----------------
  2. // N-gons Select http://nerd.paololazatin.com/select-n-gons-and-tris-in-maya/
  3. //-----------------
  4.  
  5. string $selection[] = `ls -sl`;
  6.  
  7. if ( size($selection) ){
  8. //Change to Component mode to retain object highlighting for better visibility
  9. changeSelectMode -component;
  10. //Change to Face Component Mode
  11. selectType -smp 0 -sme 1 -smf 0 -smu 0 -pv 0 -pe 1 -pf 0 -puv 0;
  12. //Select Object/s and Run Script to highlight N-Gons
  13. polySelectConstraint -mode 3 -type 0x0008 -size 3;
  14. polySelectConstraint -disable;
  15. int $nPolys[] = `polyEvaluate -faceComponent`;
  16. print ("// " + $nPolys[0] + " N-Gon(s) Selected.");
  17. }
  18. else{
  19. print("// No object(s) selected. Make a selection to check for N-Gons.");
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement