help selecting only vertical faces in scene or object

Im using 3ds max
basically i have alot of boxes as one object and i want to select only the sides and not the top and bottom in edit poly. i also need to be able to select only the tops so either one would help then i can just use invert selection for the others i guess.
if anyone can point me towards a script or anything that can help me with creating one thx in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

as long as it works ;)

as long as it works ;)

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Graph's picture

couldve done that yourself

that rlly is a simple modification you couldve done yourself quickly ;)

(
   local deg = 45  /* defines the max angleDiff to straight up for selection */
 
   local dir = 	polyop.getFaceNormal selection[1] ((polyop.getFaceSelection selection[1])as array)[1] node:selection[1]
 
   --------------------------------------------------------------------------
   --------------------------------------------------------------------------
 
   with undo on
   (
      for Obj in selection as array where isValidNode Obj AND superclassOf Obj == geometryClass do
      (
         polyop.setFaceSelection Obj  ((for f = 1 to Obj.numFaces collect (if acos (dot (polyOp.getFaceNormal Obj f node:Obj) dir) < deg then f else dontcollect)) as bitArray) 
      )
   )
   completeRedraw()
)--END local

Raphael 'Insanto' Steves
http://Graph.Net84.Net

titane357's picture

Thanks ! :-) Don't forget

Thanks ! :-)
Don't forget that nothing is really simple for me !

titane357's picture

I tried the script and

I tried the script and something strange : to select same orientation face u must have a "0.1" value : "0" don't select all faces that it should !....

thp777's picture

wow

That worked perfectly.
Thank you so much.
would have taken me forever to figure that out.
Thanks again.

Graph's picture

test it on a sphere ;) (

test it on a sphere ;)

(
   local deg = 45  /* defines the max angleDiff to straight up for selection */
 
   --------------------------------------------------------------------------
   --------------------------------------------------------------------------
 
   with undo on
   (
      for Obj in selection as array where isValidNode Obj AND superclassOf Obj == geometryClass do
      (
         polyop.setFaceSelection Obj  ((for f = 1 to Obj.numFaces collect (if acos (dot (polyOp.getFaceNormal Obj f node:Obj) [0,0,1]) < deg OR acos (dot (polyOp.getFaceNormal Obj f node:Obj) [0,0,-1]) < deg  then f else 1)) as bitArray) 
      )
   )
   completeRedraw()
)--END local

Raphael 'Insanto' Steves
http://Graph.Net84.Net

titane357's picture

ohhh ! It would be great if

ohhh ! It would be great if you could make a script to select all faces oriented like the selected face modulo a value that we can specify... It would be very helpfull ! :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.