Here is my own solution to it. Very useful if you are importing a rhino model into Lumion.
In order to assign each object a different material, Lumion requires you to set a material name for each layer (in Rhino). With this script, you can add material to each layer matching its layer’s name. For instance, if a layer is called ‘Curtain Wall Glass’ then it would get ‘Curtain Wall Glass’ material name. The only downside here is that you have to manually match/rename some materials if you want them to be the same material in Lumion.
import rhinoscriptsyntax as rs
#Set Material Name by Layer Name
layersName = rs.LayerNames()
for i in layersName:
index = rs.LayerMaterialIndex(i)
addMaterial = rs.AddMaterialToLayer(i)
materialName = rs.MaterialName(index, i)