diff --git a/src/Editor/CSceneViewport.cpp b/src/Editor/CSceneViewport.cpp index 7a89b559..4594bc13 100644 --- a/src/Editor/CSceneViewport.cpp +++ b/src/Editor/CSceneViewport.cpp @@ -3,6 +3,7 @@ #include "Editor/Undo/UndoCommands.h" #include #include +#include #include CSceneViewport::CSceneViewport(QWidget *pParent) @@ -344,7 +345,32 @@ void CSceneViewport::OnHideLayer() void CSceneViewport::OnUnhideAll() { - // implement when scene iterator is implemented! + CSceneIterator it(mpScene, eScriptNode | eLightNode, true); + + while (!it.DoneIterating()) + { + if (!it->IsVisible()) + { + if (it->NodeType() == eLightNode) + it->SetVisible(true); + + else + { + CScriptNode *pScript = static_cast(*it); + + if (!pScript->MarkedVisible()) + pScript->SetVisible(true); + + else + { + pScript->Template()->SetVisible(true); + pScript->Object()->Layer()->SetVisible(true); + } + } + } + + ++it; + } } void CSceneViewport::OnContextMenuClose()