[Bf-extensions-cvs] [5e4b90b] fbx_io_development: Grr, fix armature import (this was lost somehow :/).
Bastien Montagne
noreply at git.blender.org
Sat May 3 17:09:33 CEST 2014
Commit: 5e4b90b78dba365dfd761081fff8cc48e0e4fb9c
Author: Bastien Montagne
Date: Sat May 3 17:07:52 2014 +0200
https://developer.blender.org/rBA5e4b90b78dba365dfd761081fff8cc48e0e4fb9c
Grr, fix armature import (this was lost somehow :/).
===================================================================
M io_scene_fbx/import_fbx.py
===================================================================
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 7fa0660..808e112 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -379,17 +379,18 @@ def blen_read_armatures_add_bone(bl_obj, bl_arm, bones, b_uuid):
bone_name_utf8 = elem_name_ensure_class(fbx_bdata, b'Model')
b_item[1] = ebo = bl_arm.edit_bones.new(name=bone_name_utf8)
- ebo.head[:] = bmat_arm.to_translation()
+
+ # So that our bone gets its final length, but still Y-aligned in armature space.
+ ebo.tail = Vector((0.0, 1.0, 0.0)) * bsize
+ # And rotate/move it to its final "rest pose".
+ ebo.transform(bmat_arm)
+
+ # Connection to parent.
if p_ebo is not None:
ebo.parent = p_ebo
if similar_vectors(p_ebo.tail, ebo.head):
ebo.use_connect = True
- # So that our bone gets its final length, but still Y-aligned in armature space.
- ebo.tail = ebo.head + Vector((0.0, 1.0, 0.0)) * bsize
- # And finally, rotate it to its final "rest pose".
- ebo.transform(bmat_arm.to_3x3())
-
def blen_read_armatures(fbx_tmpl, armatures, scene):
for a_item, bones in armatures:
More information about the Bf-extensions-cvs
mailing list