Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions src/WeatherEditor/EditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void EditorWindow::ShowObjectsWindow()
ImGui::Spacing();

// List of categories
const char* categories[] = { "Weather", "ImageSpace", "WorldSpace", "Lighting Template", "Cell Lighting", "Volumetric Lighting", "Shader Particle Geometry", "Lens Flare", "Visual Effect" };
const char* categories[] = { "Weather", "ImageSpace", "Lighting Template", "Cell Lighting", "Volumetric Lighting", "Shader Particle Geometry", "Lens Flare", "Visual Effect" };
for (int i = 0; i < IM_ARRAYSIZE(categories); ++i) {
// Highlight the selected category
if (ImGui::Selectable(categories[i], selectedCategory == categories[i])) {
Expand Down Expand Up @@ -235,7 +235,6 @@ void EditorWindow::ShowObjectsWindow()
if (ImGui::SmallButton(recentIt->second[i].c_str())) {
// Find and open widget in current category's collection
auto& widgets = selectedCategory == "Weather" ? weatherWidgets :
selectedCategory == "WorldSpace" ? worldSpaceWidgets :
selectedCategory == "Lighting Template" ? lightingTemplateWidgets :
selectedCategory == "ImageSpace" ? imageSpaceWidgets :
selectedCategory == "Volumetric Lighting" ? volumetricLightingWidgets :
Expand Down Expand Up @@ -281,7 +280,6 @@ void EditorWindow::ShowObjectsWindow()
// Display objects based on the selected category
std::vector<std::unique_ptr<Widget>> emptyWidgets;
const auto& widgets = selectedCategory == "Weather" ? weatherWidgets :
selectedCategory == "WorldSpace" ? worldSpaceWidgets :
selectedCategory == "Cell Lighting" ? emptyWidgets :
selectedCategory == "ImageSpace" ? imageSpaceWidgets :
selectedCategory == "Volumetric Lighting" ? volumetricLightingWidgets :
Expand Down Expand Up @@ -675,7 +673,6 @@ void EditorWindow::ShowWidgetWindow()

// Draw all open widgets using WidgetFactory template
WidgetFactory::DrawOpenWidgets(weatherWidgets, lastFocusedWidget);
WidgetFactory::DrawOpenWidgets(worldSpaceWidgets, lastFocusedWidget);
WidgetFactory::DrawOpenWidgets(lightingTemplateWidgets, lastFocusedWidget);
WidgetFactory::DrawOpenWidgets(imageSpaceWidgets, lastFocusedWidget);
WidgetFactory::DrawOpenWidgets(volumetricLightingWidgets, lastFocusedWidget);
Expand Down Expand Up @@ -739,16 +736,6 @@ void EditorWindow::RenderUI()
}
}

// WorldSpace widgets
for (auto& widget : worldSpaceWidgets) {
if (widget->IsOpen()) {
hasOpenWidgets = true;
if (ImGui::MenuItem(std::format("Save {}", widget->GetEditorID()).c_str())) {
widget->Save();
}
}
}

// Lighting Template widgets
for (auto& widget : lightingTemplateWidgets) {
if (widget->IsOpen()) {
Expand Down Expand Up @@ -780,9 +767,6 @@ void EditorWindow::RenderUI()
if (ImGui::MenuItem("Close All Weather Widgets")) {
for (auto& widget : weatherWidgets) widget->SetOpen(false);
}
if (ImGui::MenuItem("Close All WorldSpace Widgets")) {
for (auto& widget : worldSpaceWidgets) widget->SetOpen(false);
}
if (ImGui::MenuItem("Close All Lighting Widgets")) {
for (auto& widget : lightingTemplateWidgets) widget->SetOpen(false);
}
Expand Down Expand Up @@ -870,14 +854,6 @@ void EditorWindow::RenderUI()
}
}
}
for (auto& widget : worldSpaceWidgets) {
if (widget->IsOpen()) {
openCount++;
if (ImGui::MenuItem(std::format("WorldSpace: {}", widget->GetEditorID()).c_str())) {
// Focus window
}
}
}
for (auto& widget : lightingTemplateWidgets) {
if (widget->IsOpen()) {
openCount++;
Expand Down Expand Up @@ -922,7 +898,6 @@ void EditorWindow::RenderUI()
ImGui::Separator();
ImGui::Text("Total Objects:");
ImGui::BulletText("Weathers: %d", (int)weatherWidgets.size());
ImGui::BulletText("WorldSpaces: %d", (int)worldSpaceWidgets.size());
ImGui::BulletText("Lighting: %d", (int)lightingTemplateWidgets.size());
ImGui::BulletText("ImageSpaces: %d", (int)imageSpaceWidgets.size());
ImGui::Separator();
Expand Down Expand Up @@ -1128,7 +1103,6 @@ EditorWindow::~EditorWindow()
{
delete tempTexture;
weatherWidgets.clear();
worldSpaceWidgets.clear();
lightingTemplateWidgets.clear();
imageSpaceWidgets.clear();
volumetricLightingWidgets.clear();
Expand All @@ -1146,7 +1120,6 @@ void EditorWindow::SetupResources()

// Populate all widget collections using WidgetFactory templates
WidgetFactory::PopulateWidgets<WeatherWidget, RE::TESWeather>(weatherWidgets);
WidgetFactory::PopulateWidgets<WorldSpaceWidget, RE::TESWorldSpace>(worldSpaceWidgets);
WidgetFactory::PopulateWidgets<LightingTemplateWidget, RE::BGSLightingTemplate>(lightingTemplateWidgets);
WidgetFactory::PopulateWidgets<ImageSpaceWidget, RE::TESImageSpace>(imageSpaceWidgets);
WidgetFactory::PopulateWidgets<VolumetricLightingWidget, RE::BGSVolumetricLighting>(volumetricLightingWidgets);
Expand Down Expand Up @@ -1219,11 +1192,6 @@ void EditorWindow::SaveAll()
weather->Save();
}

for (auto& worldspace : worldSpaceWidgets) {
if (worldspace->IsOpen())
worldspace->Save();
}

for (auto& lightingTemplate : lightingTemplateWidgets) {
if (lightingTemplate->IsOpen())
lightingTemplate->Save();
Expand Down Expand Up @@ -1734,11 +1702,6 @@ void EditorWindow::SaveSessionWidgets()
settings.lastOpenWidgets.push_back(widget->GetEditorID());
}
}
for (auto& widget : worldSpaceWidgets) {
if (widget->IsOpen()) {
settings.lastOpenWidgets.push_back(widget->GetEditorID());
}
}
for (auto& widget : lightingTemplateWidgets) {
if (widget->IsOpen()) {
settings.lastOpenWidgets.push_back(widget->GetEditorID());
Expand All @@ -1763,12 +1726,6 @@ void EditorWindow::RestoreSessionWidgets()
break;
}
}
for (auto& widget : worldSpaceWidgets) {
if (widget->GetEditorID() == widgetId) {
widget->SetOpen(true);
break;
}
}
for (auto& widget : lightingTemplateWidgets) {
if (widget->GetEditorID() == widgetId) {
widget->SetOpen(true);
Expand Down
2 changes: 0 additions & 2 deletions src/WeatherEditor/EditorWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "Weather/ReferenceEffectWidget.h"
#include "Weather/VolumetricLightingWidget.h"
#include "Weather/WeatherWidget.h"
#include "Weather/WorldSpaceWidget.h"
#include "WeatherUtils.h"
#include "Widget.h"

Expand All @@ -31,7 +30,6 @@ class EditorWindow

// Widget collections owned by EditorWindow, created in SetupResources(), released in destructor
std::vector<std::unique_ptr<Widget>> weatherWidgets;
std::vector<std::unique_ptr<Widget>> worldSpaceWidgets;
std::vector<std::unique_ptr<Widget>> lightingTemplateWidgets;
std::vector<std::unique_ptr<Widget>> imageSpaceWidgets;
std::vector<std::unique_ptr<Widget>> volumetricLightingWidgets;
Expand Down
33 changes: 0 additions & 33 deletions src/WeatherEditor/Weather/WorldSpaceWidget.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions src/WeatherEditor/Weather/WorldSpaceWidget.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/WeatherEditor/Widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ std::string Widget::GetFolderName()
return "Weathers";
case RE::FormType::LightingMaster:
return "Lighting Templates";
case RE::FormType::WorldSpace:
return "WorldSpaces";
case RE::FormType::ImageSpace:
return "ImageSpaces";
case RE::FormType::VolumetricLighting:
Expand Down