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

CoDEmanX codemanx at gmx.de
Wed Feb 27 13:05:14 CET 2013


I don't see a sensible way to add multiple addon version support to 
Blender...

Addon writers should write proper scripts - using PointerProperties to 
group their custom props. Then one could simply change PointerProp names 
and solve name property name conflicts.

Renaming the script file (or if it's a module, then the folder) solves 
the multiple addon warning, but there are still a lot of name conflicts 
- especially class-names and operator bl_idnames. Solving these 
conflicts by hand is a lot of work, but how could this be avoided?

I mean, how should Blender handle such cases? Wouldn't really helpful if 
it renamed classes and operators, as your script would call the wrong 
ops afterwards. Dynamic registration of ops inside of an addon is 
possible (could checkfor existing op with hasattr), but the only way i 
know to call such dynamic ops dynamically seems to be evil eval().

http://www.blender.org/documentation/blender_python_api_2_66_release/info_overview.html#dynamic-defined-classes-advanced

Well, I would eventually solve name conflicts by hand if i really needed 
an older version of an addon running simultanously.



Am 26.02.2013 19:40, schrieb Jason van Gumster:
>
> Nathan Vegdahl <cessen at cessen.com> wrote:
>
>> 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.
>
> A complication I see with this is in the event that the user actually enables
> both (or more) versions of the add-on. Assuming that the add-on(s) make
> additions/overrides to the UI in the form of panels, menus, and hotkeys,
> there's no easy way to differentiate what UI element belongs to which version
> of the add-on.
>
> So perhaps I'm stating the obvious, but in order for this to work, a check
> should be included to prevent multiple enabled instances of the add-on. The
> question then becomes: how does that get implemented and enforced?
>
>    -Jason
> _______________________________________________
> 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