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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-05 10:08:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-05 10:08:34 +0300
commit696b0366f5c46dcfcb50f53b4ca4f59c593b88fb (patch)
tree8dfbeb67383adc39b5742c661f61a55eb4066659 /io_export_unreal_psk_psa.py
parentdfd3febce161e76015beb0faac516724aceff453 (diff)
update for changes in mathutuils.
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 738e1205..dd5e29ed 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -969,9 +969,9 @@ def parse_bone(blender_bone, psk_file, psa_file, parent_id, is_root_bone, parent
if child_parent != None:
quat_root = blender_bone.matrix
- quat = make_fquat(quat_root.to_quat())
+ quat = make_fquat(quat_root.to_quaternion())
- quat_parent = child_parent.matrix.to_quat().inverse()
+ quat_parent = child_parent.matrix.to_quaternion().inverse()
parent_head = child_parent.head * quat_parent
parent_tail = child_parent.tail * quat_parent
@@ -980,10 +980,10 @@ def parse_bone(blender_bone, psk_file, psa_file, parent_id, is_root_bone, parent
# ROOT BONE
#This for root
set_position = blender_bone.head * parent_matrix #ARMATURE OBJECT Locction
- rot_mat = blender_bone.matrix * parent_matrix.rotation_part() #ARMATURE OBJECT Rotation
+ rot_mat = blender_bone.matrix * parent_matrix.to_3x3() #ARMATURE OBJECT Rotation
#print(dir(rot_mat))
- quat = make_fquat_default(rot_mat.to_quat())
+ quat = make_fquat_default(rot_mat.to_quaternion())
#print ("[[======= FINAL POSITION:", set_position)
final_parent_id = parent_id
@@ -1266,8 +1266,8 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
parentposemat = mathutils.Matrix(parent_pose.matrix)
#blender 2.4X it been flip around with new 2.50 (mat1 * mat2) should now be (mat2 * mat1)
posebonemat = parentposemat.invert() * posebonemat
- head = posebonemat.translation_part()
- quat = posebonemat.to_quat().normalize()
+ head = posebonemat.to_translation()
+ quat = posebonemat.to_quaternion().normalize()
vkey = VQuatAnimKey()
vkey.Position.X = head.x
vkey.Position.Y = head.y
@@ -1411,8 +1411,8 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
parentposemat = mathutils.Matrix(parent_pose.matrix)
#blender 2.4X it been flip around with new 2.50 (mat1 * mat2) should now be (mat2 * mat1)
posebonemat = parentposemat.invert() * posebonemat
- head = posebonemat.translation_part()
- quat = posebonemat.to_quat().normalize()
+ head = posebonemat.to_translation()
+ quat = posebonemat.to_quaternion().normalize()
vkey = VQuatAnimKey()
vkey.Position.X = head.x
vkey.Position.Y = head.y