Hi,
i’m using a script to randomize wire colors of some objects. And i’d like to assign them material with the colors randomized.
Is there a way to get the wire color of an object as a diffuse color for the mat ?
or is there a way to randomize the diffuse color of , say, a multi sub mat ?
(
for o in getCurrentSelection() do (
-- Assign a random wirecolor
local randomColor = color (random 0 255) (random 0 255) (random 0 255)
o.wirecolor = randomColor
-- Assign a material with the random color
o.material = VRayMtl diffuse:randomColor
)
)
With this you have options for random color per Material ID or Object. This option will also give you control over the spectrum the random colors are drawn from.