3D rotation by MaxScript

This two lines, MaxScript came in handy when I was modeling north facade of my hospital! (Architectural Design 4)

The first line defines a For Loop, iterates over selected object and executes second line commands. The second line rotate x object randomly around its Z axis.

Just copy and paste following script into your text editor and save it as .ms file. Then select objects and run the MaxScript file.

[btcode title=”max script” lang=”maxscript”]
for x in selection do
(rotate x (eulerAngles (0) (0) (random -360 360)))