add user_preference access to _RestrictContext() so addons can access their own preferences on load.

This commit is contained in:
Campbell Barton 2013-01-15 17:20:52 +00:00
parent 71b9acaf76
commit 039db0906d

@ -31,9 +31,14 @@ import bpy as _bpy
class _RestrictContext():
__slots__ = ()
_real_data = _bpy.data
# safe, the pointer never changes
_real_pref = _bpy.context.user_preferences
@property
def window_manager(self):
return self._real_data.window_managers[0]
@property
def user_preferences(self):
return self._real_pref
class _RestrictData():