示例#1
0
文件: joint.py 项目: kralf/morsel
 def hide(self, cameraMask = None):
   if self._task:
     framework.scheduler.removeTask(self._task)
     self._task = None
   
   if cameraMask != None:
     Node.hide(self, cameraMask)
   else:
     Node.hide(self)
示例#2
0
文件: joint.py 项目: kralf/morsel
 def show(self, cameraMask = None):
   mesh = self.mesh
   
   if mesh:
     mesh.color = [1, 0, 0, 0.5]
     mesh.setTextureOff(1)
     mesh.setTransparency(panda.TransparencyAttrib.MAlpha)
     
     self.draw()
   
   if cameraMask != None:
     Node.show(self, cameraMask)
   else:
     Node.show(self)
     
   if not self._task:
     self._task = framework.scheduler.addTask(self.name+"/Update",
       self.update)