def _on_tex_change(self, *largs):
    self.texture = self._coreimage.texture
    ci = self._coreimage
    if (self.anim_loop and (ci._anim_index == (len(ci._image.textures) - 1))):
        self._loops += 1
        if (self.anim_loop == self._loops):
            ci.anim_reset(False)
            self._loops = 0
def _on_tex_change(self, *largs):
    self.texture = self._coreimage.texture
    ci = self._coreimage
    if (self.anim_loop and (ci._anim_index == (len(ci._image.textures) - 1))):
        self._loops += 1
        if (self.anim_loop == self._loops):
            ci.anim_reset(False)
            self._loops = 0