emrahgunduz
always eats his vegetables
Blog RSS Feed
  • twitter
  • friendfeed
  • linkedin
  • facebook
  • vimeo
  • flickr
  • lastfm

Random Color Maxscript

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.

Download Random Color

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:

  • Install by drag dropping
  • The tool pops up
  • Random RGB colors
  • Random green
  • Random blue
  • Random red
  • Random grey tones

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  

This post's short url is: http://emrg.me/5m

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <span style=""> <p> <li> <ol>

Calendar

May 2012
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  
Web Analytics
Author: Emrah Gunduz