Random Color Maxscript
I hate how wire coloring (default color max assigns to objects when they first created) works in max. After working a few hours, all objects start to appear in lots of colors which really distract me. So, a few months back, I wrote a script to color them in gray. For sharing, I changed the script, added a gui and some improvements.
This one can randomly color the selected objects in RGB, or simply red, green, blue or a color of gray. If you need to color every object for ObjectID in post processing, you might need something like this.
Here are some screenshots:
Here is the code, if you want to check it right now :
rollout RCGUI "Random Color v.1.0" width:152 height:136 ( radioButtons RColorCode "Random Color Options" pos:[22,16] width:134 height:62 labels:#("Full color", "Red", "Green", "Blue", "Grey only") columns:2 button RCDo "Colorize" pos:[25,88] width:105 height:24 on RCDo pressed do ( sel = selection as array count = 1 if sel.count > 0 then ( undo on ( while count <= sel.count do ( colorA = random 0 254 colorB = random 0 254 colorC = random 0 254 case RColorCode.state of ( 1: sel[count].wirecolor = [colorA,colorB,colorC] 2: sel[count].wirecolor = [colorA,0,0] 3: sel[count].wirecolor = [0,colorB,0] 4: sel[count].wirecolor = [0,0,colorC] 5: sel[count].wirecolor = [colorA,colorA,colorA] default: sel[count].wirecolor = [colorA,colorB,colorC] ) count += 1 ) ) select sel ) else ( messageBox "You must select at least one or more objects" title:"Random Color" ) ) ) RCFloater = newRolloutFloater "emrahgunduz.com" 170 150 addRollOut RCGUI RCFloater















