def run(self, runmode, negMsgHandler): if os.getenv('VR_PREPARE_DEBUG_RUN'): print("PartTracerVis.run") """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the tracer module """ assert negMsgHandler if runmode == RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartColoredVis.run(self, runmode, negMsgHandler, self._module, self.fromRecreation) PartModuleVis.run(self, runmode, negMsgHandler) PartInteractorVis.run(self, runmode, negMsgHandler)
def run(self, runmode, negMsgHandler): """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the module """ assert negMsgHandler if runmode == RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartColoredVis.run( self, runmode, negMsgHandler, self._module, self.fromRecreation) # self._module is not used! PartModuleVis.run(self, runmode, negMsgHandler) #self._sendMatrix() if self.params.coloringOption == RGB_COLOR: self.__sendColor()
def run(self, runmode, negMsgHandler=None): if os.getenv('VR_PREPARE_DEBUG_RUN'): print("coColorCreator.run") if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go Part2DRawVis") self.__update(negMsgHandler) #if a variable is chosen, run PartColoredVis if self.params.variable!=None and self.params.variable!= 'Select a variable' and self.params.color == VARIABLE: # At the moment the collect might be executed twice. # The "pre-run"-disconnect of PartColoredVis does not work here, # because our collect is connected to a different port of the colors module (compared to all the other visualizers). colorExecuted = PartColoredVis.run(self, runmode, negMsgHandler, self._module) PartModuleVis.run(self, runmode, negMsgHandler) if self.params.color==MATERIAL: self.__sendMaterial() elif self.params.color==RGB_COLOR: self.__sendColor() self.__sendTransparency() if (self.params.shaderFilename != ""): self.__sendShader() self.__runChildren(runmode, negMsgHandler)
def run(self, runmode, negMsgHandler=None): if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") self.__update(negMsgHandler) PartModuleVis.run(self, runmode, negMsgHandler) self.__runChildren(runmode, negMsgHandler)
def registerCOVISEkey( self, covise_key): """ called during registration if key received from COVER + update states in COVER """ (registered, firstTime) = VisItem.registerCOVISEkey( self, covise_key) if registered: # set parameters of transformation modules, but dont execute self._setTransform() # run visualizer so it gets correctly connected to previous modules of the import managers PartModuleVis.run(self, RUN_ALL, None) return (True, firstTime) return (False, False)
def run(self, runmode, negMsgHandler): """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the module """ assert negMsgHandler if runmode == RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartModuleVis.run(self, runmode, negMsgHandler)
def run(self, runmode, negMsgHandler): """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the module """ assert negMsgHandler if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartModuleVis.run(self, runmode, negMsgHandler)
def run(self, runmode, negMsgHandler): return # TODO: probe is not working at the moment: stuck in saveExecute (data or grid missing) """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the tracer module """ assert negMsgHandler if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartColoredVis.run(self, runmode, negMsgHandler, self._module, self.fromRecreation ) PartInteractorVis.run(self, runmode, negMsgHandler) PartModuleVis.run(self, runmode, negMsgHandler)
def run(self, runmode, negMsgHandler): if os.getenv('VR_PREPARE_DEBUG_RUN'): print("PartIsoSurfaceVis.run") """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the tracer module """ assert negMsgHandler if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartColoredVis.run(self, runmode, negMsgHandler, self._module, self.fromRecreation ) PartModuleVis.run(self, runmode, negMsgHandler)
def run(self, runmode, negMsgHandler): """ create a new visulisation + register for events from Covise if not done yet + runmode RUN_GEO and RUN_OCT are ignored + update module parameter + exec the module """ assert negMsgHandler if runmode==RUN_ALL: _infoer.function = str(self.run) _infoer.write("go") if not hasattr(self, 'importModule'): return self.__update(negMsgHandler) PartColoredVis.run(self, runmode, negMsgHandler, self._module, self.fromRecreation ) # self._module is not used! PartModuleVis.run(self, runmode, negMsgHandler) #self._sendMatrix() if self.params.coloringOption == RGB_COLOR: self.__sendColor()
def setParams( self, params, negMsgHandler=None, sendToCover=True): """ set parameters from outside + init tracer module if necessary + mainly receive parameter changes from Gui + send status messages to COVER if state has changed """ _infoer.function = str(self.setParams) _infoer.write(" ") # save the old variable to delete from colorTable oldVariable = self.currentVariable() oldTable = None if oldVariable!=None and oldVariable!= 'Select a variable': if hasattr(self.params.colorTableKey, oldVariable): oldTable = globalKeyHandler().getObject(self.params.colorTableKey[oldVariable]) realChange = ParamsDiff( self.params, params ) PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange) if self.params.color == VARIABLE: PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange) PartTransform.setParams(self, params, negMsgHandler, sendToCover, realChange) needsTransparency = False needsShader = False if hasattr (params, 'color') and (params.color == NO_COLOR) \ and ('color' in realChange): # disconnect colors module and run the collect module # (we dont want to call run since we dont need the children to be executed) if not self.__lastColorConnection==None: disconnect(self.__lastColorConnection, ConnectionPoint(self._module, 'DataIn0')) self.__lastColorConnection=None PartModuleVis.run(self, RUN_ALL, negMsgHandler) needsTransparency = True elif hasattr (params, 'color') and (params.color==RGB_COLOR) \ and (('color' in realChange) or ('r' in realChange) or ('g' in realChange) or ('b' in realChange)): self.__sendColor() needsTransparency = True elif hasattr (params, 'color') and (params.color==MATERIAL) \ and (('color' in realChange) or ('r' in realChange) or ('g' in realChange) or ('b' in realChange) \ or ('ambient' in realChange) or ('specular' in realChange) or ('shininess' in realChange)): self.__sendMaterial() needsTransparency = True elif hasattr(params, 'transparency') and ('transparency' in realChange): needsTransparency = True if 'variable' in realChange: # if variable changed append key to colorTable dependant keys # make sure this part is updated if colormap changes if params.variable!=None and params.variable!= 'Select a variable' and params.color == VARIABLE: # delete key from old colorTable if not oldTable == None and self.key in oldTable.params.dependantKeys: oldTable.params.dependantKeys.remove(self.key) # add key to new colorTable cTableObject = globalKeyHandler().getObject(params.colorTableKey[params.variable]) params.baseObjectName = params.name if self.key not in cTableObject.params.dependantKeys: cTableObject.params.dependantKeys.append(self.key) if negMsgHandler: negMsgHandler.internalRecvParams( cTableObject.key, cTableObject.params ) negMsgHandler.sendParams( cTableObject.key, cTableObject.params ) if ('shaderFilename' in realChange): needsTransparency = True needsShader = True # always send transparency before shader: # sendTransparency will ignore any shader transparency but sendShader respects the regular transparency if possible if needsTransparency and (params.shaderFilename != ""): needsShader = True if needsTransparency: self.__sendTransparency() if needsShader: self.__sendShader()