Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OoT] Fix latest decomp issues #366

Merged
merged 16 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed missing thing for exporting scenes + retrocompat stuff
  • Loading branch information
Yanis42 committed Jul 3, 2024
commit ea2c8316805e29ff5d5c39011828ef2d2684c465
6 changes: 5 additions & 1 deletion fast64_internal/oot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
("gc-eu-mq-dbg", "gc-eu-mq-dbg", "gc-eu-mq-dbg"),
("gc-eu-mq", "gc-eu-mq", "gc-eu-mq"),
("gc-eu", "gc-eu", "gc-eu"),
("legacy", "Legacy", "Older Decomp Version"),
]


Expand All @@ -87,7 +88,10 @@ class OOT_Properties(bpy.types.PropertyGroup):
oot_version_custom: bpy.props.StringProperty(name="Custom Version")

def get_extracted_path(self):
return f"extracted/{self.oot_version if self.oot_version != 'Custom' else self.oot_version_custom}/"
if self.oot_version == "legacy":
return "./"
else:
return f"extracted/{self.oot_version if self.oot_version != 'Custom' else self.oot_version_custom}/"


oot_classes = (OOT_Properties,)
Expand Down
4 changes: 3 additions & 1 deletion fast64_internal/oot/scene/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def execute(self, context):
exportInfo = ExportInfo(True, bpy.path.abspath(settings.exportPath), None, levelName)
else:
if option == "Custom":
subfolder = "assets/scenes/" + settings.subFolder + "/"
subfolder = (
context.scene.fast64.oot.get_extracted_path() + "assets/scenes/" + settings.subFolder + "/"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to the f-string approach shown in the next change below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a bit weird to use f-strings with the function as the value returned ends with /

though it's fine for now, I think we should use pathlib more in general anyway so it can be addressed in a general cleanup (though I'll f-string the other parts)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the slash oddities but I didn't use f-strings eveywhere because of the line length limitation of the formatter

else:
levelName = sceneNameFromID(option)
subfolder = None
Expand Down
Loading