mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
[mod_converter2] Save textures list.
This commit is contained in:
parent
472152c158
commit
98d9cd36e1
1 changed files with 6 additions and 0 deletions
|
|
@ -77,10 +77,15 @@ auto read_model(const path &fn) {
|
|||
primitives::templates2::mmap_file<uint8_t> f{fn, primitives::templates2::mmap_file<uint8_t>::rw{}};
|
||||
auto &m = *(mod*)f.p;
|
||||
auto v = m.blocks();
|
||||
std::set<std::string> 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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue