collada-exporter
collada-exporter copied to clipboard
Incorrect rest pose
Hello, Thanks for this great exporter! I've noticed one issue: it does not export the right bind pose/rest pose when the animations are not in rest pose on the first frame. Instead, the pose at the first frame is set as the bind pose. Is this a known issue of this exporter, or am I missing something? By the way, i've updated the code to Blender 2.8, in case you're interested i'll submit a pull request.
I've fixed it in a patch along the 2.8 update https://github.com/godotengine/collada-exporter/pull/100
Nice. I ended up fixing this same issue myself. Funny thing is that it was setting it to the REST pose, but didn't force the scene to update. Here's what I did:
if(armature_modifier):
#doing this per object is inefficient, should be improved, maybe?
armature_poses = [arm.pose_position for arm in bpy.data.armatures]
for arm in bpy.data.armatures:
print(arm.pose_position)
arm.pose_position = "REST"
arm.update_tag()
bpy.context.scene.frame_set(bpy.context.scene.frame_current)
Curious what fixed it in your change. Didn't see anything at a quick glance.