feat(editor): PNG/JPG/BMP heightmap image import, undo for all imports

- importHeightmapImage(): loads any resolution PNG/JPG/BMP/TGA via
  stb_image, supports both 8-bit and 16-bit precision, maps to terrain
  vertices with bilinear coordinate mapping
- Both image import and RAW import now wrapped with undo
  (recordGeneratorUndo/commitGeneratorUndo)
- UI: File > Import Heightmap now offers "Import Image" (any format)
  and "Import RAW" (binary) as separate options
- Enables professional terrain workflows: paint in Photoshop/GIMP,
  generate in World Machine/Gaea, import directly as terrain
This commit is contained in:
Kelsi 2026-05-05 15:42:35 -07:00
parent 33042c3a47
commit 36dc9ddef7
3 changed files with 77 additions and 7 deletions

View file

@ -144,6 +144,7 @@ public:
// Import/export heightmap (raw 16-bit grayscale, 129x129)
bool importHeightmap(const std::string& path, float heightScale);
bool importHeightmapImage(const std::string& path, float heightScale);
bool exportHeightmap(const std::string& path, float heightScale);
// Water editing