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?
Forum topic · General Scripting
By ohls · 2010-01-31
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?
Anubis · 2010-02-01
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
)