I don’t seem to be able to specify a valid new color in the LayerColor function, i.e. yellow?
Can somebody give me an example please?
Call Rhino.LayerColor(layername, RGB(255,255,0))
or
Rhino.LayerColor layername, RGB(255,255,0)
–Mitch
Thank you Mitch, but when I am trying to use that in a RhinoPython script, Rhino returns the message:
“name ‘RGB’ is not defined”
Ah, sorry. Python…
import rhinoscriptsyntax as rs
rs.LayerColor(layername, (255,255,0))
–Mitch
2 Likes
Thanks again Mitch. I tried that before and thought it did not work. But it does, I just forgot to refresh the Layers panel.
I think this is what I was looking for, thanks a lot !!
Andres
I was going in the wrong direction!!!
This is much better… Thanks Mitch
============= Type: ===============
name = rs.GetString ("Entre nombre: ")
r1 = rs.GetInteger ("Entre rojo: ",255,0,255)
g1 = rs.GetInteger("Entre green: ",0,0,255)
b1 = rs.GetInteger ("Entre blue: ",0,0,255)
rs.AddLayer(name, (r1,g1,b1))