Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 8 files). Show all
Unified · Split
| @@ -20,6 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | #include "ScreenName.h" |
| 21 | 21 | |
| 22 | 22 | #include <procedural/Procedural.h> |
| 23 | +#include "LightClusters.h" | |
| 23 | 24 | |
| 24 | 25 | STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){ |
| 25 | 26 | auto scriptEngine = manager->engine().get(); |
| @@ -261,7 +262,12 @@ void RenderScriptingInterface::forceLocalLightingEnabled(bool enabled) { · 235 unmodified lines | ||
| 261 | 262 | _localLightingSetting.set(enabled); |
| 262 | 263 | Menu::getInstance()->setIsOptionChecked(MenuOption::LocalLights, enabled); |
| 263 | 264 | |
| 264 | − recursivelyUpdateLightingModel("", [enabled] (MakeLightingModelConfig *config) { config->setLocalLighting(enabled); }); | |
| 265 | + auto renderConfig = qApp->getRenderEngine()->getConfiguration(); | |
| 266 | + auto config = renderConfig->getConfig<LightClusteringPass>("LightClustering"); | |
| 267 | + | |
| 268 | + if (config) { | |
| 269 | + config->setLocalLightingEnabled(enabled); | |
| 270 | + } | |
| 265 | 271 | }); |
| 266 | 272 | } |
| 267 | 273 | |