def performPatching(cls): """ Actual run the ops to generate the scene """ cls.controller.change_selected_version(cls.selectedVersion) cls.failedOps = [] cls.totalOpsCount = 0 for (ops, description, details) in cls.patchOps: cls.totalOpsCount += len(ops) for op in ops: try: CaptureAPI.unpickleAndPerformOperation(op) except: pass CaptureAPI.refreshApp()
def finish(cls, accepted): """ Clean up everything """ if accepted: for (ops, description, details) in cls.patchOps: opstr = "" for op in ops: opstr += op cls.controller.update_scene_script(description, details, 0, opstr) else: cls.controller.update_app_with_current_version(0, False) CaptureAPI.refreshApp() cls.restoreVisTrails()
def showNextVersion(self): """ Show the next version and return True if there are more to show """ if (not self.isVisible() or self.playPauseAction.text()=='Play'): return False if self.currentFrame+1>=len(self.frames): return False if self.frames[self.currentFrame]!=self.controller.current_version: self.controller.change_selected_version(self.frames[self.currentFrame]) else: self.setCurrentFrame(self.currentFrame+1) self.controller.change_selected_version(self.frames[self.currentFrame]) CaptureAPI.refreshApp() return self.currentFrame+1<len(self.frames)