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

Matt Ebb matt at mke3.net
Thu Dec 20 22:09:27 CET 2012


On Fri, Dec 21, 2012 at 1:01 AM, Campbell Barton <ideasman42 at gmail.com>wrote:

> You can still store settings in the scene as before, just not access
> the active scene while enabling the addon (that moment just after
> clicking on the checkbox until the view updates).
>

Yep, I understand that. I'm also not sure if this affect my addon either,
since right now I'm using the dodgy hack of accessing bpy.data.scenes[0]
directly at registration time to retrieve my data. Will this be broken now
too, or just context? (I haven't been able to test yet... using Lukas'
branch, which hasn't been updated yet).

In this case, I'm dynamically generating some custom types on addon
register, based on some external files. I need to store the path to that
external data somewhere so users can customise it from the blender UI.

Currently these properties are stored in the scene. I'm not particularly
attached to using the scene, it's only because there's not really anywhere
else that's a good fit at the moment. User Preferences would be much
better, since it's persistent across different files being opened, but
that's not currently possible.

Just giving you an idea of the use case, hopefully will find out soon if
bpy.data is affected too..

thanks,

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


More information about the Bf-python mailing list