Automatically change layer colors for large sets of layers

Anyone have a quick way to automatically change the color of a v.large # of layers according to a simple color order? Ie: Select a set of 100 layers, push a button and Rhino goes through the whole color rainbow, assigning each layer a different color than the last. OR maybe we give this routine a color range and it cycles through that range of colors continuously until getting to end of the layer list.

v5

thanks,
Robert

1 Like

I have several scripts for this:

InterpColorRangeAllLayers.py (1.4 KB)
InterpColorRangeSelLayers.py (1.5 KB)
InterpSatColorRangeSelLayers.py (2.1 KB)
RandomColorAllLayers.py (409 Bytes)
RandomColorLayers.py (869 Bytes)

1 Like

Great! Thank you Mitch!

Hi Mitch,
I get this error for all those scripts:
image

Edit: I commented out all “rs.EnableRedraw(False)” calls and they work fine now.

Hey Marc, hmm, OK, let me check - no, seems to work correctly here… How are you running these scripts?

Yeah, that’s the line where it’s erroring out, it cuts the redraw so you don’t have to wait while the screen redraws for each layer, but that line is 100% correct, so something may be weird chez toi…

image