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

Context hook #326

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

randompersona1
Copy link

@randompersona1 randompersona1 commented Dec 15, 2024

Hey, sorry for not responding to #283 . I've had a busy couple of months.

I'd love to have the _Context available to an addon. This would allow access to the SongLogger for clearer logging. I'm not quite happy with the implementation I came up with, especially the name, however, it doesn't break the existing hook. An alternative would be to just change the existing hook from UsdbSong to _Context, or to add an additional SongLogger argument. Of course, external access to _Context isn't very clean, so refactoring _Context to Context would be better if needed.

A different point of discussion could be placing the call to SongLoaderContextDidFinish before the files are moved to their final destination, i.e allowing addons to work within the temporary directories. It would probably make a bit more sense from a conceptual point of view if the addon intends to modify existing files. That would need to be communicated somehow though.

Happy to have a discussion.

Add hook 'SongLoaderContextDidFinish' that allows subscribers access to
_Context.
Call the new 'SongLoaderContextDidFinish' hook with the _Context object.
@randompersona1 randompersona1 marked this pull request as ready for review December 15, 2024 13:23
@randompersona1 randompersona1 marked this pull request as draft December 15, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant