mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
fix(editor): normal recalculation after sculpt, mode switch cleanup
- Terrain normals recalculated after height changes (smooth lighting on sculpted terrain instead of flat-shaded appearance) - Ghost preview and brush indicator cleared when switching modes (prevents stale model instances or circles persisting) - File > Clear All resets undo history and selections - Normal computation uses finite differences from neighbor heights, handles both outer (9x9) and inner (8x8) vertex grid positions
This commit is contained in:
parent
5daa359e74
commit
ba96de7138
5 changed files with 70 additions and 1 deletions
|
|
@ -68,6 +68,11 @@ void EditorUI::renderMenuBar(EditorApp& app) {
|
|||
if (ImGui::BeginMenu("File")) {
|
||||
if (ImGui::MenuItem("New Terrain...", "Ctrl+N")) showNewDialog_ = true;
|
||||
if (ImGui::MenuItem("Load ADT...", "Ctrl+O")) showLoadDialog_ = true;
|
||||
if (ImGui::MenuItem("Clear All", nullptr, false, app.hasTerrainLoaded())) {
|
||||
app.getTerrainEditor().history().clear();
|
||||
app.getObjectPlacer().clearSelection();
|
||||
app.getNpcSpawner().clearSelection();
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Quick Save", "Ctrl+S", false, app.hasTerrainLoaded()))
|
||||
app.quickSave();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue