Cool VL Viewer forum http://sldev.free.fr/forum/ |
|
Lua Windlight Settings http://sldev.free.fr/forum/viewtopic.php?f=5&t=2114 |
Page 1 of 1 |
Author: | Catten [ 2021-01-26 21:01:26 ] |
Post subject: | Lua Windlight Settings |
Question. Is there a way to change the viewers Windlight Settings from Lua without 'use local environment' getting toggled on? |
Author: | Henri Beauchamp [ 2021-01-27 00:07:21 ] |
Post subject: | Re: Lua Windlight Settings |
No, because all settings applied via Lua (or RestrainedLove @setenv) are either EE settings (from the inventory Settings folder) or Windlight settings translated into EE settings, even in Windlight rendering mode. |
Author: | Catten [ 2021-01-27 08:57:01 ] |
Post subject: | Re: Lua Windlight Settings |
Ah ok. I will try some detection on changes and override. If you get the time, exposing 'Use Local Environment' from the environment settings to the debug settings, would be nice, but it's just a nice to have. I'll figure out another solution. |
Author: | Henri Beauchamp [ 2021-01-27 09:15:07 ] | |||||||||
Post subject: | Re: Lua Windlight Settings | |||||||||
|
Author: | Catten [ 2021-01-27 09:19:14 ] |
Post subject: | Re: Lua Windlight Settings |
Ah ok, no problem |
Author: | ZaneZimer [ 2021-01-27 12:47:08 ] |
Post subject: | Re: Lua Windlight Settings |
I was playing around in this area a bit last night and noticed that when region/estate time is toggled off, no OnWindlightChange event is fired. I wasn't sure if there should be though. Would it be useful to know when the environment was set back to default? |
Author: | Henri Beauchamp [ 2021-01-27 13:29:18 ] | |||||||||
Post subject: | Re: Lua Windlight Settings | |||||||||
Care to give reproduction steps ?... Unless it is triggered from Lua itself (in which case OnWindlightChange() is not called to prevent infinite recursions), the toggling off of region/estate time does result in an event being posted (with either "sunrise", noon", "sunset", "midnight" or "local" pseudo sky settings names passed, depending on which setting you choose from the viewer main menu, or with the appropriate Windlight settings name when the sky is changed from the Windlight floater). |
Author: | ZaneZimer [ 2021-01-27 14:38:20 ] | |||||||||
Post subject: | Re: Lua Windlight Settings | |||||||||
Also, I understand the above conversation about 'Use local environment' being set when using the Lua functions. Should that also be the case when using WL render and selecting a preset from the Windlight Editor dialog? I've just been confused by the difference in menu options when I chose, say, 'Coastal Afternoon' from the dialog or do ApplySkySettings('Coastal Afternoon') from within my Lua script. |
Author: | Henri Beauchamp [ 2021-01-27 17:15:11 ] | ||||||||||||||||||
Post subject: | Re: Lua Windlight Settings | ||||||||||||||||||
The Windlight editor floater, on its side, only applies to the Windlight settings (just like the EE settings editor only applies to the EE settings); in WL rendering mode, it directly affects the environment, but in EE rendering mode, you must press its "Preview frame" button so that the WL settings are translated into local (and fixed) EE settings that are then applied to the EE renderer. |
Author: | ZaneZimer [ 2021-01-27 18:38:37 ] | |||||||||
Post subject: | Re: Lua Windlight Settings | |||||||||
![]() |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |