Merge pull request #2350 from MoritzBrueckner/fix-nodes-reload

Fix add-on reloading when there are new unimported node files
This commit is contained in:
Lubos Lenco 2021-09-27 11:03:02 +02:00 committed by GitHub
commit b579c8a15d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,7 @@ def init_nodes():
# Only look at modules in sub packages
elif module_name.rsplit('.', 1)[0] != __package__:
if 'HAS_RELOADED' not in globals():
if 'HAS_RELOADED' not in globals() or module_name not in sys.modules:
_module = importlib.import_module(module_name)
else:
# Reload the module if the SDK was reloaded at least once