Skip to content
Snippets Groups Projects
Commit e8244eb4 authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF exporter: Fix only def bone export when parent are different (def -> nondef -> def)

parent ce6f3d3f
No related branches found
Tags v3.2.0
No related merge requests found
......@@ -4,7 +4,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (3, 2, 39),
"version": (3, 2, 40),
'blender': (3, 1, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
......
......@@ -391,8 +391,9 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
parent_uuid = export_settings['vtree'].nodes[export_settings['vtree'].nodes[blender_obj_uuid].bones[bone.name]].parent_uuid
if parent_uuid is not None and export_settings['vtree'].nodes[parent_uuid].blender_type == VExportNode.BONE:
# export bone is not at root of armature neither
blender_bone_parent = export_settings['vtree'].nodes[parent_uuid].blender_bone
correction_matrix_local = (
bone.parent.bone.matrix_local.inverted_safe() @
blender_bone_parent.bone.matrix_local.inverted_safe() @
bone.bone.matrix_local
)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment