One limitation I’ve been running into is that once I merge armatures, then saving poses for them is not really possible anymore. I care particularly about saving poses for merged Face Controls, but it applies to all kinds of armatures.
To solve that problem I started implementing a way to save hierarchical pose presets in these commits:
The main change there is that I add a DazId to all PoseBones which identifies which armature those bones are from. Then I use that information to write a hierarchical pose preset. I tested this with a figure and the Face Controls merged, and when I applied the saved pose to the figure it was applied to both the figure and the Face Controls. Note the Face Controls need to be parented to the head for this to work, diffeo doesn’t actually do that by default and I don’t know if the information is actually available from loading the scene (it is parented to the figure, but the information that within that figure it is parented to the head bone is missing I think), I just do that in my wrapper code that is not part of diffeo instead.
Currently this only supports bones, morphs will not be saved in the hierarchical pose preset, and for modifiers I wonder if it is even possible. A pose preset can only have pose controls, not modifiers. But either way, what I still need to do to save morphs is a way to get the morph assets url(?) from the morph property so I can store that in the pose preset. I started with this here:
which just adds a way for me to add something to the ui.description of a prop. That is as far as I can tell the only real way how I could store a prop… on a prop. Otherwise I would have to do something like DazBoneMap maybe, but for props.
The code is kind of incompatible with old scenes, so it will not work unless you import a new scene. I also didn’t implement any UI for it, I just call diffeo through its operators so I only need the useHierarchicalPreset property.
I also added useExtraBones so that bones of merged armatures will be saved into the pose or not. And skipFollowers which skips bones that follow the parent armature (through CopyTransforms), this is so poses for un-merged followers can be saved without also saving all of the parent bones, which messes up the pose when you apply it in Daz to a follower.