save pose preset error with rigify

Issue #1383 resolved
Alessandro Padovani created an issue

daz studio 4.21.0.5, blender 3.4.1, diffeomorphic 1.7.0.1413

There’s an error when using “save pose preset“ with rigify. Works fine with the daz rig and mhx. This is reported in the daz forum and I can confirm the issue.

https://www.daz3d.com/forums/discussion/617431/

steps:

  1. import G8F and merge rigs
  2. convert to rigify
  3. save pose preset

Traceback (most recent call last):
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\error.py", line 214, in execute
self.run(context)
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\animation.py", line 1918, in run
self.saveFile(rig)
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\animation.py", line 2190, in saveFile
struct["scene"]["animations"] = self.getAnimations(rig)
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\animation.py", line 2214, in getAnimations
self.getRot(bname, pb, rots, 1/D, anims)
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\animation.py", line 2303, in getRot
twname,twidx = self.getTwistBone(pb.name)
File "C:\Users\Alessandro\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\import_daz\animation.py", line 2181, in getTwistBone
return twname, BD.TwistDxs[twname]
KeyError: 'neckUpper'

Comments (5)

  1. Thomas Larsson repo owner

    Fixed in last commit. Although I would not recommend using rigify for making pose presets, since its complicated bone structure does not map well to the genesis rigs.

  2. Alessandro Padovani reporter

    daz studio 4.21.0.5, blender 3.4.1

    As for commit 7595612. The error doesn’t arise anymore, but personally I’m unable to export a pose. That is, it seems to only export the figure location. Please let me know if this works for you.

    steps:

    1. import G8F and merge rigs
    2. convert to rigify
    3. pose the figure with ik controls
    4. bake pose to fk rig
    5. save pose preset
    6. load the pose in daz studio

  3. Thomas Larsson repo owner

    The Bake Pose To FK Rig tooltip says “IK arms and legs must be baked separately”. Both rigify and mhx have separate tools for snapping arms and legs, this tool is for baking other bones, like the fingers and spine bones. It might be more intuitive if the plugin would snap arms and legs too. It would be possible for mhx but not for rigify. I think rigify stores a copy of itself so the behaviour will remain the same in future versions of Blender, which is a good idea but means that other addons cannot access the snapping tools. Notice the python name-

  4. Alessandro Padovani reporter

    Thank you for the explanation. Will wait for the reply in the daz forum then mark as resolved if there’s nothing to add.

  5. Log in to comment