style cleanup
This commit is contained in:
@@ -28,14 +28,17 @@ __all__ = (
|
||||
|
||||
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
|
||||
@@ -51,6 +54,7 @@ _data_restrict = _RestrictData()
|
||||
|
||||
class RestrictBlend():
|
||||
__slots__ = ("context", "data")
|
||||
|
||||
def __enter__(self):
|
||||
self.data = _bpy.data
|
||||
self.context = _bpy.context
|
||||
|
||||
Reference in New Issue
Block a user