Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stephensmitchell/abaa134b71d419536ffc9c000a7917b0 to your computer and use it in GitHub Desktop.
Save stephensmitchell/abaa134b71d419536ffc9c000a7917b0 to your computer and use it in GitHub Desktop.
Small example method to edit Rhino light properties
private void RunScript(Guid id, Color col, double pow, ref object A)
{
Rhino.DocObjects.ObjRef obj = new Rhino.DocObjects.ObjRef(id);
Rhino.DocObjects.LightObject lobj = obj.Object() as Rhino.DocObjects.LightObject;
lobj.LightGeometry.Diffuse = col;
lobj.LightGeometry.Intensity = pow;
lobj.CommitChanges();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment