Blending two animations

Hey guys,

I’m trying to use setControlEffect to get from a pose to another. Since a pose is a animation with only one frame, I thought it would work, but nothing happens.

This is how I wrote a part of the code:

def moveBone(self, task):
    df = 1.0 * task.frame / self.delta_frame
    self.human.enableBlend()
    self.human.setControlEffect('human', 1 - df)
    self.human.setControlEffect('human-Anim1', df)
    
    if task.frame < self.delta_frame:
      return task.cont
    else:
      self.human.disableBlend()
      return task.done

Does anybody know why this isn’t working?

You do have to ensure the animation is actively playing. Since it has only one frame, you should loop it.

David