History

RenderSecondView shadow config follows that of RenderMainView

Andrew Meadows committed 7 years ago

Commit 8aa1bdd1 parent 95f00e21 file · +8 −1Browse files

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

Unified · Split

interface/src/scripting/RenderScriptingInterface.cpp+8−1
@@ -82,11 +82,18 @@ void RenderScriptingInterface::forceShadowsEnabled(bool enabled) { · 81 unmodified lines
8282 _shadowsEnabled = (enabled);
8383 _shadowsEnabledSetting.set(enabled);
8484
85− auto lightingModelConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<MakeLightingModel>("RenderMainView.LightingModel");
85+ auto renderConfig = qApp->getRenderEngine()->getConfiguration();
86+ assert(renderConfig);
87+ auto lightingModelConfig = renderConfig->getConfig<MakeLightingModel>("RenderMainView.LightingModel");
8688 if (lightingModelConfig) {
8789 Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
8890 lightingModelConfig->setShadow(enabled);
8991 }
92+ auto secondaryLightingModelConfig = renderConfig->getConfig<MakeLightingModel>("RenderSecondView.LightingModel");
93+ if (secondaryLightingModelConfig) {
94+ Menu::getInstance()->setIsOptionChecked(MenuOption::Shadows, enabled);
95+ secondaryLightingModelConfig->setShadow(enabled);
96+ }
9097 });
9198 }
9299