RhinoDoc.ActiveDoc.CurrentEnvironment is Obsolete

Hi,

This code is obsolete in Rhino 8.

   if (RhinoDoc.ActiveDoc.CurrentEnvironment.ForLighting.Name == "Studio")
       RenderService.SetDefaultEnvironment();

How can I get into the current environment? ForLighting has been removed?

Thanks,

Rafa

Please use Rhino.Render.RenderSettings methods.