-
Notifications
You must be signed in to change notification settings - Fork 53
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
Support for user components directories #290
Conversation
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.
Thanks for this!
There were a few issues that I found that I think should be addressed, but I think they should be easy to solve. I've left inline comments for them.
I also noticed in a couple places you're using enumerate
but discarding the index. Is there a reason why you aren't just looping over stuff regularly in those places?
1ee3092
to
1db0eb2
Compare
Oh, I just realized, when add/removing directories, the preferences should be marked dirty: This is for when the user has selected that preferences shouldn't auto-save. |
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.
The dirty state of the preferences isn't updating when the fields are modified, which is weird. I suppose you could add a lambda to the update argument for the string properties and manually mark them dirty, but not sure why it's not doing it automatically. Anyway, I'll leave it up to you on whether you want to support this right now or not.
LGTM. Thank you for the changes.
This PR adds support for custom user components directories.
The user can add multiple directories and the components found in those directories will be loaded at add-on load time.
We don't do hot reloading as it can get quite complex quickly and Blender already requires reload for it's own scripts paths AFAIK.
Required by https://github.com/MozillaReality/hubs-postprocessing-addon
Closes #288