Applying pose with 0 slider settings is impossible

Issue #1474 resolved
Rakete created an issue

I ran into this problem a while ago and never said anything about it, but it seems this problem is still present (I fixed it in my own repo and so this fix might be obsolete because of other changes I don’t know about yet).

def convertMorphAnim(self, vanim, rig):
        print("convertMorphAnim", vanim, rig)
        def nonzero(frames):
            # - when there is only one frame then return True because then
            # we're applying a pose and want to set sliders to zero if the
            # pose presets says we need to set them to zero
            if len(frames) == 1:
                return True
            for value in frames.values():
                if value != 0:
                    return True
            return False

In convertMorphAnim, animations that only consists of frames that have 0 as value are skipped. But when a single pose is applied, the same code is used. So when you try to apply a pose that has a slider specifically set to 0, then it is not applied.

Comments (2)

  1. Thomas Larsson repo owner

    I had trouble to understand what you were after, because when I import expressions I usually leave the Clear Morphs option enabled, and then all sliders are set to zero by default. But that is actually a bad habit, since it destroys morphs affecting other parts of the body when a new facial expression is loaded. So in the last commit the nonzero check is removed altogether, and the Clear Morphs option is disabled by default.

  2. Log in to comment