[Productivity script] Gather and link all addons. (Unix)

Allows to maintain many custom addons all in their respective single source repositories, e.g. in the $HOME folder.

  • No longer deal with redundant copies and many versions of addons all spread across the different blender/<version.subversion> folders.

  • Maintains all blender release-delivered addons and

  • yet allows replacing individual addons by a custom version easily.

Stable release v1.2.0. Tested on Debian system. (needs bash shell)

Welcome to productivity.
Minize time loss sorting out addons!

Stable release. Tested on Debian system. (needs bash shell)

Ah yes, rerun the script if you rename your addons in any of the addon locations (hopefully repositories). Else blender will complain of not found files of activated addons.

New release 1.2

  • A folder for symbolic links to addons anywhere in the filesystem now included by default.
    This allows to just link the addons into
cd $HOME/blender-addons-symlinks
ln -s ../rel/path/to/addon__module__or.py $HOME/blender-addons-symlinks/

Rerun the script as described in the README.md in the Git repository.

Open source developers, feel urged to use it. Because we need to increase development speed to break the vicious circles that history teaches us are unbreakable. Terrific task. We need Chuck Norris, best dead and alive.

Hi Faerietree,
does your script automatically parse the .py files to look for the most recent one and automatically do a symbolic link to that file in the addon folder to ensure only the latest version is enabled without conflict?
I agree we chuck norris could help on Blender to directly write Blender 4.0 for the end of the summer :slight_smile:

Looks like you’ve only configured it for Linux users. So I can’t really try it out without customizing the script.

Yeah, sorry for Linux only. Not that I did it intentionally. I just lack knowledge of other UNIX like BSD MacOS. I’d love to support OS X - despite Apple’d selling other people’s work (UNIX.BSD kernel) and not even clearly telling their users that they do - and charging incredible prices without a monthly percentage going to BSD or kernel development. :wink:

And I’d love to support Windows if our people’d like fences and walls more. Unfortunately in a world without fences and walls there’s no space for Windows and Gates. Maybe some people that are not as lazy as my minor self will port and also share it for others - oh wait … maybe I’m dreaming again, how can I come to think that people not only want others to share but also share themselves? Foolish me. ironing his hands as punishment

does your script automatically parse the .py files to look for the most recent one and automatically do a symbolic link to that file in the addon folder to ensure only the latest version is enabled without conflict?

Wow dude, that’d be an epic addition!! If only my friends would not kill me for again starting to code instead to fix the crazy machines that they are waiting for. But I’ll add it to the neverending story, äh list, sorry. :smiley:

I agree we chuck norris could help on Blender to directly write Blender 4.0 for the end of the summer

Hehe, I think if he were to help us, then he’d have released blender 5.0 yesterday already - after recoding his first version which accidentally unified the world without conquering it.

I’m not a bash script expert, but a grep should be enough as there should be only one line containing ’ “version”: (x.x),’ at the beginning of each addon (in the bl_info part). But I know what you mean with the never-ending list :smiley:

True. Currently also .pdf, .txt et alia are linked. Your proposal though is pretty useful as twice existing addons do lead to neither the one nor the other working while the .pdf, .txt are just ignored.

Some remaining issues have been fixed lately though:

  • Both addon modules and single .py file addons are linked properly now (in the default configuration).
  • Further transit the default configuration to symlinking wanted addons instead of listing them one by one in the shell script. (Freedom to choose which way to go. Both work. The latter more generic, less manual work. But requires you to maintain a branch of the shell script and rebase your changes onto the default configuration on update|pull|fetch+merge.)

Today I again came across a typical use case which shows why this script is so useful:
On Github I read: “Note: The whole repoistory won’t work as a Blender add on”
So now what? Neither downloading a release nor cloning the repo into the blender-…/2.xy/scripts/addons/ folder will lead to a working addon installation.

The solution:

  • Download|clone into e.g. ~/blender_addons/<repo>
  • Either add ~/blender_addons/<repo>/*.py to the configuration array at the end of the shell script
  • Or symlink: ln -si ~/blender_addons/<repo>/*.py ~/blender-addons-symlinks/.
  • Or create a folder for future use: ~/blender-single-file-addons/ and put the repositories in there. I’ll just add an entry to the default config to load any .py files nested in there.
  • run this gather, link shell script. Et voila.

Main benefits:
a. Take addons from one blender release to another: Just rerun the gather, link script after blender update providing the path to the new blender install. Done. All addons installed. No redundant copies.
b. Update the addon repository and the addon is up to date insantly. (no need to install again)
c. Modify and addon. The addon needs not be reinstalled. The link always points to the original files in hopefully a version controlled repository.

Tested on Ubuntu, ArchLinux, VoidLinux - should work with any bash shell.
Maybe the shebang !/bin/bash should be replaced by /bin/sh for better compatibility? Have to check if the code is truly dash compatible. The list is growing.

Anyway, this script has proven very valuable for years now - fixing addon chaos.
Many people often tell me “I use blender but I do not dare using addons because it is so much work to install, update, keep track of - repeating for every new blender release - simply chaotic.”

Note though that you need to provide the correct path to blender/2.xy/ to the script (double check if you use a package manager to install blender - it is not ~/.config/blender/2.xy/ though, search for the scripts/addons folder using find or locate command or install without package manager [not recommended]).