collada-exporter icon indicating copy to clipboard operation
collada-exporter copied to clipboard

Incorrect rest pose

Open artellblender opened this issue 6 years ago • 3 comments

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.

artellblender avatar Feb 19 '19 22:02 artellblender

File to demonstrate the issue: test.zip

1

artellblender avatar Feb 20 '19 11:02 artellblender

I've fixed it in a patch along the 2.8 update https://github.com/godotengine/collada-exporter/pull/100

artellblender avatar Feb 20 '19 12:02 artellblender

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.

jitspoe avatar Jul 30 '19 09:07 jitspoe