2
$\begingroup$

I have two different meshes (A1 and A2) that are each skinned to an armature (B1 and B2, identical in setup) that currently have different rest poses applied. I want to copy the rest pose from armature B1 to armature B2, so they are identical. How would I go about doing this?

I've tried using the Pose -> Copy Pose/Paste Pose feature between the armatures, but that won't work, as it seems to be using the current rest-poses as reference starting points, and those differ from one armature to the next.

Any suggestions?

I am using Blender v2.70 (can't use 2.71 due to FBX exporter not supporting shape keys).

$\endgroup$
1
$\begingroup$

You could use a Pose Library to store and reassign as many poses as you want.

A Pose Library can also be shared among the rigs. Technically it is an Action, thus it can also be edited in the Action Editor mode of the Dope Sheet.

enter image description here

$\endgroup$
  • $\begingroup$ How does one share a Pose Library between rigs, though? I do have one pose stored in such a library on one of the rigs, but I am unable to access it from the other rig (it shows as empty). $\endgroup$ – Xoduz Jul 9 '14 at 18:31
  • $\begingroup$ I've added an image on how the poselib can be selected. $\endgroup$ – stacker Jul 9 '14 at 19:04
  • $\begingroup$ Ah, right. Found it, thanks. Unfortunately, the poses stored in the Pose Library also seem to rely on the current restpose of the rig as starting point when applying the pose from the pose-library. So if I move an arm in the original rig, store the pose in the pose library and then apply it to the second rig, the arm moves the same distance - but using a different starting point, so ends up at a different place. $\endgroup$ – Xoduz Jul 9 '14 at 19:10
  • $\begingroup$ When you apply a pose only the selected bones will be affected. $\endgroup$ – stacker Jul 9 '14 at 19:13
  • $\begingroup$ Yep, but I have tried with only a single bone selected (stored pose from one bone, applied it to same bone in different rig) and with all bones selected. The pose transfers - but is applied using the rest-pose of the rig as starting point, and those rest-poses differ between the rigs (which is the essence of my problem - I need them to match). $\endgroup$ – Xoduz Jul 9 '14 at 19:54
1
$\begingroup$

Whelp. I found a method for achieving what I was after. It was easier than I thought, too! I simply added constraints to the bones in rig B2 that copied rotation/location/scale/transformations from rig B1. That got me matching poses, and from there I could take the next step - to join mesh A2 to mesh A1 as a shape key, something I couldn't do while the poses were mis-matched. Problem solved!

$\endgroup$
  • 1
    $\begingroup$ Am I missing something, or do I need to do that to each bone individually? How hard did you think it was? $\endgroup$ – DanielLC Oct 22 '15 at 5:58
  • $\begingroup$ @DanielLC I had to do the same thing. I could not figure out an easy way to do it in the GUI, but I did make it happen with some scripting. $\endgroup$ – jpaugh Nov 10 '19 at 21:46
0
$\begingroup$

Note

This answer doesn't actually quite work, but I think it's close. I think I have to set the newConstraint.subtarget to match the same bone from the target armature, but I don't know a good way to do that in the script.

Instructions

You can use a Copy Transforms constraint to copy the pose of an individual bone. Then, once you have the settings right, you can use Python scripting to copy that constraint to every bone.

  1. First, select one (and only one) bone, and add a Copy Transforms constraint, with the following settings:

    • target is the armature you want to copy from
    • target space should be set to Local Space; but the owner space (the coordinate space for the bone we're constraining) should be set to World Space, as seen below:

      Target and owner space as shown in the UI

    • Leave the other settings as shown below:

      Default Settings: No bone selected; Mix mode is *replace*; Influence is 1.0

  2. With the same, bone selected, go to the Scripting tab, and save off the the constraint to a variable

    >>> template = bpy.context.selected_pose_bones[0].constraints[-1]
    >>> template.name # Verify the name
    'Copy Transforms'
    

    constraint[-1] should be the last constraint added; constraints[0] is the first constraint, but if you have multiple, you might have to try [1] or other indicies until you get the right one.

  3. Go back to the Layout tab, and select all the bones (shortcut: a).

  4. Go back to the Scripting tab, and save the selected list of bones

    >>> bones = bpy.context.selected_pose_bones[:] # Make a copy
    

    You are now free to change your selection in the Layout tab without affecting the contents of the bones variable.

  5. Loop through all of the selected bones, adding a new constraint and copying the settings from the template

    >>> for bone in bones:
    ...     newConstraint = bone.constraints.new('COPY_TRANSFORMS')
    ...     newConstraint.target = template.target
    ...     newConstraint.target_space = template.target_space # 'WORLD'
    ...     newConstraint.owner_space = template.owner_space # 'LOCAL'
    
  6. You're done! Go back to the Layout tab, and verify that the armature is now in the correct pose.

Notes

  • These instructions should not require any scripting knowledege, unless something goes wrong. In that case, you will gain scripting knowledge by figuring out what's wrong. :-)
  • I did this with a pre-release of 2.82, but I would expect it to work in all versions, perhaps with some of the code tweaked slightly.
  • At the end, the selected armature will be in the same orientation as the target armature, but it will not be in the same location. (Its "object" origin will remain at its original world coordinate.) I believe setting the target space to World would have moved the selected armature to the same location as the target
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.