Auto-assign materials

Hi,

I need to automatically assign materials to layers so it can be picked up by my rendering software (lumion)

Is there a way to automatically assign custom materials to layers?

It doesn’t matter what they are they just all need to be unique so I can assign materials later when rendering. Just a colour is fine. It’s just very time consuming otherwise.

Thank you!
Andrew