Automatically load an addon with a blend needing it

Hi !

I am surprised not to find anything about that. Didn’t I search well enough ?
Or is it already included somewhere and I missed it ?

Is it possible to declare that a blend needs this or these addon(s) before saving it,
so the addons are automatically activated by loading the blend ?

Thanks in advance.

Just load the addons you need and save your startup file. There is no option to save the addons you need directly in your scene. Nothing like a fake user option :smiley: . So you should know what addons you are using and need to do something. Just save the startup file ;). Know what you mean but if you need something special you or the person who is working on a file needs to enable the addon and save the startup file and also needs the addon.

Sometimes with a simple script you can make a text block and copy paste the script in there. In this way you can sort of redistribute the addon required to make a scene work.

Thank you much !
@Piat :
Well I know all that, but I work on many different blends that each need different plugins and I don’t want to have them all loaded by a stratup file. I work alone and I pass my files to nobody.

@3pointEdit :
Is there a way to say something like “include” in a script so that’s it’s executed at file load ?

It would be handy to have this opportunity and I wonder that nobody needs it like I do. Coders ?
Thank again for your help.

Rimpotche I think there was (is?) addon that can save enabled add-ons per blend file, unfortunately i can’t find it.

But fear not, its very easy to just do it yourself via simple script:

import bpy

You place this script into blender text editor (remember that name of script must end with “.py”) and check “Register”.
Save the blend file and whenever you load this blend file this script will be executed (and enable your addons).
Tip: module names are just addon filename without “.py” extension or addon catalog name.

Warning: This approach needs “Auto Run Python Scripts” to be enabled (in Preferences)