当前位置: 首页>>代码示例>>Python>>正文


Python PartModuleVis.run方法代码示例

本文整理汇总了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)
开发者ID:nixz,项目名称:covise,代码行数:31,代码来源:Part2DRawVis.py

示例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)
开发者ID:nixz,项目名称:covise,代码行数:11,代码来源:Part3DBoundingBoxVis.py

示例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)
开发者ID:nixz,项目名称:covise,代码行数:14,代码来源:Part3DBoundingBoxVis.py

示例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)
开发者ID:nixz,项目名称:covise,代码行数:19,代码来源:PartDomainLinesVis.py

示例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)
开发者ID:nixz,项目名称:covise,代码行数:25,代码来源:PartPointProbingVis.py

示例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)
开发者ID:nixz,项目名称:covise,代码行数:25,代码来源:PartIsoSurfaceVis.py

示例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()
开发者ID:nixz,项目名称:covise,代码行数:26,代码来源:PartVectorFieldVis.py

示例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()
开发者ID:nixz,项目名称:covise,代码行数:76,代码来源:Part2DRawVis.py


注:本文中的PartModuleVis.PartModuleVis.run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。