I have some functions that need to get the version of the addon to stamp in a custom property the version number it was run with.
Beyond that I do not know if it is a correct practice, I was wondering if it was possible to create a submodule with the bl_info (which I have already tried without any success), and call it when needed, or, to obtain in a submodule, the bl_info directly, contained in the __init__.py
(i.e. the addon module)
into __init__.py
:
bl_info = {
"name": "My addon name",
"author": "NoobCat",
"version": (1, 0, 0)
"blender": (2, 93, 0),
"location": "",
"description": "",
"tracker_url": "",
"category": ""}
Or my guess in a submodule, but it didn't work:
into utility.py
:
def get_bl_info():
bl_info = {
"name": "My addon name",
"author": "NoobCat",
"version": (1, 0, 0)
"blender": (2, 93, 0),
"location": "",
"description": "",
"tracker_url": "",
"category": ""}
return bl_info
Now at the start into __init__.py
from . import utility
bl_info = utility.get_bl_info()
However, this does not seem to work
It seemed like a convenient idea to write bl_info in 1 place, and have access from any module easily. But I have recently been working with modules and am still very confused