Notifications
Clear all
[Closed] random wire, eight colours
Jul 02, 2014 2:30 pm
hey, im have trouble writing a script which will apply random wire colours out of these eight colours.
black (0,0,0)
red (255,0,0)
green(0,255,0)
blue(0,0,255)
Magenta(255,0,255)
yellow(255,255,0)
cyan(0,255,255)
white (255,255,255)
sorry i know there’s loads of scripts on random wire colours but i cant seem to figure out how to have it for just these eight colours.
I want the script is cycle through these eight colours applying them randomly to each mesh object
many thanks in advance!
2 Replies
Jul 02, 2014 2:30 pm
Store the colors in an array and pick a random array item, like this:
colorArray = #(black, white, red, green, blue)
for obj in selection do obj.wireColor = colorArray[random 1 colorArray.count]
1 Reply