Make Blender look for addons in another folder than preset when developing/debug

So, someone did this for developing addons?

It doesn’t feel right for me to have my python scripts in the addons folder of my blender version when developing, how can I tell blender to look for more folder for addons, even if I have to make a patch?

User Preferences / File panel, alternate scripts directory path

Brachi,

The following command will return a list of folders that blender looks in for addons. One of which will be the alternative script path / addons,

>>> bpy.utils.script_paths('addons')
['F:\\BlenderSVN\\cmake-build\\bin\\Release\\2.69\\scripts\\addons', 'C:\\Documents and Settings\\batFINGER\\Application Data\\Blender Foundation\\Blender\\2.69\\scripts\\addons']

Great question … and answers!!

I’ve been wanting to know this same thing for a while. I started by creating soft links (Linux) to my development files, but since I’ve been upgrading to multiple Blender versions, that became tiresome and I just started duplicating my scripts in the addons folder (including my local repository). But then the scripts got out of sync for different versions. This will be a big help!!

Thanks for the answers, I don’t know how I miss that in the user preferences, duh.

Although what I was looking for is to add many folders as addons, in case I work in multiple projects I want to test (not the case right now).

So, I wanted to keep my project folder intact, so what I did is just add and folder call “addons” and I put the init with the addon info there. The only problem is that the relative imports. I didn’t want to bother to go to parent packages so I just added this to the init:


import sys
sys.path.append(r'Absolute/projectpath/Parent')

When I release the addon for “production” I just need to move the init back to the source folder and remove the sys.path.append since blender will already be able to load the modules.

Now it’s a real pleasure to develop :smiley: