I’ve been reading a file which contains “relative to parent” translation/rotation transformation from every bone in the skeleton on every frame.
I tried to use this way which worked loading the skeleton on edit bones, but I’m still pretty new about 3D and Blender in general.
# Check frame by frame.. check every pose bone from current frame, then apply transformation below and continue to the next since they are hierarchy ordered already # Set transformation from parent through bone matrix poseBone.matrix = poseBone.parent.matrix if poseBone.parent else Matrix() poseBone.matrix = poseBone.matrix @ Matrix.Translation(Vector(keyframe['parent_translation'])) @ Quaternion(keyframe['parent_rotation']).to_matrix().to_4x4() poseBone.keyframe_insert('location',frame=keyframes[i]) poseBone.keyframe_insert('rotation_quaternion',frame=keyframes[i])
I’m basically setting the matrix to the parent and applying transformation from there but the animation results are not as expected. The animation is there but then something is missing.
You can take a look to the values stored, maybe I’m wrong and the values are not “relative to parent” but something else. chinawoman_vendor01.json (1.1 MB)
Any kind help is highly appreciated, thanks!