Copy all arm rotations to the other arm

I have a pose in which the complete right side/arm (so shoulder, arm, forearm, hand and fingers) are in a T pose. Now I want to bring the left side/arm in the T pose also. Is there a way I can copy the rotations, but inverse them in a sense, from the right side to the left using a script? For reference my model is oriented towards the negative y direction.
Thanks

if your bone have naming convention like Bone.L or Bone_L

you can select the bone that you want to mirror and use :

# copy pose on selected bones
bpy.ops.pose.copy()
# paste pose but on mirror side
bpy.ops.pose.paste(flipped=True)

Thank you, it worked!

1 Like