Help - Cycles settings

hi @nathanletwory,

reviving this topic as I ran into similar issue trying to control the skylight degradation during the script runtime. I am trying to set the degradation at the beginning of the script, and then set it back to “1” after the script ends. The problem is, any changes made to the advanced options don’t take effect until the script finishes. SavePluginSettings doesn’t seem to help to force the change in settings to be picked up in script runtime. Do you have any suggestions how to make it work instantly?

    import Rhino
    import rhinoscriptsyntax as rs

    settings = Rhino.PlugIns.PlugIn.GetPluginSettings(Rhino.RhinoApp.CurrentRhinoId, False)
    s = settings.GetChild("Options").GetChild("OpenGL")

    s.SetInteger("SkylightShadowResolutionScale", 3)
    Rhino.PlugIns.PlugIn.SavePluginSettings(Rhino.RhinoApp.CurrentRhinoId)
    print "setting to 3"
    rs.Sleep(1000)
    s.SetInteger("SkylightShadowResolutionScale", 2)
    Rhino.PlugIns.PlugIn.SavePluginSettings(Rhino.RhinoApp.CurrentRhinoId)
    print "setting to 2"
    rs.Sleep(1000)
    s.SetInteger("SkylightShadowResolutionScale", 1)
    Rhino.PlugIns.PlugIn.SavePluginSettings(Rhino.RhinoApp.CurrentRhinoId)
    print "setting to 1"
    rs.Sleep(1000)