Fix add-on reloading when there are new unimported node files

This commit is contained in:
Moritz Brückner 2021-09-26 22:34:09 +02:00
parent 8604e670c3
commit 957c5371c8

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