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:
authorCampbell Barton <ideasman42@gmail.com>2010-01-25 12:44:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-25 12:44:04 +0300
commit0a0f4c9d81cfa2a4b4a9999e1dc976bc417d7d54 (patch)
tree367f259b695955a514530d125ab495344724eafb /release/scripts/modules/rigify/palm_curl.py
parenteed13d859b67185996569178ede9241a5695f215 (diff)
Mathutils refactor & include in sphinx generated docs, (TODO, include getset'ers in docs)
- Mathutils.MidpointVecs --> vector.lerp(other, fac) - Mathutils.AngleBetweenVecs --> vector.angle(other) - Mathutils.ProjectVecs --> vector.project(other) - Mathutils.DifferenceQuats --> quat.difference(other) - Mathutils.Slerp --> quat.slerp(other, fac) - Mathutils.Rand: removed, use pythons random module - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args - Matrix.scalePart --> Matrix.scale_part - Matrix.translationPart --> Matrix.translation_part - Matrix.rotationPart --> Matrix.rotation_part - toMatrix --> to_matrix - toEuler --> to_euler - toQuat --> to_quat - Vector.toTrackQuat --> Vector.to_track_quat
Diffstat (limited to 'release/scripts/modules/rigify/palm_curl.py')
-rw-r--r--release/scripts/modules/rigify/palm_curl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/modules/rigify/palm_curl.py b/release/scripts/modules/rigify/palm_curl.py
index b231919823b..82010552ea7 100644
--- a/release/scripts/modules/rigify/palm_curl.py
+++ b/release/scripts/modules/rigify/palm_curl.py
@@ -249,15 +249,15 @@ def main(obj, bone_definition, base_names, options):
# NOTE: the direction of the Z rotation depends on which side the palm is on.
# we could do a simple side-of-x test but better to work out the direction
# the hand is facing.
- from Mathutils import Vector, AngleBetweenVecs
+ from Mathutils import Vector
from math import degrees
child_pbone_01 = obj.pose.bones[children[0]].bone
child_pbone_02 = obj.pose.bones[children[1]].bone
rel_vec = child_pbone_01.head - child_pbone_02.head
- x_vec = child_pbone_01.matrix.rotationPart() * Vector(1.0, 0.0, 0.0)
+ x_vec = child_pbone_01.matrix.rotation_part() * Vector(1.0, 0.0, 0.0)
- return degrees(AngleBetweenVecs(rel_vec, x_vec)) > 90.0
+ return degrees(rel_vec.angle(x_vec)) > 90.0
if x_direction(): # flip
driver.expression = "-(%s)" % driver.expression