ReTiCo
ReTiCo copied to clipboard
assign random object color but same for instances
need to take into account instances (so they get same color):
import bpy
import random
def returnRandColor():
return random.randrange(0, 1000000) / 1000000
for obj in bpy.context.selected_objects:
obj.color = (returnRandColor(), returnRandColor(), returnRandColor(), 1)
https://github.com/Vinc3r/Blender-Python-Snippets/blob/master/blender-2.8%2B/random-color-on-selected.py
also useful for wireframe > object color