hope this is the right place to ask for help (pose inverse problem)

hi

I’m trying to do a “seemingly” simple thing: (I’m stuck on step4)

  1. pose an armature “ARM1” from REST to POSE-1
  2. shift-D armature “ARM1” to “ARM2” (at POSE-1)
  3. apply as rest pose on “ARM2” (ARM2 REST defaults to POSE-1 now)
  4. apply inverse of POSE-1 to “ARM2”, so that its new pose is now the REST pose of “ARM1”
    My progress so far:

import bpy
for b in bpy.data.objects[“ARM2”].pose.bones:
b.matrix_channel=bpy.data.objects[“ARM1”].pose.bones[b.name].matrix_channel.invert()

AttributeError: bpy_struct: attribute “matrix_channel” from “PoseBone” is read-only

That was my idea, the problem could be more complicated than my simple idea.
Thanks.

Moved from “General Forums > Blender and CG Discussions” to “Coding > Python Support”