Update anim_lib.py

copied from dd