fanim_timeline.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:gimp-fanim 作者: douglasvini 项目源码 文件源码
def start(self):

        while  self.timeline.is_playing:
            time.sleep(1.0/self.timeline.framerate)

            self.timeline.on_goto(None,NEXT)

            # while has fixed frames jump to the next
            while self.timeline.frames[self.timeline.active].fixed:
                if not self.timeline.is_replay and self.timeline.active >= len(self.timeline.frames)-1:
                    self.timeline.on_toggle_play(self.play_button)

                self.timeline.on_goto(None,NEXT)

            # if all frames is already played, and is no replay, stop the loop.
            if not self.timeline.is_replay and self.timeline.active >= len(self.timeline.frames)-1:
                self.timeline.on_toggle_play(self.play_button)

            # call gtk event handler.
            while gtk.events_pending():
                gtk.main_iteration()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号