History

Move localLightingEnabled to LightClusteringConfig

Ada committed 11 months ago

Commit 7d7c2221 parent 9ebd0e08 files · +30 −32Browse files

Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 8 files). Show all

Unified · Split

interface/src/scripting/RenderScriptingInterface.cpp+7−1
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #include "ScreenName.h"
2121
2222 #include <procedural/Procedural.h>
23+#include "LightClusters.h"
2324
2425 STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){
2526 auto scriptEngine = manager->engine().get();
@@ -261,7 +262,12 @@ void RenderScriptingInterface::forceLocalLightingEnabled(bool enabled) { · 235 unmodified lines
261262 _localLightingSetting.set(enabled);
262263 Menu::getInstance()->setIsOptionChecked(MenuOption::LocalLights, enabled);
263264
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+ }
265271 });
266272 }
267273

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t