From 98d9cd36e19e82d660c4cf0ea603214d68662ea5 Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Tue, 2 Apr 2024 15:33:52 +0300 Subject: [PATCH] [mod_converter2] Save textures list. --- src/mod_converter2/mod_converter2.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod_converter2/mod_converter2.cpp b/src/mod_converter2/mod_converter2.cpp index 2db735f..76c7eb9 100644 --- a/src/mod_converter2/mod_converter2.cpp +++ b/src/mod_converter2/mod_converter2.cpp @@ -77,10 +77,15 @@ auto read_model(const path &fn) { primitives::templates2::mmap_file f{fn, primitives::templates2::mmap_file::rw{}}; auto &m = *(mod*)f.p; auto v = m.blocks(); + std::set textures; for (auto &&b : v) { if (b->h.type != BlockType::VisibleObject) { continue; } + textures.insert(b->h.mask); + textures.insert(b->h.spec); + // we do not use tex3,tex4 atm + // switch (b->mat_type) { case MaterialType::Texture: // works in m1 case MaterialType::TextureWithGlareMap: // works in m1 @@ -106,6 +111,7 @@ auto read_model(const path &fn) { break; } } + write_lines(path{fn}+=".textures.txt",textures); } void convert_model(const path &fn)