
The Code Autocomplete addon can do the first 3 steps for you. inside of one of these files they will be registered as well (by the _module(_ name _) statement in the main file).Īh and don't forget to create a _ init _.py file in each subdirectory. py files in the folder now and all of them will be loaded and reloaded automatically. Inside of this folder I create a _ init _.py file with this content.Ĭreate a developer_utils.py file with this content. It's not super important but I suggest to use a name that can be a python identifier and all lower case. this one).Ĭreate a new folder in Blenders addons directory. Even as large addons as Animation Nodes and Code Autocomplete use it (and some others as well, e.g.

Without having to care about reloading etc.

I agree that it can be complicated in at first and I have to admit that it took me quite some time until I was able to create multi-file addons in a nice way.īUT, a few months ago I developed an addon template for my Code Autocomplete addon that allows you to create multi-file addons very easily. In my opinion you should always use multiple files for non-trivial addons (e.g.
