本文整理汇总了Python中PartModuleVis.PartModuleVis.run方法的典型用法代码示例。如果您正苦于以下问题:Python PartModuleVis.run方法的具体用法?Python PartModuleVis.run怎么用?Python PartModuleVis.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartModuleVis.PartModuleVis
的用法示例。
在下文中一共展示了PartModuleVis.run方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例2: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例3: registerCOVISEkey
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例4: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例5: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例6: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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)
示例7: run
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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()
示例8: setParams
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import run [as 别名]
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()