Bone child translation fix attempt

This commit is contained in:
luboslenco 2018-06-15 21:22:36 +02:00
parent 669cea082a
commit e3e3b29762

View file

@ -944,7 +944,10 @@ class ArmoryExporter:
armature = bobject.parent.data
bone = armature.bones[bobject.parent_bone]
if not bone.use_relative_parent:
bone_translation = bone.tail - bone.head
if not bone.use_connect and bone.parent != None:
bone_translation = bone.tail - bone.head
else:
bone_translation = Vector((0, bone.length, 0)) + bone.head
o['parent_bone_tail'] = [bone_translation[0], bone_translation[1], bone_translation[2]]
# Viewport Camera - overwrite active camera matrix with viewport matrix