Showing the changes to interface/src/scripting/RenderScriptingInterface.cpp (1 of 9 files). Show all
Unified · Split
| @@ -244,6 +244,27 @@ void RenderScriptingInterface::forceAmbientOcclusionEnabled(bool enabled) { · 243 unmodified lines | |||
| 244 | }); | 244 | }); |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | bool RenderScriptingInterface::getLocalLightingEnabled() const { | ||
| 248 | return _localLightingEnabled; | ||
| 249 | } | ||
| 250 | |||
| 251 | void RenderScriptingInterface::setLocalLightingEnabled(bool enabled) { | ||
| 252 | if (_localLightingEnabled != enabled) { | ||
| 253 | forceLocalLightingEnabled(enabled); | ||
| 254 | emit settingsChanged(); | ||
| 255 | } | ||
| 256 | } | ||
| 257 | |||
| 258 | void RenderScriptingInterface::forceLocalLightingEnabled(bool enabled) { | ||
| 259 | _renderSettingLock.withWriteLock([&] { | ||
| 260 | _localLightingEnabled = (enabled); | ||
| 261 | _localLightingSetting.set(enabled); | ||
| 262 | Menu::getInstance()->setIsOptionChecked(MenuOption::LocalLights, enabled); | ||
| 263 | |||
| 264 | recursivelyUpdateLightingModel("", [enabled] (MakeLightingModelConfig *config) { config->setLocalLighting(enabled); }); | ||
| 265 | }); | ||
| 266 | } | ||
| 267 | |||
| 247 | bool RenderScriptingInterface::getProceduralMaterialsEnabled() const { | 268 | bool RenderScriptingInterface::getProceduralMaterialsEnabled() const { |
| 248 | return _proceduralMaterialsEnabled; | 269 | return _proceduralMaterialsEnabled; |
| 249 | } | 270 | } |