mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
Placed WMO buildings reference textures (walls, floors, decorations) that were not being exported alongside the WOB files. Added collectWMOTextures() which loads the root WMO + all group files and gathers every texture path, then folds these into the same PNG export pass that handles terrain and M2 textures. Exported zones now have every texture they need across all model types.
36 lines
1.4 KiB
C++
36 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "pipeline/adt_loader.hpp"
|
|
#include <string>
|
|
#include <vector>
|
|
#include <unordered_set>
|
|
|
|
namespace wowee {
|
|
namespace pipeline { class AssetManager; }
|
|
|
|
namespace editor {
|
|
|
|
class TextureExporter {
|
|
public:
|
|
// Collect all texture paths referenced by the terrain
|
|
static std::vector<std::string> collectUsedTextures(const pipeline::ADTTerrain& terrain);
|
|
|
|
// Collect all texture paths referenced by an M2 model (loads the M2 from `am`).
|
|
// Returns lowercased game paths (e.g. "creature\\foo\\foo.blp"). Empty if M2 not found.
|
|
static std::vector<std::string> collectM2Textures(pipeline::AssetManager* am,
|
|
const std::string& m2Path);
|
|
|
|
// Collect all texture paths referenced by a WMO root file.
|
|
// Includes textures used by every group (loads root + group files via `am`).
|
|
static std::vector<std::string> collectWMOTextures(pipeline::AssetManager* am,
|
|
const std::string& wmoPath);
|
|
|
|
// Export all used textures as PNG to an output directory
|
|
// Returns count of successfully exported textures
|
|
static int exportTexturesAsPng(pipeline::AssetManager* am,
|
|
const std::vector<std::string>& texturePaths,
|
|
const std::string& outputDir);
|
|
};
|
|
|
|
} // namespace editor
|
|
} // namespace wowee
|