[Bf-python] Support listing of multiple versions of the same addon

Nathan Vegdahl cessen at cessen.com
Fri Mar 15 18:41:58 CET 2013


Haven't gotten any proposals from anyone else, so I'll take a shot.

The key issue that needs to be addressed is that different versions of
the same addon need to be installable in different locations.
However, a sophisticated directory structure will be annoying for
people to manually abide by when e.g. copying addons into the addon
directory(s) by hand, or starting development on new addons.

Therefore, I propose that when installing an addon via Blender,
Blender will place addons into a directory structure that is based on
versions (see below), but that when Blender is searching for addons at
startup, it simply does a recursive directory search of the addon
directory(s).  This helps keep things flexible.  Users can drop/create
addons anywhere in the addons directory, and they will be picked up by
Blender.  The directory scheme then is purely a tool for Blender
itself to install addons in unique locations.

For the directory structure that Blender creates when installing
addons, I propose the following:
addon_name/version_string/addon.py

Or for addons written as packages (such as rigify):
addon_name/version_string/addon/__init__.py (and other files)

This introduces a bit of redundancy, as the addon name will likely
appear twice in the path, but this keeps things nicely separated.

When removing addons, Blender can check for resulting empty
directories and remove them as well.

--Nathan


On Fri, Mar 1, 2013 at 10:37 AM, Nathan Vegdahl <cessen at cessen.com> wrote:
> I realize there are nay-sayers here who for some reason think this is
> a bad idea, but there really are meaningful use cases for this, many
> of which have already been outlined in this thread by myself, Clemens
> Barth, and Domino Marama.  This is a feature that is transparent and
> will not hurt you if you don't use it, but does hurt you if you need
> it and don't have it.
>
> As I said earlier in this thread, enabling multiple versions of an
> addon simultaneously is not part of the proposal.  There are too many
> complications with that, and this proposal does not intend to support
> that unless by accident.  Officially, enabling multiple version of the
> same addon simultaneously would be unsupported.  (I don't think it
> needs to be _enforced_, however, but I'm open to ideas for how to do
> that nicely.)
>
> What I'm looking for in this thread is brainstorming how best to
> support what _is_ in the proposal, which is simply to allow multiple
> versions of the same addon to be installed and show up in the addon
> browser.
>
> I think distinguishing between addons based on the version string is a
> useful way to do this, I think.  By definition, identical version
> numbers of an addon should mean identical addons, so I see no problem
> in disallowing co-installation of same-versioned addons.
>
> Clearly the back-end mechanics to make this work are going to be a
> little trickier, however.  For one thing, at the bare minimum
> different versions of the same addon need to be installed in different
> places or with different names or something.  So some kind of standard
> for that will be needed.
>
> Ideas?
>
> --Nathan
>
> On Fri, Mar 1, 2013 at 10:21 AM, Nathan Vegdahl <cessen at cessen.com> wrote:
>>> How about copy the blender folder and then make a new shortcut to that
>>> "version", there one can use different AddOns.
>>
>> Sure, this is a decent cludge for some of the use-cases for the time
>> being.  My proposal is that we shouldn't need such a cludge, and that
>> users shouldn't be burdened with having to have multiple installs of
>> Blender just to install multiple versions of addons.  And it gets
>> pretty ridiculous if you consider a user who wants even just a few
>> permutations of different addon's various versions.
>>
>> --Nathan
>>
>>
>> On Thu, Feb 28, 2013 at 3:12 AM, Carsten Wartmann <cw at blenderbuch.de> wrote:
>>>
>>> Am 26.02.2013 19:23, schrieb Nathan Vegdahl:
>>> > A topic that has come up over on bf-committers is the possibility of
>>> > supporting multiple co-installed versions of the same addon, without it
>>> > showing up as a conflict in the addon browser.
>>>
>>> How about copy the blender folder and then make a new shortcut to that
>>> "version", there one can use different AddOns.
>>>
>>> Of course there is the problem with the preferences stored into the user
>>> folder. On Linux and with my own builds it stores them into the build
>>> folder, so no problem here.
>>>
>>> Carsten
>>> --
>>> Carsten Wartmann: Autor - Dozent - 3D - Grafik
>>> Homepage:         http://blenderbuch.de/
>>> Das Blender-Buch: http://blenderbuch.de/redirect.html
>>> _______________________________________________
>>> Bf-python mailing list
>>> Bf-python at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list