Pose_bone.matrix works only for the first bone if they are parented

Hi all,
i try to copy the bones matrices from one bone chain to another to so they share the same loc,rot,scale but i works only if they are not parented.

import bpy

IK = ['Bone.019','Bone.020','Bone.021','Bone.022','Bone.023','Bone.024']
FK = ['Bone.013','Bone.014','Bone.015','Bone.016','Bone.017','Bone.026']
for i in range(len(IK)):
      bpy.data.objects['Armature'].pose.bones[IK[i]].matrix = bpy.data.objects['Armature'].pose.bones[FK[i]].matrix

i want exactly this behaviour but no matter if the bone is parented or not.
Help is welcome.

found the solution.

1 Like