From f0f1c7995b3fed05248b93a8e57d77f033e0df28 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Dec 2014 13:52:31 +0100 Subject: [PATCH] PyAPI: disallow assigning members to 'bpy.ops' --- release/scripts/modules/bpy/__init__.py | 4 ++-- release/scripts/modules/bpy/ops.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 3a2f9bde2c7..b0d2233b380 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 1bdb9eba48c..d3d9255123b 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): """