-
Clemens Barth authored
According to Campbell's demand (see email below, bpy.context.scene issue) and the last message in the tracker http://projects.blender.org/tracker/index.php?func=detail&aid=31618&group_id=153&atid=468) I have changed the code. Blendphys. ******************* Campbells email from 20.12.2012 03:38 ******************** Recently I've noticed addons using bpy.context.scene when being imported or in the register() function. This is really bad practice and will cause inconsistency if the addon is enabled and a different blend file is loaded. In the worst case accessing a removed datablock can crash which is likely if a datablock is stored as a global variable on activation - object_laplace_lightning.py does this. I've changed addon loading so that they only get access to a restricted context which only exposes 'window_manager' - needed for adding keymaps. .....
Clemens Barth authoredAccording to Campbell's demand (see email below, bpy.context.scene issue) and the last message in the tracker http://projects.blender.org/tracker/index.php?func=detail&aid=31618&group_id=153&atid=468) I have changed the code. Blendphys. ******************* Campbells email from 20.12.2012 03:38 ******************** Recently I've noticed addons using bpy.context.scene when being imported or in the register() function. This is really bad practice and will cause inconsistency if the addon is enabled and a different blend file is loaded. In the worst case accessing a removed datablock can crash which is likely if a datablock is stored as a global variable on activation - object_laplace_lightning.py does this. I've changed addon loading so that they only get access to a restricted context which only exposes 'window_manager' - needed for adding keymaps. .....