- property decorators for setting attributes didnt work, hack to prevent every instan...
[blender.git] / release / scripts / modules / bpy_types.py
index 4351ee7579b300ca0aaa896243c36c2663be628f..565f0e4da1b9e50b91117108dea01ec1749c8a0b 100644 (file)
@@ -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):