I have an if statement that I want to use to see if the object is selected or the polygon face is selected, when I use the right click menu to switch to face mode it appears to mess up the -q -polymeshFace and it will return true even though I'm in object mode. Does anyone know how to reliably query if you have faces…
Hey so I figured this out with some help from my friend at work. One reliable way to query if you have a face selected or not is to use gmatch. This is the code that works for me. string $maArray[]; $maArray = `ls -sl`; if(`gmatch $maArray[0] "*.f*"`) { print "Some faces selected"; } else { print "No faces selected"; }
Another way you can do this is by using filterExpand //this gets the faces that are selected - 34 is the filter code for faces<br>string $selectionFaces[] = `filterExpand -sm 34`; <br><br>//test to see if faces are selected<br>if ( size($selectionFaces) == 0 ) {<br> print "no faces selected";<br>}…