Hi,
Just wondering if there is a way to apply a basic satin (octane) material to a bunch of layers based on that layers colour without going through and having to create a material for every layer?
Is this something that can be scripted?
Hi,
Just wondering if there is a way to apply a basic satin (octane) material to a bunch of layers based on that layers colour without going through and having to create a material for every layer?
Is this something that can be scripted?
For Rhino materials, use the SynchronizeRenderColors command. I can’t speak for Octane…
Thanks Dale. That’s a top tip.
Now if only I could arrange my materials by name and save out entire material libraries!
is it possible to synchronize the other way? Set the layer color the same as the material color?
Hi Thomas,
There is no Rhino command that will do this. But I’m sure a script could be written to do this.
What would do you do when you find renderable objects with different materials on the same layer? When render color “wins?”
I suppose that the layer always wins. I set the render settings always by layer not by object.
Hi Dale,
Just wondering what the command to reverse this option might be? Like, to revert back to their previous material?
-Jeremy
A post was split to a new topic: How to set display colours to material colours
Hello- see if this script does what you need -
import rhinoscriptsyntax as rs
def MaterialColorMatchToObject():
ids = rs.GetObjects("Select objects",preselect=True)
if not ids:return
for id in ids:
idx = rs.ObjectMaterialIndex(id)
if idx == -1:
idx = rs.AddMaterialToObject(id)
color = rs.ObjectColor(id)
rs.MaterialColor(idx, color)
if __name__ == '__main__':
MaterialColorMatchToObject()
-Pascal