I have two Armatures with different bone structure.
The goal is to get the rotational difference of one bone from a one Armature and translate it to the bone of the other Armature.
Code **For a General approach:
import bpy
context = bpy.context
scene = context.scene
Rig_1 = bpy.context.scene.objects['__Rig']
Rig_2 = bpy.context.scene.objects['__Rig2']
Rig_1_RightArm = Rig_1.pose.bones["r_uparm"]
Rig_2_RightArm = Rig_2.pose.bones["r_uparm"]
scene.frame_set(1)
WorldSpace_RightArm_1-1 = Rig1.matrix_world @ Rig_1_RightArm.matrix
bpy.context.view_layer.update()
scene.frame_set(2)
WorldSpace_RightArm_1-2 = Rig1.matrix_world @ Rig_1_RightArm.matrix
WorldSpace_RightArm_2-2 = Rig2.matrix_world @ Rig_2_RightArm.matrix
bpy.context.view_layer.update()
I've tried multiple methods and would like to know what to do beyond here, like using rotation_difference to between WorldSpace_RightArm_1-1 from frame 1 and WorldSpace_RightArm_1-2 from frame 2.