Add a reason for why an Addon can not be loaded. This change gives a more detailed explanation of the issue and may help the Addon Developer to identify what exactly needs to be changed.

The current message 'addon not loaded' is a bit too sparse.

Differential Revision: https://developer.blender.org/D11655
This commit is contained in:
Gaia Clary 2021-06-20 22:57:58 +02:00
parent 4968a0bdf9
commit 2851602052
1 changed files with 2 additions and 1 deletions

View File

@ -358,7 +358,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
except Exception as ex:
# if the addon doesn't exist, don't print full traceback
if type(ex) is ImportError and ex.name == module_name:
print("addon not found:", repr(module_name))
print("addon not loaded:", repr(module_name))
print("cause:", str(ex))
else:
handle_error(ex)