[Bf-blender-cvs] [f0f1c79] master: PyAPI: disallow assigning members to 'bpy.ops'

Campbell Barton noreply at git.blender.org
Thu Dec 18 13:53:13 CET 2014


Commit: f0f1c7995b3fed05248b93a8e57d77f033e0df28
Author: Campbell Barton
Date:   Thu Dec 18 13:52:31 2014 +0100
Branches: master
https://developer.blender.org/rBf0f1c7995b3fed05248b93a8e57d77f033e0df28

PyAPI: disallow assigning members to 'bpy.ops'

===================================================================

M	release/scripts/modules/bpy/__init__.py
M	release/scripts/modules/bpy/ops.py

===================================================================

diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 3a2f9bd..b0d2233 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -38,10 +38,10 @@ __all__ = (
 from _bpy import types, props, app, data, context
 
 # python modules
-from . import utils, path, ops
+from . import utils, path
 
 # fake operator module
-ops = ops.ops_fake_module
+from .ops import ops_fake_module as ops
 
 
 def main():
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index 1bdb9eb..d3d9255 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -36,6 +36,7 @@ class BPyOps:
 
      bpy.ops
     """
+    __slots__ = ()
 
     def __getattr__(self, module):
         """




More information about the Bf-blender-cvs mailing list