def onClicked(value): if self.playPause.label.getText() == 'Play': self.playPause.label.setText('Pause') self.timer = mh.addTimer(max(30, int(self.__skeleton.frameTime * 1000)), self.onFrameChanged) else: self.playPause.label.setText('Play') mh.removeTimer(self.timer)
def stopPlayback(self): if not self.playPause: return self.playPause.setText('Play') if self.timer: mh.removeTimer(self.timer) self.timer = None
def povwatch(): if povwatchApp.poll() is not None: gui3d.app.getCategory('Rendering').getTaskByName( 'Viewer').setImage(povwatchPath) mh.changeTask('Rendering', 'Viewer') gui3d.app.statusPersist('Rendering complete') mh.removeTimer(povwatchTimer)
def startPlayback(self): self.playPause.setText('Pause') if self.timer: mh.removeTimer(self.timer) self.timer = None self.timer = mh.addTimer( max(30, int(1.0 / self.anim.frameRate * 1000)), self.onFrameChanged)
def startPlayback(self): self.playPauseBtn.setText('Pause') if self.timer: mh.removeTimer(self.timer) self.timer = None if self.perFramePlayback: self.timer = mh.addTimer(max(30, int(1.0/self.animTrack.frameRate * 1000)), self.onFrameChanged) else: # 30 FPS fixed self.timer = mh.addTimer(30, self.onFrameChanged)
def startPlayback(self): self.playPauseBtn.setText('Pause') if self.timer: mh.removeTimer(self.timer) self.timer = None if self.perFramePlayback: self.timer = mh.addTimer( max(30, int(1.0 / self.animTrack.frameRate * 1000)), self.onFrameChanged) else: # 30 FPS fixed self.timer = mh.addTimer(30, self.onFrameChanged)
def povwatch(): if povwatchApp.poll() is not None: if os.path.exists(povwatchPath): imgpath = os.path.join(path, settings['name'] + '.png') shutil.move(povwatchPath, imgpath) gui3d.app.getCategory('Rendering').getTaskByName( 'Viewer').setImage(imgpath) mh.changeTask('Rendering', 'Viewer') gui3d.app.statusPersist('Rendering complete. Output path: %s' % imgpath) else: log.notice("POV - Ray did not produce an output file!") gui3d.app.statusPersist('Rendering failed!') mh.removeTimer(povwatchTimer)
def startPlayback(self): self.playPause.setText('Pause') if self.timer: mh.removeTimer(self.timer) self.timer = None self.timer = mh.addTimer(max(30, int(1.0/self.anim.frameRate * 1000)), self.onFrameChanged)
def povwatch(): if povwatchApp.poll() is not None: gui3d.app.getCategory('Rendering').getTaskByName('Viewer').setImage(povwatchPath) mh.changeTask('Rendering', 'Viewer') gui3d.app.statusPersist('Rendering complete') mh.removeTimer(povwatchTimer)