diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-09 23:31:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-09 23:31:10 +0400 |
commit | dd72ffe3ff6871960f644d6c4b16c1661c7b4e03 (patch) | |
tree | 27479b421912003d2aab0558a53a408e4cf527ba /release | |
parent | 6b21085ed5d8bcd827859345105d7b37e1049d4b (diff) |
py/rna api:
- bpy.context wasnt being created from the python bpy.types.Context type defined in bpy_types.py (bpy.context.copy() failed for eg.)
- bpy.context.copy() was returning C defined methods like FloatProperty(), which are not useful in this case, removed.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 2640288b3c5..c8153ce9b74 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -29,11 +29,14 @@ class Context(StructRNA): __slots__ = () def copy(self): + import types new_context = {} generic_keys = StructRNA.__dict__.keys() for item in dir(self): if item not in generic_keys: - new_context[item] = getattr(self, item) + value = getattr(self, item) + if type(value) != types.BuiltinMethodType: + new_context[item] = getattr(self, item) return new_context |