diff options
author | Määttä Antti <antti.maatta@qt.io> | 2018-06-14 09:51:59 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2018-08-01 05:54:01 +0000 |
commit | 4a01cf373171853126e39502e13ec645964d4110 (patch) | |
tree | 029172399d20efc5628005743a16e62af753b2e9 /src/Authoring/Studio/Render/StudioRenderer.cpp | |
parent | 825651b6e975ffbc1069c0d747018fff2f232cb7 (diff) |
Implement scene lighting toggle
Task-number: QT3DS-1653
Change-Id: I6b9f4c2461ae7371603d3e721a965f9c9cb520f0
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRenderer.cpp')
-rw-r--r-- | src/Authoring/Studio/Render/StudioRenderer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Authoring/Studio/Render/StudioRenderer.cpp b/src/Authoring/Studio/Render/StudioRenderer.cpp index cee03111..a54cd47c 100644 --- a/src/Authoring/Studio/Render/StudioRenderer.cpp +++ b/src/Authoring/Studio/Render/StudioRenderer.cpp @@ -424,11 +424,9 @@ struct SRendererImpl : public IStudioRenderer, for (QT3DSU32 idx = 0; idx < g_NumEditCameras; ++idx) outCameras.push_back(g_EditCameraDefinitions[idx].m_Name); } - void SetEnableEditLight(bool inEnableLight) override + void SetPolygonFillModeEnabled(bool inEnableLight) override { CStudioPreferences::SetEditViewFillMode(inEnableLight); - if (m_Translation) - m_Translation->m_EditLightEnabled = inEnableLight; RequestRender(); } @@ -473,7 +471,7 @@ struct SRendererImpl : public IStudioRenderer, return -1; } - bool IsEditLightEnabled() const override + bool IsPolygonFillModeEnabled() const override { return GetEditCamera() >= 0 && CStudioPreferences::GetEditViewFillMode(); } @@ -645,7 +643,6 @@ struct SRendererImpl : public IStudioRenderer, if (m_Context.mPtr) { m_Translation = std::make_shared<STranslation>(std::ref(*this), std::ref(*m_Context.mPtr)); - m_Translation->m_EditLightEnabled = CStudioPreferences::GetEditViewFillMode(); ApplyEditCameraIndex(); SetTranslationViewport(); } |