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] Implemented quick cutscene import and single cutscene import #297

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yanis42
Copy link
Contributor

@Yanis42 Yanis42 commented Jan 16, 2024

This also fix a minor issue related to player cues. Since it would be literally the same class I decided to make the "import all cutscenes" a 2-in-1 operator, if the cutscene name for single import is blank then it will import everything (and warn the user with a label)

@Yanis42 Yanis42 added the oot Has to do with the Ocarina of Time 64 side label Jan 16, 2024

if sym_def_type == "Gfx" and is_array:
settings: OOTDLImportSettings = context.scene.fast64.oot.DLImportSettings
settings.name = sym_name
settings.folder = object_name
settings.folder = folder_name
Copy link
Contributor

Choose a reason for hiding this comment

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

this expects an object name afaik, it wouldn't work for importing a dlist from a scene

I think this operator should be extended to more than objects if it can, but not sure how

Copy link
Contributor Author

@Yanis42 Yanis42 Jan 22, 2024

Choose a reason for hiding this comment

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

I renamed that because it would be weird to use object_name for cutscenes since they're (mostly) in scenes, that's why I chose folder_name since it sets settings.folder, but yeah tbh idk how to name that properly, that was the best idea I could find at the moment

Copy link
Contributor

Choose a reason for hiding this comment

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

so, so far this can quick-import
Gfx[]
(Flex)SkeletonHeader
AnimationHeader
this PR adds:
CutsceneData

afaik the first three can only be imported by fast64 from object files (at least using the interface it gives)
so probably the code should behave different based on where it found the symbol.
e.g. if it finds a dlist in a room file, it can error with Can't import Gfx[] from maps, but if it's in an object then it would be ok.

Comment on lines +122 to +123
path = assets_scenes_dir_p / folder_name / sym_file_p
bpy.context.scene.ootCSNumber = importCutsceneData(f"{path}", None, sym_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

did you test this? sym_file_p should be the path to file itself, no need to prepend anything.
If you were lucky and sym_file_p is absolute I guess it is equivalent to path = sym_file_p and would still work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I tried it with that tiny cutscene in hyrule field that plays after the cutscene where you learn song of time and it worked

@Yanis42 Yanis42 added this to the v2.2.2 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oot Has to do with the Ocarina of Time 64 side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants