- 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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user