diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-04 00:53:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-04 00:53:01 +0300 |
commit | 3b0e182f716b2541fc77fe3b4bac18a529143c29 (patch) | |
tree | dfb6580ba524446ea3c237d488e0b9a519c3135a /release | |
parent | a4d8c4a7452669d56a7b7a21b50f96f00d783e0e (diff) |
- property decorators for setting attributes didnt work, hack to prevent every instance of an BPyStructRNA to have its own dictionary, set the tp_dictoffset to 0. attempted to use __slots__ but this doesnt work for some reason.
- made bone.length writable
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 4351ee7579b..565f0e4da1b 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -88,6 +88,11 @@ class _GenericBone: @property def length(self): return (self.head - self.tail).length + + @length.setter + def length(self, value): + """The distance from head to tail""" + self.tail = self.head + ((self.tail - self.head).normalize() * value) @property def children(self): |