From cf4b6651a9e5d603abb6e0b8c0b3bbaf407c0b08 Mon Sep 17 00:00:00 2001 From: Amanda de Moura <5531103+dmdemoura@users.noreply.github.com> Date: Mon, 5 Oct 2020 09:32:58 -0300 Subject: [PATCH] Add workaround for EmbedName flag in SSE texture BSAs --- pyro/PackageManager.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyro/PackageManager.py b/pyro/PackageManager.py index 9c1d965b..07f13f03 100644 --- a/pyro/PackageManager.py +++ b/pyro/PackageManager.py @@ -134,6 +134,20 @@ def build_commands(self, containing_folder: str, output_path: str) -> str: arguments.append('-fo4') elif self.options.game_type == GameType.SSE: arguments.append('-sse') + + # SSE has an ctd bug with uncompressed textures in a bsa that + # has an Embed Filenames flag on it, so force it to false. + has_textures = False + + for f in glob.iglob(os.path.join(containing_folder, r'**/*'), recursive=True): + if not os.path.isfile(f): + continue + if endswith(f, '.dds', ignorecase=True): + has_textures = True + break + + if has_textures: + arguments.append('-af:0x3') else: arguments.append('-tes5')