예제 #1
0
 def onKeyDown(self,event):
     def addWhitebalance(du = 0, dv = 0):
         self.camNode.setWhitebalance(self.camNode.getWhitebalanceU() + du, 
                 self.camNode.getWhitebalanceV() + dv)
         print ("u:", self.camNode.getWhitebalanceU(), "v:",
                 self.camNode.getWhitebalanceV())
     
     def addGain(gain):
         self.camNode.gain += gain
         print "gain:", self.camNode.gain
     
     def addShutter(shutter):
         self.camNode.shutter += shutter
         print "shutter:", self.camNode.shutter
         
     if event.keystring == "w":
         print "Setting Whitebalance"
         self.camNode.doOneShotWhitebalance()
     
     elif event.keystring == "1":
         addWhitebalance(du = -1)
         
     elif event.keystring == "2":
         addWhitebalance(du = 1)
         
     elif event.keystring == "3":
         addWhitebalance(dv = -1)
         
     elif event.keystring == "4":
         addWhitebalance(dv = 1)
     
     elif event.keystring == "left":
        addShutter(shutter = -1)
         
     elif event.keystring == "right":
         addShutter(shutter = 1)
     
     elif event.keystring == "up":
         addGain(gain = 1)
     
     elif event.keystring == "down":
         addGain(gain = -1)
     else:
         AVGApp.onKeyDown(self, event)
예제 #2
0
 def __init__(self, parentNode):
     if options.fullscreen:
         player.setResolution(True, 1920, 1200, 0)
     AVGApp.__init__(self, parentNode)
예제 #3
0
 def leave(self):
     AVGApp.leave(self)