Modify this pivot-to-face code so that it can be used for multiple selection at once
Please see this code (which I found http://www.scriptspot.com/forums/3ds-max/general-scripting/align-pivot from 2012)
Also, by some reason, the pivot changes to something else when the code is run a second time.
So if the method can be done better, please just improve it. Thanks!
(ps, I removed the mxs/code tag because it messed up the text by some reason..)
fn RotatePivotOnly obj index=
rot = (matrixFromNormal (polyop.getFaceNormal obj index)*obj.transform ) as quat
animate off in coordsys local obj.rotation*=RotValInv
for a in selection do
theNormal=polyop.getFaceNormal a 1
RotatePivotOnly a 1