When you install the add-on from the zip provided by GitHub, Blender unpacks the zip's contents, a folder called
modular_tree-master, into Blender's local add-on storage folder (the exact location varies between operating systems). The main point is that the add-on folder is no longer
modular_tree, that's also the problem.
There's an assumption in this section of the code.
bl_idname = "modular_tree"
bl_idname like that assumes that the folder name (or "package name") is still "modular_tree".
There are many solutions, some more convoluted than others..
0. Renaming the content of the zip.
(don't do this, only included for completeness).
You can rename the folder inside the zip to simply
modular_tree (using something like 7zip) before installing, it will display the add-on preferences correctly. But doing that is kind of a hassle, most of your users will need to do it if they aren't getting your add-on as a GIT project. you should be fixing it in one place for everyone.
1. "Monkey Patching" the
One way to force the package name is:
# somewhere at the start of your __init__
if __name__ != "modular_tree":
sys.modules["modular_tree"] = sys.modules[__name__]
then you can do
bl_idname = __package__
2. using basename and dirname of
# somewhere at the top of your __init__.py
from os.path import basename, dirname
bl_idname = basename(dirname(__file__)) # directory name containing this file
The result is that it doesn't matter what the zip was called / or the eventual folder.