I want to generate objects with diffrent colours but same material properties?

I have a maxscript that's generates objects. But I want the objects in different colour but with same material properties

Can a script take a material from material editor and copy this and change colour or do I use multi map?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

If I 'see' correct what you

If I 'see' correct what you ask for, try this:

-- I'll assume that objects are selected
for obj in selection do
(
    obj.material = copy meditMaterials[1] -- assign a copy from slot 1
    obj.material.diffuse = random black white -- generate random diffuse color
)

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.