diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-06 02:41:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-06 02:41:45 +0300 |
commit | 062cf438ce065b477b52f72871b95bc5ee12c619 (patch) | |
tree | be60461642c9fd68301bdcd8d2980d13f690e9ce /release | |
parent | 5ebe54f470c364ff4ea86d15198225295092963e (diff) |
remove nasty hack which made StructRNA class instaces have no __dict__,
use __slots__, it seems all the parent classes need to have slots as well for this to work.
all python defined srna classes are checked for this too
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/io/engine_render_pov.py | 1 | ||||
-rw-r--r-- | release/scripts/modules/bpy_types.py | 16 |
2 files changed, 13 insertions, 4 deletions
diff --git a/release/scripts/io/engine_render_pov.py b/release/scripts/io/engine_render_pov.py index ddca6eb43dc..9157136475b 100644 --- a/release/scripts/io/engine_render_pov.py +++ b/release/scripts/io/engine_render_pov.py @@ -757,6 +757,7 @@ class PovrayRender(bpy.types.RenderEngine): pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine' if 1: + # TODO, when povray isnt found this gives a cryptic error, would be nice to be able to detect if it exists self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE else: # This works too but means we have to wait until its done diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 1a3f2da2c97..9e4f3c9f836 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -25,6 +25,7 @@ StructRNA = bpy_types.Struct.__bases__[0] class Context(StructRNA): + __slots__ = () def copy(self): new_context = {} @@ -37,6 +38,7 @@ class Context(StructRNA): class Object(bpy_types.ID): + __slots__ = () @property def children(self): @@ -49,6 +51,7 @@ class _GenericBone: functions for bones, common between Armature/Pose/Edit bones. internal subclassing use only. ''' + __slots__ = () def translate(self, vec): self.head += vec @@ -158,15 +161,15 @@ class _GenericBone: class PoseBone(StructRNA, _GenericBone): - pass + __slots__ = () class Bone(StructRNA, _GenericBone): - pass + __slots__ = () class EditBone(StructRNA, _GenericBone): - pass + __slots__ = () def ord_ind(i1, i2): @@ -176,6 +179,7 @@ def ord_ind(i1, i2): class Mesh(bpy_types.ID): + __slots__ = () def from_pydata(self, verts, edges, faces): ''' @@ -227,6 +231,7 @@ class Mesh(bpy_types.ID): class MeshEdge(StructRNA): + __slots__ = () @property def key(self): @@ -234,6 +239,7 @@ class MeshEdge(StructRNA): class MeshFace(StructRNA): + __slots__ = () @property def edge_keys(self): @@ -259,12 +265,13 @@ class OrderedMeta(type): # Only defined so operators members can be used by accessing self.order class Operator(StructRNA, metaclass=OrderedMeta): - pass + __slots__ = () class Macro(StructRNA, metaclass=OrderedMeta): # bpy_types is imported before ops is defined # so we have to do a local import on each run + __slots__ = () @classmethod def define(self, opname): @@ -273,6 +280,7 @@ class Macro(StructRNA, metaclass=OrderedMeta): class Menu(StructRNA): + __slots__ = () def path_menu(self, searchpaths, operator): layout = self.layout |