def capture(self): if self.mode == 2: # free capturing if not self.freeCapture: # start capture and rename button to stop capture self.freeCapture = True self.widget().buttonCapture.setText( coTranslate("Stop Free Capturing")) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) else: # stop capturing self.freeCapture = False self.widget().buttonCapture.setText( coTranslate("Start Free Capturing")) msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) elif self.mode == 0: # turntable animation 10 sec if self.freeCapture: self.freeCapture = False msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRTurnTableAnimationMsg(10.0) covise.sendRendMsg(msg.c_str()) else: # turntable animation 20 sec if self.freeCapture: self.freeCapture = False msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRTurnTableAnimationMsg(20.0) covise.sendRendMsg(msg.c_str())
def startPreview(self): if self.mode == 0: msg = coGRTurnTableAnimationMsg(10.0) covise.sendRendMsg(msg.c_str()) if self.mode == 1: msg = coGRTurnTableAnimationMsg(20.0) covise.sendRendMsg(msg.c_str())
def capture(self): if self.mode == 2: # free capturing if not self.freeCapture: # start capture and rename button to stop capture self.freeCapture = True self.widget().buttonCapture.setText(coTranslate("Stop Free Capturing")) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) else: # stop capturing self.freeCapture = False self.widget().buttonCapture.setText(coTranslate("Start Free Capturing")) msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) elif self.mode == 0: # turntable animation 10 sec if self.freeCapture: self.freeCapture = False msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRTurnTableAnimationMsg(10.0) covise.sendRendMsg(msg.c_str()) else: # turntable animation 20 sec if self.freeCapture: self.freeCapture = False msg = coGRSnapshotMsg(self.filename, "stopCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRSnapshotMsg(self.filename, "startCapturing") covise.sendRendMsg(msg.c_str()) msg = coGRTurnTableAnimationMsg(20.0) covise.sendRendMsg(msg.c_str())
def turntableAnimation(self): _infoer.function = str(self.turntableAnimation) _infoer.write("") time = covise.getCoConfigEntry("vr-prepare.TurntableAnimationTime") fTime = 10.0 if (time != None): try: fTime = float(time) except exception.ValueError: pass msg = coGRTurnTableAnimationMsg(fTime) covise.sendRendMsg(msg.c_str())