views:

33

answers:

2

How to programatically assign random colors to objects in 3ds max?

+1  A: 

This is what I found online as a solution:

for o in $* do
(
o.wirecolor = random white black
)
relima
+1  A: 

That works well if you just want to assign a random wire color. Here is some code for creating a standard material with a random diffuse color.

for o in $* do 
( 
  m = standard
  m.diffuse = random white black 
  o.material = m
) 
cdiggins
Thank you very much for this. I didn't know how to do it!
relima