From d7ae94739ab2acf1f06e8b6c9efdc6ae7c8eabb0 Mon Sep 17 00:00:00 2001 From: Yanis42 <35189056+Yanis42@users.noreply.github.com> Date: Sun, 21 Apr 2024 03:07:06 +0200 Subject: [PATCH] move the global variable earlier in the function --- fast64_internal/oot/scene/exporter/to_c/spec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fast64_internal/oot/scene/exporter/to_c/spec.py b/fast64_internal/oot/scene/exporter/to_c/spec.py index dec947ed6..c628bb7d5 100644 --- a/fast64_internal/oot/scene/exporter/to_c/spec.py +++ b/fast64_internal/oot/scene/exporter/to_c/spec.py @@ -202,6 +202,8 @@ def to_c(self): def editSpecFile( isScene: bool, exportInfo: ExportInfo, hasSceneTex: bool, hasSceneCS: bool, roomTotal: int, csTotal: int ): + global buildDirectory + # get the spec's data specFile = SpecFile(os.path.join(exportInfo.exportPath, "spec")) @@ -214,7 +216,6 @@ def editSpecFile( specFile.remove(entry.segmentName) if isScene: - global buildDirectory assert buildDirectory is not None isSingleFile = bpy.context.scene.ootSceneExportSettings.singleFile includeDir = f"{buildDirectory}/"