Auto-assign materials


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!

Hi Andrew - see if the attached python does what you need - (580 Bytes)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


Hey thank you, I will try and be back if any issues!

  • andrew

There is also the SynchronizeRenderColors command.

— Dale

This video doesn’t show what I asked. And there is no explanation. So it is not relevant.

Looks like you have some GH skills maybe post this on the GH forum?

great I’ll try that too!

that’s very helpful. Is there any option or an automatic way for the material names to be the same as the layer names and not custom1, custom2…etc. The most reliable way to work with live render software is to organize the scene by material. When modelling we organize by layer. It makes sense for the material name to be the same as the layer name.