diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 22cd25c07ea8c8da651a38ce8dcf4455ac7fbc89..8a1e1a2eec90603bda5d0d3bb9fff890fe0bb92f 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -1888,6 +1888,8 @@ def fbx_animations(scene_data): # We can't play with animdata and actions and get back to org state easily. # So we have to add a temp copy of the object to the scene, animate it, and remove it... :/ ob_copy = ob.copy() + # Great, have to handle bones as well if needed... + pbones_matrices = [pbo.matrix_basis.copy() for pbo in ob.pose.bones] if ob.type == 'ARMATURE' else ... if ob.animation_data: org_act = ob.animation_data.action @@ -1906,9 +1908,15 @@ def fbx_animations(scene_data): add_anim(animations, fbx_animations_do(scene_data, (ob, act), frame_start, frame_end, True, {ob_obj}, True)) # Ugly! :/ + if pbones_matrices is not ...: + for pbo, mat in zip(ob.pose.bones, pbones_matrices): + pbo.matrix_basis = mat.copy() ob.animation_data.action = None if org_act is ... else org_act restore_object(ob, ob_copy) + if pbones_matrices is not ...: + for pbo, mat in zip(ob.pose.bones, pbones_matrices): + pbo.matrix_basis = mat.copy() if org_act is ...: ob.animation_data_clear() else: