示例#1
0
 def play(self):
     """
     :rtype: None
     """
     if self.imageSequencePath():
         if not self.imageSequence():
             imageSequence = studioqt.ImageSequence()
             imageSequence.setDirname(self.imageSequencePath())
             imageSequence.frameChanged.connect(self._frameChanged)
             self.setImageSequence(imageSequence)
         self.imageSequence().start()
示例#2
0
    def play(self):
        """Start playing the image sequence movie."""
        self.resetImageSequence()
        path = self.imageSequencePath() or self.thumbnailPath()

        movie = None

        if os.path.isfile(path) and path.lower().endswith(".gif"):

            movie = QtGui.QMovie(path)
            movie.setCacheMode(QtGui.QMovie.CacheAll)
            movie.frameChanged.connect(self._frameChanged)

        elif os.path.isdir(path):

            if not self.imageSequence():
                movie = studioqt.ImageSequence(path)
                movie.frameChanged.connect(self._frameChanged)

        if movie:
            self.setImageSequence(movie)
            self.imageSequence().start()