[Bf-python] Addon's can no longer access context on activation.

Gert De Roost paleajed at gmail.com
Fri Dec 21 16:34:48 CET 2012


Good day,

I must express my deepest regrets about this new change of "policy" for
script writers.  It means Ill have to equip some of my addons with an
unnecessary "Activate" button the user has to click to be able to start
using script functionality.  This way the user starts an operator in which
I can then finally access the scene context.  For example my SelProject
addon relies on showing a pulldown menu with all the objects in the scene.
Since I check for changes in this through a callback, this menu will always
be up to date, even when a new .blend is loaded.  It enables the user to
set parameters for the addon straight after enabling the addon, instead of
first having to click an "Activate" button.
I dont like script writing "policing" like this new measure does, but power
and possibility to do whatever we want, and leave it up to the script
writer to police/debug his own creation.  Suppose a script accesses the
scene context, then enters a modal loop that does PASS_THROUGH, most
certainly the user could now load another .blend and all the information
harvested in the scene context could trigger these same bugs this new
measure tries to prevent, maybe we should stop allowing modal loops?

Sorry, but Im considering to stop actively adapting my addons from now on
as a form of protest...

Of course I might be mistaking or not be informed well enough, Im open to
discussion but at the moment I am quite convinced this is not the way to
go...


Gert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20121221/e76b66ef/attachment.html>


More information about the Bf-python mailing list