MHX pole-target-parent switching not working

Issue #804 resolved
jeroen b created an issue

The latest dev. version of MHX runtime offers the option to change the pole target parent for IK, but it does not work.

Parenting of the pole targets remain fixed to what was initially chosen when converting the armature to MHX.

Comments (14)

  1. Thomas Larsson repo owner

    This is very weird. I saw the problem in B3.0 but not in B2.93. Then I toggled in and out of edit mode once, and the problem was gone in B3.0 as well. And now I cannot reproduce it anymore. Even if I restart B3.0 and import an new character, the problem is gone.

  2. jeroen b reporter

    I try to do what you suggest; toggle in and out of edit mode but the problem persists. As you can see in the UI the pole parent is set to “hand”, but is in fact still parented to the shoulder. Same thing with the poles for the legs.

    To make sure there is a picture showing the versions of the addons.

    BTW; I am using Blender 3.0

  3. Alessandro Padovani

    Personally I don’t use this option because I can’t understand what it is for. I mean it is not dynamic parenting so it can’t work in animation. IIRC it was requested by @engetudouiti for posing, but it is just clunky in my opinion compared to auto-ik #210 if posing is what we look for.

    edit. I can’t reproduce the issue here, works fine for me both with blender 2.93 and 3.0. As a side note I don’t see how the picture above shows the issue. The pole target is for elbows and knees so the clavicle has nothing to do with it. Below it’s the pole parented to the shoulder for example.

    edit. Of course if I change the parent in animation it doesn’t work, that is, the pole can’t keep its position in the other keyframes with a different parent. But this is expected since it’s not dynamic parenting. The parent switch itself works fine though.

  4. jeroen b reporter

    Alessandro, the pole is in fact parented to “arm.parent.L” rotation of the shoulder is for demonstration purpose, since the hand is selected as parent.

    I tried a new character and this seems to work better. Setting pole target to shoulder results in parenting to “arm.parent.L”. Parenting to hand results in parenting to “elbowPoleP.L”, in this case rotation of the hand IK does not do much but is maybe intentional (confusing though).

    Setting to Master works as expected, also in my blendfile (after repeated switching to edit mode)

    It is likely that I created my MHX rig with an older version that could cause the problem, marked as trivial.

  5. Thomas Larsson repo owner

    The mhx rig has been redesigned and now uses child-of constraints instead of hard parents for the pole targets. This means that we never have to enter edit mode to change parents, so it can be done also with library overrides. In principle at least, but I have managed to crash blender when switching parents.

    This led to some other changes. It is now only possible to convert a rig to mhx if the mhx rts addon is enabled, to avoid that the mhx properties are defined in two different places. Also, mhx will not work in Blender 2.83 and before, since it relies on library overrides that were introduced in Blender 2.90. I don’t think is an issue, although it will be important to keep support for Blender 2.92 which is the last version that can be officially used on Windows 7.

    So the issue above should be gone for newly generated mhx rigs, but it is quite possible that I introduced other problems.

  6. Alessandro Padovani

    Commit a5d4125 seems to work as intended.

    Personally I don’t see any advantage over the previous implementation. I mean, the parent bone can’t be keyframed anyway, only the influence can, thus this can’t be animated and it’s only good for posing. As before the pole can’t keep its position in the other keyframes with a different parent. Unless I miss something.

  7. Alessandro Padovani

    Thomas, if you dare to try below there’s an example I made for a grabber using the child constraint. Essentially the prop is a child of pin and grabber, then the influence goes to the keeper during the animation. The same could be for the poles with three parents.

    Beware that the child constraint is not easy to manage. In my example I had to use “set inverse” at frame 25 when the grabber takes the prop, but not at frame 85 when the pin takes back the prop. Because at the start of the animation the pin and the prop share the same location. Also please note that the prop doesn’t get any location keyframe but only has influence keyframes since it always belongs to a parent.

    If it was for me, I’d discard this “runtime parenting“ of the poles all together since in my opinion this is only confusing and doesn’t help animation. But I understand different people may have different needs, strange as they can seem to me.

  8. Thomas Larsson repo owner

    Well, I don’t really switch parents myself either, but somebody requested it and it is nice that it works with file linking. However, I realised yesterday that rna properties aren’t keyable, so that takes away the point. It seems like you can keyframe id properties but not rna properties (attributes in python). Was it always thus?

    OTOH, boolean id properties are displayed as integers, and cannot have update functions, so in practice only the float properties are keyable.

  9. Log in to comment