Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-09-11 12:48:52 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-09-11 12:49:04 +0300
commitd4f8bc80a4bd69707a92e7141a2fb67d3f668c58 (patch)
tree01b998e5e958c62f8525be0eccc671381021cbf3 /release
parent69e0f485c9f7e75e6e95e66751a5fb29cbe6d4d2 (diff)
Armature: convert the length Python property of bones to a RNA property.
This allows accessing it from drivers and using it in UI, as demonstrated by adding it to the transform panel of 3D View. As an aside, properly mark transform-related properties of Bone read-only, as they can only be changed correctly in edit mode.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_types.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index eca79795269..a3787506da4 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -252,18 +252,6 @@ class _GenericBone:
return (self.head + self.tail) * 0.5
@property
- def length(self):
- """
- The distance from head to tail,
- when set the head is moved to fit the length.
- """
- return self.vector.length
-
- @length.setter
- def length(self, value):
- self.tail = self.head + ((self.tail - self.head).normalized() * value)
-
- @property
def vector(self):
"""
The direction this bone is pointing.