-
Notifications
You must be signed in to change notification settings - Fork 60
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
base: main
Are you sure you want to change the base?
Conversation
|
||
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
path = assets_scenes_dir_p / folder_name / sym_file_p | ||
bpy.context.scene.ootCSNumber = importCutsceneData(f"{path}", None, sym_name) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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)