예제 #1
0
 def __update(self):
     """ __update is called from the run method to update the module parameter before execution
         + update module parameters """
     if self.performerScene == None:
         self.performerScene = PerformerScene()
         theNet().add(self.performerScene)
         self.addAttribute = AddAttribute()
         theNet().add(self.addAttribute)
         theNet().connect(self.performerScene, 'model', self.addAttribute,
                          'inObject')
         # we dont get a register message for some filetypes so dont expect one!
         if self.params.filename.split(".")[-1].lower() in [
                 "via",
                 "vim",
                 "vis",  # Molecules Plugin
                 "dyn",
                 "geoall",
                 "str",
                 "sensor"  # VRAnim Plugin
         ]:
             Neg2Gui.theGrMsgHandler().decreaseNumVisItemsToBeRegistered()
     # update params
     self.performerScene.set_modelPath(self.params.filename)
     self.performerScene.set_scale(self.params.scale)
     if (self.params.backface == True):
         self.performerScene.set_backface('TRUE')
     else:
         self.performerScene.set_backface('FALSE')
     if (self.params.orientation_iv == True):
         self.performerScene.set_orientation_iv('TRUE')
     else:
         self.performerScene.set_orientation_iv('FALSE')
     if (self.params.convert_xforms_iv == True):
         self.performerScene.set_convert_xforms_iv('TRUE')
     else:
         self.performerScene.set_convert_xforms_iv('FALSE')
     # add attribute
     self.addAttribute.set_attrName('SCENEGRAPHITEMS_STARTINDEX')
     self.addAttribute.set_attrVal(
         str(self.params.sceneGraphItems_startIndex))
예제 #2
0
파일: VrmlVis.py 프로젝트: nixz/covise
 def __update(self):
     """ __update is called from the run method to update the module parameter before execution
         + update module parameters """
     if self.performerScene == None:
         self.performerScene = PerformerScene()
         theNet().add(self.performerScene)
         self.addAttribute = AddAttribute()
         theNet().add(self.addAttribute)
         theNet().connect(self.performerScene, "model", self.addAttribute, "inObject")
         # we dont get a register message for some filetypes so dont expect one!
         if self.params.filename.split(".")[-1].lower() in [
             "via",
             "vim",
             "vis",  # Molecules Plugin
             "dyn",
             "geoall",
             "str",
             "sensor",  # VRAnim Plugin
         ]:
             Neg2Gui.theGrMsgHandler().decreaseNumVisItemsToBeRegistered()
     # update params
     self.performerScene.set_modelPath(self.params.filename)
     self.performerScene.set_scale(self.params.scale)
     if self.params.backface == True:
         self.performerScene.set_backface("TRUE")
     else:
         self.performerScene.set_backface("FALSE")
     if self.params.orientation_iv == True:
         self.performerScene.set_orientation_iv("TRUE")
     else:
         self.performerScene.set_orientation_iv("FALSE")
     if self.params.convert_xforms_iv == True:
         self.performerScene.set_convert_xforms_iv("TRUE")
     else:
         self.performerScene.set_convert_xforms_iv("FALSE")
     # add attribute
     self.addAttribute.set_attrName("SCENEGRAPHITEMS_STARTINDEX")
     self.addAttribute.set_attrVal(str(self.params.sceneGraphItems_startIndex))