Adding constraint after import armature in blender

Issue #1140 resolved
Алексей Беседин created an issue

Hi, I probably did the wrong thing by saving several characters in one file, and importing them into the blender all at once
But with this type of import, constrains are not added to the bones
Perhaps it is possible to transfer the constrains from another armature on which they are? Or perhaps it is worth adding the ability to add constrains with one button to already imported armatures?

Comments (14)

  1. Alessandro Padovani

    In general figures need to be imported in rest pose to be used for animation. So if you imported a scene with posed figures it makes little sense to add constraints, because with a posed figure they’ll not work as intended.

  2. Алексей Беседин Account Deactivated reporter

    Thanks for the answer, I understand this, all the figures that I imported, they are in a normal A-pose, they just don't have constrains for some reason, although when I tried to import them one by one, creating a separate daz file for each, all the constrains were in place
    It's just that it takes quite a while to reconfigure and re-import 10 characters one by one, I was hoping there was a quick way to copy or add all the constrains to existing armatures

  3. Alessandro Padovani

    If you used easy import I’m not sure multiple figures are supported. Better wait for the answer by Thomas.

  4. Thomas Larsson repo owner

    Limit location/rotation constraints are not generated for posed bones, whether the scenes contains a single or multiple characters. Here is a posed character, imported with different settings for Mesh Fitting. If fitting = Unmorphed, the rest pose is A-pose, and the limit constraints are generated => bones turn green. If fitting = DBZ, the limit constraints are not generated because the imported pose becomes the rest pose. A few bones are still green, but that is because bones were made posable and have copy location/rotation constaints. Limit constraints are gone.

  5. Thomas Larsson repo owner

    Easy Import handles scenes with multiple characters, although it can get confused sometimes, e.g. if there are several figures of the same type and some of them are hidden. Thus you should be able to import a scene and render it in Blender. But I don’t work with multi-character scenes myself so there may be bugs. Here is an example, first DS then Blender.

  6. Alessandro Padovani

    daz studio 4.15.0.30, blender 3.2.2, diffeomorphic 1.6.2.1170

    I can confirm the issue. When there’s multiple figures in the scene the constraints are imported only for the first figure in the daz scene. There’s also a stange issue with merge rigs. Test scene included multi-g8f.duf.

    note. important. Please note that the figures are in rest pose but at different positions in the daz scene. I also tried with all the figures in rest pose at zero position and the issue is the same, only the first figure in the daz scene gets the constraints.

    steps:

    1. import the test scene multi-g8f.duf as dbz
    2. merge rigs

    Below it’s the test scene. We can see that the constraints are only imported for the pear figure that’s the first in the daz scene. The standard and emaciated figures don’t get the constraints.

    Also when we merge rigs for the emaciated or pear figures, a strange dotted line appears that I don’t know what it means. Seems a hierarchy relation but there’s no parent. The coordinates seem right and the original armatures don’t have it. It doesn’t happen if we merge rigs for the figure at zero position. The dotted line is carried around when we move the figure.

    edit. note. A quick fix for the dotted line is to move the figure at zero, then merge rigs, then move the figure back at the original location.

  7. Alessandro Padovani

    Please @Thomas let us know if multiple figures are not supported, so I’ll mark as invalid. In this case the docs should be updated with the limitation for the users to be aware.

  8. Алексей Беседин Account Deactivated reporter

    I'm sorry I missed some updates on this topic
    In my case, the order of actions was exactly the same as Alessandro's, only I used five gm8 figures, and there are constraints on only one figure
    By the way, these dotted lines are relationships lines, they lead to the origin of the object to which the active object is parented, they can be disabled in overlays tab

  9. Alessandro Padovani

    As for the dotted line, that’s the same I thought as reported above, but there’s no parent relation so I can’t figure out what they are displayed for. Of course they can be disabled, this is not the point. The point is they shouldn’t be displayed in the first place since there’s no parent.

  10. Thomas Larsson repo owner

    The tongue issue is fixed too now. It appears to be a Blender issue, but when I did the same thing in a different way the problem disappeared.

    I have no idea about the dotted line. It seems harmless though.

  11. Alessandro Padovani

    Commit b7b3e40 works fine.

    The fix for the dotted line is simple. You could make “merge rigs” do it when the armature is not at zero position. Otherwise we have to do it by hand for every figure. Let me know if there’s any reason to don’t implement it, so I’ll mark as resolved.

    steps:

    1. move the armature at zero position
    2. merge rigs
    3. move back the armature at the original position

  12. Log in to comment