DummyRoot data injection for ZA, matrix_local-with-bone-parent bug workaround, ENVL indicies start from one (fixing ZE bug), auto transform application for children of bones in a skeleton used for skinning done but commented out for further decision

This commit is contained in:
Will Snyder
2020-11-29 18:32:17 -05:00
parent 20ad9a48d5
commit 791a033d08
6 changed files with 79 additions and 30 deletions

View File

@@ -32,7 +32,10 @@ def extract_anim(armature: bpy.types.Armature) -> Animation:
anim.bone_transforms[bone.name] = []
for frame in range(num_frames):
#if frame % 10 == 0:
# print("Sample frame {}:".format(frame))
frame_time = framerange.x + frame * increment
bpy.context.scene.frame_set(frame_time)
@@ -50,6 +53,9 @@ def extract_anim(armature: bpy.types.Armature) -> Animation:
xform.rotation = convert_rotation_space(rot)
xform.translation = convert_vector_space(loc)
#if frame % 10 == 0:
# print("\t{:10}: loc {:15} rot {:15}".format(bone.name, vec_to_str(xform.translation), quat_to_str(xform.rotation)))
anim.bone_transforms[bone.name].append(xform)
return anim