System Information
Windows7 64bit
Blender Version
2.73
Short description of error
I exported a file which has two actions and two bones.
First action is named Action1, where first bone is rotated and second bone doesn't have animation.
Second action is named Action2, where first bone and second bone are rotated.
I exported this file as FBX with ASCII mode.
When I select Action1 in Action Editor and export this file, animations are correct.
On the other hand, when I select Action2 in Action Editor and export this file, an animation based on Action1 is incorrect.
Second bone is rotated in the animation.
.blend file and two FBX files.
https://www.dropbox.com/sh/hw14haumrmvofjn/AABvt9Z7m0Yir7RG_OjNeJcQa?dl=0
I think the reason why the animation is incorrect is that a transform isn't cleared when change actions if bone doesn't have animation.
So I make a patch for this bug.
I reset transforms before playing animation.
- D:/Program Files/blender-2.73-windows64/2.73/scripts/addons/io_scene_fbx/export_fbx.py.bak
+++ D:/Program Files/blender-2.73-windows64/2.73/scripts/addons/io_scene_fbx/export_fbx.py
@@ -310,6 +310,9 @@ def save_single(operator, scene, filepath="",
- {frame:posematrix, frame:posematrix, ...} self.__anim_poselist = {}
+ def resetPose(self):
+ self.__pose_bone.matrix_basis.identity()
+
'''
def calcRestMatrixLocal(self):
if self.parent:@@ -402,6 +405,9 @@ def save_single(operator, scene, filepath="",
else:
return self.matrixWorld+ def resetPose(self):
+ return
+
def setPoseFrame(self, f, fake=False):
if fake:
self.__anim_poselist[f] = self.matrixWorld * global_matrix.inverted()@@ -2574,6 +2580,11 @@ Takes: {''')
for my_bone in ob_bones:
my_bone.flushAnimData()
'''+
+ for ob_generic in ob_anim_lists:
+ for my_ob in ob_generic:
+ my_ob.resetPose()
+
i = act_start
while i <= act_end:
scene.frame_set(i)