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_import_scene_unreal_psk.py
parentdfd3febce161e76015beb0faac516724aceff453 (diff)
update for changes in mathutuils.
Diffstat (limited to 'io_import_scene_unreal_psk.py')
-rw-r--r--io_import_scene_unreal_psk.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py
index 2fcb70d1..4fe97333 100644
--- a/io_import_scene_unreal_psk.py
+++ b/io_import_scene_unreal_psk.py
@@ -389,10 +389,10 @@ def pskimport(infile):
#print( "LINKING:" , bone.parent ,"j")
parentbone = ob_new.data.edit_bones[bone.parent]
newbone.parent = parentbone
- rotmatrix = bone.bindmat.to_matrix().resize4x4().rotation_part()
+ rotmatrix = bone.bindmat.to_matrix().to_4x4().to_3x3() # XXX, redundant matrix conversion?
- #parent_head = parentbone.head * parentbone.matrix.to_quat().inverse()
- #parent_tail = parentbone.tail * parentbone.matrix.to_quat().inverse()
+ #parent_head = parentbone.head * parentbone.matrix.to_quaternion().inverse()
+ #parent_tail = parentbone.tail * parentbone.matrix.to_quaternion().inverse()
#location=Vector(pos_x,pos_y,pos_z)
#set_position = (parent_tail - parent_head) + location
#print("tmp head:",set_position)
@@ -409,7 +409,7 @@ def pskimport(infile):
newbone.tail.y = parentbone.head.y + (pos_y + bonesize * rotmatrix[1][1])
newbone.tail.z = parentbone.head.z + (pos_z + bonesize * rotmatrix[1][2])
else:
- rotmatrix = bone.bindmat.to_matrix().resize4x4().rotation_part()
+ rotmatrix = bone.bindmat.to_matrix().resize_4x4().to_3x3() # XXX, redundant matrix conversion?
newbone.head.x = bone.bindpos[0]
newbone.head.y = bone.bindpos[1]
newbone.head.z = bone.bindpos[2]