def __start(self): self._module = OpenCOVER() if covise.coConfigIsOn("vr-prepare.UseCOVERRenderer"): from coPyModules import COVER self._module = COVER() theNet().add(self._module, theNet().getLocalHost()) if not self.__winId==None: self._module.set_WindowID(self.__winId)
class COVERModule(CoviseNetAccessModule): def __init__(self, negMsgHandler=None, winId=None): self.__winId = winId self.__start() self.__alive = True self.__msgHandler = negMsgHandler def restart(self): rendererRestartPreCommand = covise.getCoConfigEntry("vr-prepare.RendererRestartPreCommand") if rendererRestartPreCommand: os.system(rendererRestartPreCommand) self.__start() def __start(self): self._module = OpenCOVER() if covise.coConfigIsOn("vr-prepare.UseCOVERRenderer"): from coPyModules import COVER self._module = COVER() theNet().add(self._module, theNet().getLocalHost()) if not self.__winId==None: self._module.set_WindowID(self.__winId) #print("********************* set WinId", self.__winId) def died(self): self.setAlive(False) if self.__msgHandler: self.__msgHandler.sendFinishLoading() def setAlive( self, isAlive): self.__alive = isAlive def isAlive(self): return self.__alive def connectionPoint(self): return ConnectionPoint(self._module, 'RenderData')