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

Fix and improve loading of libraries #2496

Merged
merged 2 commits into from
May 23, 2022

Conversation

MoritzBrueckner
Copy link
Collaborator

@MoritzBrueckner MoritzBrueckner commented May 22, 2022

Fixes an issue described in https://forums.armory3d.org/t/celshade-option-only-appears-after-opening-forest-example-with-right-click-how-to-set-manually-for-other-blends/4891.

Libraries weren't reloaded when changing files from within the same project, but registered render path drivers are removed each time a file is changed. Now libraries are reloaded each time a file is opened or the addon is reloaded, which also gives libraries the possibility to re-initialize themselves for a new file. Also, libraries can now have an optional unregister function that will be called before a new file is loaded or when the addon is unregistered, giving libraries the possibility to properly clean up.

Furthermore libraries are no longer loaded twice when a blend file is opened from the file explorer and there is a little debug message in the console that shows which libraries get (un-)loaded.

Fixes an issue described in https://forums.armory3d.org/t/celshade-option-only-appears-after-opening-forest-example-with-right-click-how-to-set-manually-for-other-blends/4891.

Libraries weren't reloaded when changing files from within the same project, but registered render path drivers are removed each time a file is changed. Now libraries are reloaded each time a file is opened or the addon is reloaded, which also gives libraries the possibility to re-initialize itself for a new file. Also, libraries can now have an optional `unregister` function that will be called before a new file is loaded or when the addon is unregistered, giving libraries the possibility to properly clean up.

Furthermore libraries no longer aren't loaded twice when a blend file is opened from the file explorer and there is a little debug message in the console that shows which libraries get (un-)loaded.
@MoritzBrueckner MoritzBrueckner added the Release Notes: Fixes A pull request that fixes something. Used to generate release notes. label May 22, 2022
@luboslenco luboslenco merged commit 7203c32 into armory3d:master May 23, 2022
@MoritzBrueckner MoritzBrueckner deleted the fix-library-loading branch May 23, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Notes: Fixes A pull request that fixes something. Used to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants