Skylight turn on with script or shortcut?

Hello everyone,

Can be Skylight accessible through keyboard shortcut or script, to toggle it ON or OFF in RH7 ?

I tried to do it with custom display mode, where I turned on Ambient Occlusion but it doesnt´t look the same like skylight. With AO, some shadows on the objects are gone instead of using skylight from the bottom panel.

Any idea how to do this ?

Thanks for help

Tom

Hi Tom,

There’s no Skylight command, but that checkbox in the Rendering panel is scriptable. This macro flips it on/off each time you run it:

! _-RunPythonScript (import scriptcontext as sc; sc.doc.Lights.Skylight.Enabled = not sc.doc.Lights.Skylight.Enabled)

To put it on a key, go to Options > Keyboard, pick an F-key or combo and paste the macro in. Same macro works as an alias (Options > Aliases) or on a toolbar button. Works in RH7.

That toggles the actual document skylight, so Rendered mode picks it up right away — no custom display mode tricks needed.

more background here if you’re curious: Skylight on/off from macros/scripts?

Wow ! Thank You so much it is working now ! you are god.

Thanks a lot