Skip to content

Commit 30db460

Browse files
authored
[OoT] Fix custom-path OoT/MM DL import not reading object header (Fast-64#714)
Fix custom-path object import not reading the header
1 parent ab1c074 commit 30db460

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fast64_internal/z64/utility.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,9 @@ def ootGetObjectPath(isCustomExport: bool, exportPath: str, folderName: str, inc
493493
def ootGetObjectHeaderPath(isCustomExport: bool, exportPath: str, folderName: str, include_extracted: bool) -> str:
494494
extracted = bpy.context.scene.fast64.oot.get_extracted_path() if include_extracted else "."
495495
if isCustomExport:
496-
filepath = exportPath
496+
# The custom .c references _WIDTH/_HEIGHT defines from its sibling .h, read that too.
497+
root, ext = os.path.splitext(exportPath)
498+
filepath = root + ".h" if ext == ".c" else exportPath
497499
else:
498500
filepath = os.path.join(
499501
ootGetPath(exportPath, isCustomExport, f"{extracted}/assets/objects/", folderName, False, False),

0 commit comments

Comments
 (0)